From 5cd461c6ad1f4b40a94ecac461238123ea404520 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 24 Aug 2017 13:26:38 -0400 Subject: [PATCH] Add understanding of net.* attributes to fixup net.* are special, add them to the fxup so that the bootable attribute is correctly amended. --- confluent_server/confluent/config/configmanager.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/confluent_server/confluent/config/configmanager.py b/confluent_server/confluent/config/configmanager.py index 317c7c5f..a96b3724 100644 --- a/confluent_server/confluent/config/configmanager.py +++ b/confluent_server/confluent/config/configmanager.py @@ -227,6 +227,12 @@ def decrypt_value(cryptvalue, def fixup_attribute(attrname, attrval): # Normalize some data, for example strings and numbers to bool + if attrname.startswith('net.'): + # For net.* attribtues, split on the dots and put back together + # longer term we might want a generic approach, but + # right now it's just net. attributes + netattrparts = attrname.split('.') + attrname = netattrparts[0] + '.' + netattrparts[-1] if not isinstance(attrval, allattributes.node[attrname]['type']): if (allattributes.node[attrname]['type'] == bool and (isinstance(attrval, str) or isinstance(attrval, unicode))):