ifstate 1.11.5__tar.gz → 1.11.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ifstate-1.11.5 → ifstate-1.11.7}/PKG-INFO +1 -1
- {ifstate-1.11.5 → ifstate-1.11.7}/ifstate.egg-info/PKG-INFO +1 -1
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/__init__.py +1 -1
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/link/base.py +10 -8
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/netns/__init__.py +4 -1
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/wireguard/__init__.py +8 -1
- {ifstate-1.11.5 → ifstate-1.11.7}/LICENSE +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/README.md +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/ifstate/__init__.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/ifstate/ifstate.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/ifstate/shell.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/ifstate/vrrp.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/ifstate.egg-info/SOURCES.txt +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/ifstate.egg-info/dependency_links.txt +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/ifstate.egg-info/entry_points.txt +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/ifstate.egg-info/requires.txt +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/ifstate.egg-info/top_level.txt +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/address/__init__.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/bpf/__init__.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/bpf/ctypes.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/bpf/map.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/brport/__init__.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/exception.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/fdb/__init__.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/link/__init__.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/link/physical.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/link/tun.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/link/veth.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/log.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/neighbour/__init__.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/parser/__init__.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/parser/base.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/parser/yaml.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/routing/__init__.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/sysctl/__init__.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/tc/__init__.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/util.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/libifstate/xdp/__init__.py +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/schema/ifstate.conf.schema.json +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/setup.cfg +0 -0
- {ifstate-1.11.5 → ifstate-1.11.7}/setup.py +0 -0
@@ -572,20 +572,22 @@ class Link(ABC):
|
|
572
572
|
# set sysctl settings if required
|
573
573
|
sysctl.apply(self.settings['ifname'], do_apply)
|
574
574
|
|
575
|
+
# set master if required
|
576
|
+
if master is not None:
|
577
|
+
try:
|
578
|
+
self.netns.ipr.link('set', index=self.idx, master=master)
|
579
|
+
except Exception as err:
|
580
|
+
if not isinstance(err, netlinkerror_classes):
|
581
|
+
raise
|
582
|
+
excpts.add('set', err, master=master)
|
583
|
+
|
575
584
|
# set brport settings if required
|
576
585
|
if self.brport:
|
577
586
|
if self.brport.has_changes(self.idx):
|
578
587
|
self.brport.apply(do_apply, self.idx, excpts)
|
579
588
|
|
580
|
-
# set
|
589
|
+
# set state if required
|
581
590
|
if not excpts.has_op('brport'):
|
582
|
-
if master is not None:
|
583
|
-
try:
|
584
|
-
self.netns.ipr.link('set', index=self.idx, master=master)
|
585
|
-
except Exception as err:
|
586
|
-
if not isinstance(err, netlinkerror_classes):
|
587
|
-
raise
|
588
|
-
excpts.add('set', err, master=master)
|
589
591
|
if state is not None:
|
590
592
|
try:
|
591
593
|
self.netns.ipr.link('set', index=self.idx, state=state)
|
@@ -66,7 +66,10 @@ class NetNameSpace():
|
|
66
66
|
memo[id(self)] = result
|
67
67
|
for k, v in self.__dict__.items():
|
68
68
|
if k == 'ipr':
|
69
|
-
|
69
|
+
if self.netns is None:
|
70
|
+
setattr(result, k, IPRouteExt())
|
71
|
+
else:
|
72
|
+
setattr(result, k, NetNSExt(self.netns))
|
70
73
|
else:
|
71
74
|
setattr(result, k, deepcopy(v, memo))
|
72
75
|
return result
|
@@ -38,7 +38,14 @@ class WireGuard():
|
|
38
38
|
memo[id(self)] = result
|
39
39
|
for k, v in self.__dict__.items():
|
40
40
|
if k == 'wg':
|
41
|
-
|
41
|
+
if self.netns.netns is not None:
|
42
|
+
pyroute2.netns.pushns(self.netns.netns)
|
43
|
+
|
44
|
+
try:
|
45
|
+
setattr(result, k, WG())
|
46
|
+
finally:
|
47
|
+
if self.netns.netns is not None:
|
48
|
+
pyroute2.netns.popns()
|
42
49
|
else:
|
43
50
|
setattr(result, k, deepcopy(v, memo))
|
44
51
|
return result
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|