correct option passing for reclass-salt top
diff --git a/reclass/adapters/salt.py b/reclass/adapters/salt.py
index 813f390..54adf5a 100755
--- a/reclass/adapters/salt.py
+++ b/reclass/adapters/salt.py
@@ -48,12 +48,13 @@
def top(minion_id, storage_type=OPT_STORAGE_TYPE,
inventory_base_uri=OPT_INVENTORY_BASE_URI, nodes_uri=OPT_NODES_URI,
- classes_uri=OPT_CLASSES_URI, class_mappings=None):
+ classes_uri=OPT_CLASSES_URI, class_mappings=None, **kwargs):
path_mangler = get_path_mangler(storage_type)
nodes_uri, classes_uri = path_mangler(inventory_base_uri, nodes_uri, classes_uri)
storage = get_storage(storage_type, nodes_uri, classes_uri)
- reclass = Core(storage, class_mappings, input_data=None, default_environment='base')
+ settings = Settings(kwargs)
+ reclass = Core(storage, class_mappings, settings, input_data=None)
# if the minion_id is not None, then return just the applications for the
# specific minion, otherwise return the entire top data (which we need for
@@ -96,6 +97,11 @@
defaults=defaults)
class_mappings = defaults.get('class_mappings')
defaults.update(vars(options))
+ defaults.pop("storage_type", None)
+ defaults.pop("inventory_base_uri", None)
+ defaults.pop("nodes_uri", None)
+ defaults.pop("classes_uri", None)
+ defaults.pop("class_mappings", None)
if options.mode == MODE_NODEINFO:
data = ext_pillar(options.nodename, {},