From f834e20a75108f81506e62e7139de95ad8e81002 Mon Sep 17 00:00:00 2001 From: kasar Date: Thu, 24 Aug 2017 05:21:43 -0700 Subject: [PATCH] Modified fixtures to make generalise VIM accessfor vim create Change-Id: Ie703482232c3d836a2e897bec50c0d95dc055ce5 Signed-off-by: kasar --- systest/lib/openstack/fixtures.py | 8 ++++---- systest/lib/vmware/fixtures.py | 8 ++++---- systest/testcases/vim/test_vim.py | 16 ++++++++-------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/systest/lib/openstack/fixtures.py b/systest/lib/openstack/fixtures.py index 7c1ec7f5..e6953b7f 100644 --- a/systest/lib/openstack/fixtures.py +++ b/systest/lib/openstack/fixtures.py @@ -28,10 +28,10 @@ def openstack_add_options(parser): def openstack(request): from lib.openstack import openstack access = {} - access['os-url'] = request.config.getoption("--os-url") - access['os-username'] = request.config.getoption("--os-username") - access['os-password'] = request.config.getoption("--os-password") - access['os-project-name'] = request.config.getoption("--os-project-name") + access['vim-url'] = request.config.getoption("--os-url") + access['vim-username'] = request.config.getoption("--os-username") + access['vim-password'] = request.config.getoption("--os-password") + access['vim-tenant-name'] = request.config.getoption("--os-project-name") access['vim-type'] = 'openstack' access['description'] = 'pytest system test' diff --git a/systest/lib/vmware/fixtures.py b/systest/lib/vmware/fixtures.py index b81cdff0..78ee80c3 100644 --- a/systest/lib/vmware/fixtures.py +++ b/systest/lib/vmware/fixtures.py @@ -36,10 +36,10 @@ def vmware_add_options(parser): def vmware(request): from lib.vmware import vmware access = {} - access['vcd-url'] = request.config.getoption("--vcd-url") - access['vcd-username'] = request.config.getoption("--vcd-username") - access['vcd-password'] = request.config.getoption("--vcd-password") - access['vcd-tenant-name'] = request.config.getoption("--vcd-tenant-name") + access['vim-url'] = request.config.getoption("--vcd-url") + access['vim-username'] = request.config.getoption("--vcd-username") + access['vim-password'] = request.config.getoption("--vcd-password") + access['vim-tenant-name'] = request.config.getoption("--vcd-tenant-name") access['config'] = request.config.getoption("--config") access['vim-type'] = 'vmware' access['description'] = 'pytest system test' diff --git a/systest/testcases/vim/test_vim.py b/systest/testcases/vim/test_vim.py index 54325168..d622753c 100644 --- a/systest/testcases/vim/test_vim.py +++ b/systest/testcases/vim/test_vim.py @@ -43,10 +43,10 @@ class TestClass(object): resp=osm.get_api().vim.get('pytest') assert resp['name'] == 'pytest' assert resp['type'] == 'openstack' - assert resp['vim_url'] == os_access['os-url'] - assert resp['vim_url_admin'] == os_access['os-url'] - assert resp['vim_tenants'][0]['user'] == os_access['os-username'] - assert resp['vim_tenants'][0]['vim_tenant_name'] == os_access['os-project-name'] + assert resp['vim_url'] == os_access['vim-url'] + assert resp['vim_url_admin'] == os_access['vim-url'] + assert resp['vim_tenants'][0]['user'] == os_access['vim-username'] + assert resp['vim_tenants'][0]['vim_tenant_name'] == os_access['vim-tenant-name'] assert not osm.get_api().vim.delete('pytest') @@ -58,9 +58,9 @@ class TestClass(object): resp=osm.get_api().vim.get('pytest') assert resp['name'] == 'pytest' assert resp['type'] == 'vmware' - assert resp['vim_url'] == os_access['vcd-url'] - assert resp['vim_url_admin'] == os_access['vcd-url'] - assert resp['vim_tenants'][0]['user'] == os_access['vcd-username'] - assert resp['vim_tenants'][0]['vim_tenant_name'] == os_access['vcd-tenant-name'] + assert resp['vim_url'] == os_access['vim-url'] + assert resp['vim_url_admin'] == os_access['vim-url'] + assert resp['vim_tenants'][0]['user'] == os_access['vim-username'] + assert resp['vim_tenants'][0]['vim_tenant_name'] == os_access['vim-tenant-name'] assert not osm.get_api().vim.delete('pytest') -- 2.25.1