From 3308bc150646abcf523c001a7b6086c46703b204 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 18 Nov 2019 16:07:37 +0100 Subject: wireless: T1627: config migrator does not support camel casing convert all nodes to lowercase --- src/migration-scripts/interfaces/3-to-4 | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'src') 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: -- cgit v1.2.3