ifstate 2.0.0rc6__tar.gz → 2.0.1__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.
Files changed (45) hide show
  1. {ifstate-2.0.0rc6 → ifstate-2.0.1}/PKG-INFO +1 -1
  2. {ifstate-2.0.0rc6 → ifstate-2.0.1}/ifstate/ifstate.py +1 -1
  3. {ifstate-2.0.0rc6 → ifstate-2.0.1}/ifstate.egg-info/PKG-INFO +1 -1
  4. {ifstate-2.0.0rc6 → ifstate-2.0.1}/ifstate.egg-info/SOURCES.txt +0 -1
  5. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/__init__.py +14 -15
  6. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/schema/2/ifstate.conf.schema.json +1 -1
  7. ifstate-2.0.0rc6/schema/2/ifstate.conf.schema.json +0 -4442
  8. {ifstate-2.0.0rc6 → ifstate-2.0.1}/LICENSE +0 -0
  9. {ifstate-2.0.0rc6 → ifstate-2.0.1}/README.md +0 -0
  10. {ifstate-2.0.0rc6 → ifstate-2.0.1}/ifstate/__init__.py +0 -0
  11. {ifstate-2.0.0rc6 → ifstate-2.0.1}/ifstate/shell.py +0 -0
  12. {ifstate-2.0.0rc6 → ifstate-2.0.1}/ifstate/vrrp.py +0 -0
  13. {ifstate-2.0.0rc6 → ifstate-2.0.1}/ifstate.egg-info/dependency_links.txt +0 -0
  14. {ifstate-2.0.0rc6 → ifstate-2.0.1}/ifstate.egg-info/entry_points.txt +0 -0
  15. {ifstate-2.0.0rc6 → ifstate-2.0.1}/ifstate.egg-info/requires.txt +0 -0
  16. {ifstate-2.0.0rc6 → ifstate-2.0.1}/ifstate.egg-info/top_level.txt +0 -0
  17. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/address/__init__.py +0 -0
  18. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/bpf/__init__.py +0 -0
  19. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/bpf/ctypes.py +0 -0
  20. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/bpf/map.py +0 -0
  21. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/brport/__init__.py +0 -0
  22. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/exception.py +0 -0
  23. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/fdb/__init__.py +0 -0
  24. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/hook/__init__.py +0 -0
  25. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/hook/wrapper.sh +0 -0
  26. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/link/__init__.py +0 -0
  27. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/link/base.py +0 -0
  28. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/link/dsa.py +0 -0
  29. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/link/physical.py +0 -0
  30. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/link/tun.py +0 -0
  31. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/link/veth.py +0 -0
  32. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/log.py +0 -0
  33. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/neighbour/__init__.py +0 -0
  34. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/netns/__init__.py +0 -0
  35. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/parser/__init__.py +0 -0
  36. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/parser/base.py +0 -0
  37. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/parser/yaml.py +0 -0
  38. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/routing/__init__.py +0 -0
  39. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/sysctl/__init__.py +0 -0
  40. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/tc/__init__.py +0 -0
  41. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/util.py +0 -0
  42. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/wireguard/__init__.py +0 -0
  43. {ifstate-2.0.0rc6 → ifstate-2.0.1}/libifstate/xdp/__init__.py +0 -0
  44. {ifstate-2.0.0rc6 → ifstate-2.0.1}/setup.cfg +0 -0
  45. {ifstate-2.0.0rc6 → ifstate-2.0.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ifstate
3
- Version: 2.0.0rc6
3
+ Version: 2.0.1
4
4
  Summary: Manage host interface settings in a declarative manner
5
5
  Home-page: https://ifstate.net/
6
6
  Author: Thomas Liske
@@ -131,7 +131,7 @@ def main():
131
131
  parser.add_argument('--version', action='version',
132
132
  version='%(prog)s {version}'.format(version=__version__))
133
133
  group.add_argument("-v", "--verbose", action="count", default=0,
134
- help="be more verbose")
134
+ help="be more verbose (twice for very verbose)")
135
135
  group.add_argument("-q", "--quiet", action="store_true",
136
136
  help="be more quiet, print only warnings and errors")
