diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-04-02 16:31:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-02 16:31:46 +0200 |
| commit | c6ec6ade63a48a7e6a2ec5378c863d6d3b5bd000 (patch) | |
| tree | b8f7188758322e97b5132768b0fdb8238abc6140 /python | |
| parent | 2ad37c4a8a963651bbc183d24662f2571c4682c6 (diff) | |
| parent | b84bdbf8dd25995aa564081632de6251ecf5ad4e (diff) | |
| download | vyos-1x-c6ec6ade63a48a7e6a2ec5378c863d6d3b5bd000.tar.gz vyos-1x-c6ec6ade63a48a7e6a2ec5378c863d6d3b5bd000.zip | |
Merge pull request #4872 from c-po/vyos-netlinkd
vyos-netlinkd: T8047: replacement of netplugd
Diffstat (limited to 'python')
| -rw-r--r-- | python/vyos/ifconfig/section.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/python/vyos/ifconfig/section.py b/python/vyos/ifconfig/section.py index 7f110de04..c3f803c76 100644 --- a/python/vyos/ifconfig/section.py +++ b/python/vyos/ifconfig/section.py @@ -186,7 +186,7 @@ class Section: return list(cls._prefixes.keys()) @classmethod - def get_config_path(cls, name): + def get_config_path(cls, name, delimiter=' '): """ get config path to interface with .vif or .vif-s.vif-c example: eth0.1.2 -> 'ethernet eth0 vif-s 1 vif-c 2' @@ -195,11 +195,11 @@ class Section: sect = cls.section(name) if sect: splinterface = name.split('.') - intfpath = f'{sect} {splinterface[0]}' + intfpath = f'{sect}{delimiter}{splinterface[0]}' if len(splinterface) == 2: - intfpath += f' vif {splinterface[1]}' + intfpath += f'{delimiter}vif{delimiter}{splinterface[1]}' elif len(splinterface) == 3: - intfpath += f' vif-s {splinterface[1]} vif-c {splinterface[2]}' + intfpath += f'{delimiter}vif-s{delimiter}{splinterface[1]}{delimiter}vif-c{delimiter}{splinterface[2]}' return intfpath else: return False |
