Rename network settings variable 57/24357/1
authorMichael Chapman <woppin@gmail.com>
Tue, 15 Nov 2016 15:39:05 +0000 (02:39 +1100)
committerMichael Chapman <michapma@redhat.com>
Tue, 15 Nov 2016 15:42:26 +0000 (02:42 +1100)
The network_settings_file variable is actually the inventory file,
this patch renames it to match.

Change-Id: Id4d0b792b8426b4e0b1c61270fe2e6da89559413
Signed-off-by: Michael Chapman <michapma@redhat.com>
lib/python/apex/inventory.py

index aa21968..3714356 100644 (file)
@@ -23,8 +23,8 @@ class Inventory(dict):
     def __init__(self, source, ha=True, virtual=False):
         init_dict = {}
         if type(source) is str:
-            with open(source, 'r') as network_settings_file:
-                yaml_dict = yaml.safe_load(network_settings_file)
+            with open(source, 'r') as inventory_file:
+                yaml_dict = yaml.safe_load(inventory_file)
             # collapse node identifiers from the structure
             init_dict['nodes'] = list(map(lambda n: n[1],
                                           yaml_dict['nodes'].items()))