diff --git a/specs/python-timmy.spec b/specs/python-timmy.spec index 0595566..836321f 100644 --- a/specs/python-timmy.spec +++ b/specs/python-timmy.spec @@ -107,6 +107,9 @@ popd %changelog +* Tue Dec 20 2016 Aleksandr Dobdin - 1.26.1 +- Fix: download network templates for 9.1 + * Thu Dec 15 2016 Alexander Lemeshko - 1.26.0 - Add: scripts_all_pairs 'one way' mode diff --git a/timmy/env.py b/timmy/env.py index 911f1c7..b661fba 100644 --- a/timmy/env.py +++ b/timmy/env.py @@ -16,7 +16,7 @@ # under the License. project_name = 'timmy' -version = '1.26.0' +version = '1.26.1' if __name__ == '__main__': import sys diff --git a/timmy_data/rq/scripts/fuel-all-network-templates-combined-yaml b/timmy_data/rq/scripts/fuel-all-network-templates-combined-yaml index ede13e1..ab7d705 100755 --- a/timmy_data/rq/scripts/fuel-all-network-templates-combined-yaml +++ b/timmy_data/rq/scripts/fuel-all-network-templates-combined-yaml @@ -4,7 +4,9 @@ exec /usr/bin/env python - << EOF # -*- coding: utf-8 -*- from fuelclient.v1.environment import EnvironmentClient -from fuelclient.client import Client as FuelClient +import subprocess +import json +import yaml class CEnvironmentClient(EnvironmentClient): def download_network_template(self, environment_id): @@ -13,9 +15,12 @@ class CEnvironmentClient(EnvironmentClient): return template_data ec = CEnvironmentClient() -fc = FuelClient() -clusters_dict = fc.get_request('clusters') +p = subprocess.Popen(['fuel', 'env', 'list', '--json'], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) +out, err = p.communicate() +clusters_dict = json.loads(out) for cluster in clusters_dict: clid=int(cluster['id']) - print('---\n# cluster id:%s\n%s' %(clid, ec.download_network_template(clid))) + print('---\n# cluster id:%s\n%s' %(clid, yaml.dump(yaml.load((json.dumps(ec.download_network_template(clid))))))) EOF