Skip to content

Commit

Permalink
Don't flatten properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
mboldt committed Oct 25, 2016
1 parent 71c3d19 commit 9cc8c29
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions tile_generator/opsmgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,6 @@ def get_products():
product['guid'] = installed[0]['guid']
return available_products

def flatten(properties):
flattened = {}
for key1, value1 in properties.items():
if type(value1) is dict and list(value1.keys()) != ['secret']:
for key2, value2 in value1.items():
flattened[key1 + '_' + key2] = value2
else:
flattened[key1] = value1
return flattened

def get_version():
# 1.7 and 1.8 have version in the diagnostic report.
response = get('/api/v0/diagnostic_report', check=False)
Expand Down Expand Up @@ -277,7 +267,6 @@ def configure(product, properties, strict=False, skip_validation=False):
else:
if job_property.get('value', None) is None:
missing_properties.append('.'.join(('jobs', job['identifier'], property_name)))
properties = flatten(properties)
for p in product_settings.get('properties', []):
key = p['identifier']
value = properties.get(key, None)
Expand Down

0 comments on commit 9cc8c29

Please sign in to comment.