Modified fixtures to make generalise VIM accessfor vim create 87/2087/1
authorkasar <pkasar@vmware.com>
Thu, 24 Aug 2017 12:21:43 +0000 (05:21 -0700)
committerkasar <pkasar@vmware.com>
Thu, 24 Aug 2017 12:21:50 +0000 (05:21 -0700)
Change-Id: Ie703482232c3d836a2e897bec50c0d95dc055ce5
Signed-off-by: kasar <pkasar@vmware.com>
systest/lib/openstack/fixtures.py
systest/lib/vmware/fixtures.py
systest/testcases/vim/test_vim.py

index 7c1ec7f..e6953b7 100644 (file)
@@ -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'
 
index b81cdff..78ee80c 100644 (file)
@@ -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'
index 5432516..d622753 100644 (file)
@@ -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')