137
137
  parser.add_argument("-s", "--soft-schema", action="store_true",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ifstate
3
- Version: 2.0.0rc6
3
+ Version: 2.0.1
4
4
  Summary: Manage host interface settings in a declarative manner
5
5
  Home-page: https://ifstate.net/
6
6
  Author: Thomas Liske
@@ -15,7 +15,6 @@ libifstate/__init__.py
15
15
  libifstate/exception.py
16
16
  libifstate/log.py
17
17
  libifstate/util.py
18
- libifstate/../schema/2/ifstate.conf.schema.json
19
18
  libifstate/address/__init__.py
20
19
  libifstate/bpf/__init__.py
21
20
  libifstate/bpf/ctypes.py
@@ -54,7 +54,7 @@ import json
54
54
  import errno
55
55
  import logging
56
56
 
57
- __version__ = "2.0.0rc6"
57
+ __version__ = "2.0.1"
58
58
 
59
59
  class IfState():
60
60
  def __init__(self):
@@ -136,16 +136,15 @@ class IfState():
136
136
  self.link_registry = LinkRegistry(self.ignore.get('ifname', []), self.root_netns)
137
137
 
138
138
  self._update(self.root_netns, ifstates)
139
- if 'namespaces' in ifstates:
140
- self.namespaces = {}
141
- self.new_namespaces = []
142
- for netns_name, netns_ifstates in ifstates['namespaces'].items():
143
- is_new = netns_name not in pyroute2.netns.listnetns()
144
- self.namespaces[netns_name] = NetNameSpace(netns_name)
145
- if is_new:
146
- self.new_namespaces.append(netns_name)
147
- self.link_registry.inventory_netns(self.namespaces[netns_name])
148
- self._update(self.namespaces[netns_name], netns_ifstates)
139
+ self.namespaces = {}
140
+ self.new_namespaces = []
141
+ for netns_name, netns_ifstates in ifstates.get('namespaces', {}).items():
142
+ is_new = netns_name not in pyroute2.netns.listnetns()
143
+ self.namespaces[netns_name] = NetNameSpace(netns_name)
144
+ if is_new:
145
+ self.new_namespaces.append(netns_name)
146
+ self.link_registry.inventory_netns(self.namespaces[netns_name])
147
+ self._update(self.namespaces[netns_name], netns_ifstates)
149
148
 
150
149
  def _update(self, netns, ifstates):
151
150
  # parse network sysctl settings
@@ -320,15 +319,15 @@ class IfState():
320
319
 
321
320
  # add routing from config
322
321
  if 'routing' in ifstates:
322
+ if netns.tables is None:
323
+ netns.tables = Tables(netns)
323
324
  if 'routes' in ifstates['routing']:
324
- if netns.tables is None:
325
- netns.tables = Tables(netns)
326
325
  for route in ifstates['routing']['routes']:
327
326
  netns.tables.add(route)
328
327
 
328
+ if netns.rules is None:
329
+ netns.rules = Rules(netns)
329
330
  if 'rules' in ifstates['routing']:
330
- if netns.rules is None:
331
- netns.rules = Rules(netns)
332
331
  for rule in ifstates['routing']['rules']:
333
332
  netns.rules.add(rule)
334
333
 
@@ -1757,7 +1757,7 @@
1757
1757
  "additionalProperties": false,
1758
1758
  "properties": {
1759
1759
  "script": {
1760
- "description": "filename to be executed on interface configuration: the hook name will be used by default; relatives file are based on `/etc/needrestart/hooks`",
1760
+ "description": "filename to be executed on interface configuration: the hook name will be used by default; relatives file are based on `/etc/ifstate/hooks`",
1761
1761
  "type": "string",
1762
1762
  "minLength": 1
1763
1763
  },