def get_models()

in sitewise_export_tools/asset_model_exporter.py [0:0]


def get_models():
    model_list = []
    #list all the asset models
    response = client.list_asset_models()
    for id in response['assetModelSummaries']:
        asset_model_name = id['name']
        asset_model_name = asset_model_name.replace(" ","")
        asset_model_id = id['id']

        #update the hierarchy_id_lookup table (this is a side effect that should be cleaned up)
        global hierarchy_id_lookup
        hierarchy_id_lookup.update({asset_model_id:asset_model_name})

        #describe the asset model
        asset_model_response = client.describe_asset_model(assetModelId=id['id'])
        model_list.append(asset_model_response)
    return model_list