DevOps: Create script to reproduce environment for using VMware vCenter and NSX

Registered by Igor Gajsin

Create a script env_assist.py for revert environment (including VMware vCenter and NSX nodes) before system test. It must works in such manners:

1. there is /etc/env_assist.json file in each nodes where we want to launch env_asist. Each of our environments must be described in this file. For example:
{"env_Ubuntu_vcenter_ha": {"env-name": "env_Ubuntu_vcenter_ha", "nsxbr": {"ip": "172.16.0.1", "br": ""}, "snp": {"q": ["qemu:///system", 3, "ready_with_3_slaves"], "vb": [["<email address hidden>", "vcenter", "vcentersnap"], ["<email address hidden>", "nsx", "nsxsnap"]]}, "vlanifs": ["eth1.851", "eth1.852"], "br_private": "private", "br_public": "public"},
"env_Ubuntu_vcenter_simple": {"env-name": "env_Ubuntu_vcenter_simple", "nsxbr": {"ip": "172.16.0.1", "br": ""}, "snp": {"q": ["qemu:///system", 3, "ready_with_3_slaves"], "vb": [["<email address hidden>", "vcenter", "vcentersnap"], ["<email address hidden>", "nsx", "nsxsnap"]]}, "vlanifs": ["eth1.853", "eth1.854"], "br_private": "private", "br_public": "public"}}

2. script provide the decorator with_env, which take a environment as a parameter and revert it around tests. Tests must be defined with it:
@with_env
def test(env):
    ...
    ...
and launched with environment-argument:
env = getenv()
test(env)

3. name of the environment could be passed by environment variable from jobs or as command line argument or any another way if we use this script as pythonic library.

Blueprint information

Status:
Complete
Approver:
Andrey Danin
Priority:
Not
Drafter:
Igor Gajsin
Direction:
Needs approval
Assignee:
Igor Gajsin
Definition:
Obsolete
Series goal:
Proposed for future
Implementation:
Deferred
Milestone target:
None
Completed by
Andrey Danin

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.