This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
routes: | |
config: | |
- destination: 192.168.2.0/24 | |
metric: 108 | |
next-hop-address: 192.168.1.3 | |
next-hop-interface: eth1 | |
table-id: 200 | |
- destination: 2001:db8:a::/64 | |
metric: 108 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 5df03769da166222b2abf9ac239df1eca0c4e2d1 Mon Sep 17 00:00:00 2001 | |
From: Gris Ge <[email protected]> | |
Date: Tue, 3 Mar 2020 13:26:12 +0800 | |
Subject: [PATCH] nm bridge: Merge port options | |
The `state.dict_update` only do full copy on list items. | |
When bridge editing its slave list, slave port options also need to be | |
copied from current state. | |
Added `appliers.linux_bridge.merge_linux_bridge_ports()` to handle this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from libnmstate.schema import LinuxBridge as LB | |
def create_setting(iface_state, base_con_profile): | |
bridge_setting = _get_current_bridge_setting(base_con_profile) | |
if not bridge_setting: | |
bridge_setting = nmclient.NM.SettingBridge.new() | |
bridge_setting.props.vlan_filtering = _have_port_vlan(iface_state) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import sys | |
import toml | |
import pyotp | |
from pathlib import Path | |
CONF_PATH = f"{Path.home()}/.config/token.conf" | |
KEY = "key" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PYTEST='pytest-3' | |
SUDO='sudo' | |
if [ $HOSTNAME == 'Gris-Laptop' ];then | |
SUDO='' | |
fi | |
which $PYTEST 1>/dev/null 2>/dev/null | |
if [ $? -ne 0 ];then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
interfaces: | |
- name: br0 | |
mtu: 3000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
interfaces: | |
- name: eth1 | |
type: ethernet | |
state: up | |
- name: br0 | |
type: linux-bridge | |
state: up | |
bridge: | |
port: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from distutils.version import StrictVersion | |
import logging | |
logging.basicConfig(level="DEBUG") | |
import gi | |
gi.require_version("NM", "1.0") |