diff options
author | Christian Poessinger <christian.poessinger@rohde-schwarz.com> | 2021-12-06 18:49:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-06 18:49:30 +0100 |
commit | 84455522574afb9286803f4e192a3d99c259618c (patch) | |
tree | 01ab634d8e5a9c40061f2b8150245319c44746a4 /interface-definitions | |
parent | 5b3ff8574c8265cf308b225c1a39503712f0b21d (diff) | |
parent | 47584e030f3341b265e826643951648982cb20d0 (diff) | |
download | vyos-1x-84455522574afb9286803f4e192a3d99c259618c.tar.gz vyos-1x-84455522574afb9286803f4e192a3d99c259618c.zip |
Merge pull request #1077 from sever-sever/T3829
netns: T3829: Ability to configure network namespaces
Diffstat (limited to 'interface-definitions')
-rw-r--r-- | interface-definitions/include/interface/netns.xml.i | 14 | ||||
-rw-r--r-- | interface-definitions/interfaces-dummy.xml.in | 1 | ||||
-rw-r--r-- | interface-definitions/netns.xml.in | 23 |
3 files changed, 38 insertions, 0 deletions
diff --git a/interface-definitions/include/interface/netns.xml.i b/interface-definitions/include/interface/netns.xml.i new file mode 100644 index 000000000..39f9118fa --- /dev/null +++ b/interface-definitions/include/interface/netns.xml.i @@ -0,0 +1,14 @@ +<!-- include start from interface/netns.xml.i --> +<leafNode name="netns"> + <properties> + <help>Network namespace name</help> + <valueHelp> + <format>text</format> + <description>Network namespace name</description> + </valueHelp> + <completionHelp> + <path>netns name</path> + </completionHelp> + </properties> +</leafNode> +<!-- include end --> diff --git a/interface-definitions/interfaces-dummy.xml.in b/interface-definitions/interfaces-dummy.xml.in index 2bc88c1a7..4d4c44160 100644 --- a/interface-definitions/interfaces-dummy.xml.in +++ b/interface-definitions/interfaces-dummy.xml.in @@ -27,6 +27,7 @@ #include <include/interface/source-validation.xml.i> </children> </node> + #include <include/interface/netns.xml.i> #include <include/interface/vrf.xml.i> </children> </tagNode> diff --git a/interface-definitions/netns.xml.in b/interface-definitions/netns.xml.in new file mode 100644 index 000000000..80de805fb --- /dev/null +++ b/interface-definitions/netns.xml.in @@ -0,0 +1,23 @@ +<?xml version="1.0"?> +<interfaceDefinition> + <node name="netns" owner="${vyos_conf_scripts_dir}/netns.py"> + <properties> + <help>Network namespace</help> + <priority>299</priority> + </properties> + <children> + <tagNode name="name"> + <properties> + <help>Network namespace name</help> + <constraint> + <regex>^[a-zA-Z0-9-_]{1,100}</regex> + </constraint> + <constraintErrorMessage>Netns name must be alphanumeric and can contain hyphens and underscores.</constraintErrorMessage> + </properties> + <children> + #include <include/interface/description.xml.i> + </children> + </tagNode> + </children> + </node> +</interfaceDefinition> |