7fea4dfd7794136270b4b39a6d3547f07bcc95b6
[releng.git] / modules / opnfv / installer_adapters / fuel / example.py
1 # This is an example of usage of this Tool
2 # Author: Jose Lausuch (jose.lausuch@ericsson.com)
3
4 import opnfv.installer_adapters.InstallerHandler as ins_handler
5
6 fuel_handler = ins_handler.InstallerHandler(installer='fuel',
7                                             installer_ip='10.20.0.2',
8                                             installer_user='root',
9                                             installer_pwd='r00tme')
10 print("Nodes in cluster 1:\n%s\n" %
11       fuel_handler.get_nodes(options={'cluster': '1'}))
12 print("Nodes in cluster 2:\n%s\n" %
13       fuel_handler.get_nodes(options={'cluster': '2'}))
14 print("Nodes:\n%s\n" % fuel_handler.get_nodes())
15 print("Controller nodes:\n%s\n" % fuel_handler.get_controller_ips())
16 print("Compute nodes:\n%s\n" % fuel_handler.get_compute_ips())
17 print("\n%s\n" % fuel_handler.get_deployment_info())
18 fuel_handler.get_file_from_installer('/root/deploy/dea.yaml', './dea.yaml')
19 fuel_handler.get_file_from_controller(
20     '/etc/neutron/neutron.conf', './neutron.conf')
21 fuel_handler.get_file_from_controller(
22     '/root/openrc', './openrc')