Add: fuel network template download script

starting from MOS 7.0

Change-Id: I0ec27a1e61988c1026989c656d7ac86323a9078d
This commit is contained in:
Aleksandr Dobdin 2016-12-08 13:40:02 +00:00 committed by Dmitry Sutyagin
parent ba213af116
commit 89131f92e1
4 changed files with 30 additions and 6 deletions

View File

@ -4,7 +4,7 @@
%global pypi_name timmy
Name: python-%{pypi_name}
Version: 1.25.1
Version: 1.25.2
Release: 1%{?dist}~mos0
Summary: Log collector tool for OpenStack Fuel
@ -107,8 +107,11 @@ popd
%changelog
* Thu Dec 9 2016 Aleksandr Dobdin <adobdin@mirantis.com> - 1.25.2
- Add: fuel network template download script
* Fri Dec 9 2016 Dmitry Sutyagin <dsutyagin@mirantis.com> - 1.25.1
Fix: IOError if no-clean + outdir missing
- Fix: IOError if no-clean + outdir missing
* Fri Dec 9 2016 Alexander Lemeshko <oliemieshko@mirantis.com> - 1.25.0
- Add: ability to analyze old results

View File

@ -16,7 +16,7 @@
# under the License.
project_name = 'timmy'
version = '1.25.1'
version = '1.25.2'
if __name__ == '__main__':
import sys

View File

@ -78,13 +78,13 @@ scripts:
controller: [nova-manage-vm-list]
'7.0':
by_roles:
fuel: [fuel-notifications, fuel-dockerctl-list, fuel-docker-ps, fuel-dockerctl-check, docker-images]
fuel: [fuel-notifications, fuel-dockerctl-list, fuel-docker-ps, fuel-dockerctl-check, docker-images, fuel-all-network-templates-combined-yaml]
'8.0':
by_roles:
fuel: [fuel-notifications, fuel-dockerctl-list, fuel-docker-ps, fuel-dockerctl-check, docker-images, fuel-bootstrap-list]
fuel: [fuel-notifications, fuel-dockerctl-list, fuel-docker-ps, fuel-dockerctl-check, docker-images, fuel-bootstrap-list, fuel-all-network-templates-combined-yaml]
'9.0':
by_roles:
fuel: [fuel-notifications, fuel-bootstrap-list, shotgun2-report]
fuel: [fuel-notifications, fuel-bootstrap-list, shotgun2-report, fuel-all-network-templates-combined-yaml]
by_roles:
fuel: [fuel-release, fuel-task-list, fuel-environment-list, fuel-postgres-dump, fuel-node-json]
cinder: [ovs-vsctl-show, cinder-manage]

View File

@ -0,0 +1,21 @@
#!/bin/bash
exec /usr/bin/env python - << EOF
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
from fuelclient.v1.environment import EnvironmentClient
from fuelclient.client import Client as FuelClient
class CEnvironmentClient(EnvironmentClient):
def download_network_template(self, environment_id):
env = self._entity_wrapper(environment_id)
template_data = env.get_network_template_data()
return template_data
ec = CEnvironmentClient()
fc = FuelClient()
clusters_dict = fc.get_request('clusters')
for cluster in clusters_dict:
clid=int(cluster['id'])
print('---\n# cluster id:%s\n%s' %(clid, ec.download_network_template(clid)))
EOF