diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-04-21 19:05:51 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-04-21 19:09:53 +0200 |
commit | 255216b4470b0a25dded0edc1e8acd8e0fbf34b5 (patch) | |
tree | 17625eadbd1a2e07fed64259da32052335fadae3 /interface-definitions/containers.xml.in | |
parent | 31c708c2c467b39c3874ffe5cadd9b325aad1ad6 (diff) | |
download | vyos-1x-255216b4470b0a25dded0edc1e8acd8e0fbf34b5.tar.gz vyos-1x-255216b4470b0a25dded0edc1e8acd8e0fbf34b5.zip |
containers: T2216: refine implementation
This commit is a cleanup and refinement of the container hosting implementation.
- Renamed CLI node ipv4-prefix -> prefix so both IPv4 and IPv6 prefix can be
supplied in the future. This is currently limited to IPv4 only as when using
IPv6 networks in combination with IPv4 the IPv4 prefix is altered randomly
- De-nested if clauses
- Use "for foo, bar in baz.items()" to more easily iterate of dictionary
values, this means "bar" can be used to access "baz[foo]"
Diffstat (limited to 'interface-definitions/containers.xml.in')
-rw-r--r-- | interface-definitions/containers.xml.in | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/interface-definitions/containers.xml.in b/interface-definitions/containers.xml.in index f54207936..47b41c834 100644 --- a/interface-definitions/containers.xml.in +++ b/interface-definitions/containers.xml.in @@ -54,7 +54,7 @@ <properties> <help>Set IPv4 static address to container (optional)</help> <valueHelp> - <format>ipv4</format> + <format>ipv4</format> <description>IPv4 address (x.x.x.1 reserved)</description> </valueHelp> <constraint> @@ -76,16 +76,17 @@ <help>Network description</help> </properties> </leafNode> - <leafNode name="ipv4-prefix"> + <leafNode name="prefix"> <properties> <help>Prefix which allocated to that network</help> <valueHelp> <format>ipv4net</format> - <description>IPv4 network and prefix length</description> + <description>IPv4 network prefix</description> </valueHelp> <constraint> - <validator name="ip-prefix"/> + <validator name="ipv4-prefix"/> </constraint> + <multi/> </properties> </leafNode> </children> |