summaryrefslogtreecommitdiff
path: root/src/migration-scripts
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-11-18 16:07:37 +0100
committerChristian Poessinger <christian@poessinger.com>2019-11-23 20:44:02 +0100
commit3308bc150646abcf523c001a7b6086c46703b204 (patch)
treec9f72fae3d33c8457d28f9996e999474cb38daf2 /src/migration-scripts
parentfc65bb35be37878d4cc4cbb5d330f56febaaa409 (diff)
downloadvyos-1x-3308bc150646abcf523c001a7b6086c46703b204.tar.gz
vyos-1x-3308bc150646abcf523c001a7b6086c46703b204.zip
wireless: T1627: config migrator does not support camel casing
convert all nodes to lowercase
Diffstat (limited to 'src/migration-scripts')
-rwxr-xr-xsrc/migration-scripts/interfaces/3-to-430
1 files changed, 21 insertions, 9 deletions
diff --git a/src/migration-scripts/interfaces/3-to-4 b/src/migration-scripts/interfaces/3-to-4
index 4a2fd9c0d..8b9bf7f96 100755
--- a/src/migration-scripts/interfaces/3-to-4
+++ b/src/migration-scripts/interfaces/3-to-4
@@ -24,24 +24,36 @@ if not config.exists(base):
else:
for wifi in config.list_nodes(base):
# as converting a node to bool is always the same, we can script it
- to_bool_nodes = ['capabilities ht 40MHz-incapable', 'capabilities ht auto-powersave',
- 'capabilities ht delayed-block-ack', 'capabilities ht dsss-cck-40',
- 'capabilities ht greenfield', 'capabilities ht ldpc', 'capabilities ht lsig-protection',
- 'capabilities ht stbc tx', 'capabilities require-ht', 'capabilities require-vht',
- 'capabilities vht antenna-pattern-fixed', 'capabilities vht ldpc',
- 'capabilities vht stbc tx', 'capabilities vht tx-powersave',
- 'capabilities vht vht-cf', 'expunge-failing-stations', 'isolate-stations']
+ to_bool_nodes = ['capabilities ht 40MHz-incapable',
+ 'capabilities ht auto-powersave',
+ 'capabilities ht delayed-block-ack',
+ 'capabilities ht dsss-cck-40',
+ 'capabilities ht greenfield',
+ 'capabilities ht ldpc',
+ 'capabilities ht lsig-protection',
+ 'capabilities ht stbc tx',
+ 'capabilities require-ht',
+ 'capabilities require-vht',
+ 'capabilities vht antenna-pattern-fixed',
+ 'capabilities vht ldpc',
+ 'capabilities vht stbc tx',
+ 'capabilities vht tx-powersave',
+ 'capabilities vht vht-cf',
+ 'expunge-failing-stations',
+ 'isolate-stations']
for node in to_bool_nodes:
if config.exists(base + [wifi, node]):
tmp = config.return_value(base + [wifi, node])
# delete old node
config.delete(base + [wifi, node])
+ # set new node if it was enabled
if tmp == 'true':
- config.set(base + [wifi, node])
+ # OLD CLI used camel casing in 40MHz-incapable which is
+ # not supported in the new backend. Convert all to lower-case
+ config.set(base + [wifi, node.lower()])
if config.exists(base + [wifi, 'debug']):
- tmp = config.return_value(base + [wifi, 'debug'])
config.delete(base + [wifi, 'debug'])
try: