https://blueprints.launchpad.net/fuel/+spec/fuel-devops-client-as-a-module
Fuel-devops should have an API class to provide a complete interface for interacting with the environment.
In current implementation there is a list of functions to interact with environments:
- devops/helpers/helpers.py:
- get_nodes
- get_slave_ip
- get_admin_ip
- get_node_remote
- get_admin_remote
- get_private_keys
- devops/helpers/ntp.py:
- sync_time
These main functions are written in procedural style. It makes it hard to extend or add a new one.
Also some of these functions are duplicated in fuel-qa fuelweb_test/models/environment.py
To reduce dependency issues and allow to re-use management layer of virtual/baremetal labs:
Fuel-devops client module should provide a complete interface for interacting with the environment: manage nodes, mapping devops and nailgun nodes into a single object, accessing nodes via SSH, snapshot/revert nodes, bootstrap admin node and so on. It should encapsulate some of methods from fuel-devops Environment object and fuel-qa EnvironmentModel object (then deprecate it later).
Schema of DevopsClient usage:
+---------+ +----------+
| | | |
| fuel-qa | | shell.py |
| | | |
+-----+---+ +-----+----+
| |
+--------+ +------------+
| |
v v
+--------------+
| |
| DevopsClient |
| |
+----+-----+---+
| |
| +----------+------------------+
| | |
v v v
+--------------------+ +---------------+ +----------+
| | | | | |
| devops.Environment | | NailgunClient | | NtpGroup |
| | | | | |
+--------------------+ +---------------+ +----------+
NailgunClient should be added to replace get_nodes method. NtpGroup should be added to replace sync_time method.
None
None
None
None
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
None
None
DevopsClient provides all necessary methods to interact with devops environment.
None