_run_test: report_dir
-$(Q)py.test \
- --osmhost $(OSM_HOSTNAME) \
+ --osmhost $(OSM_HOSTNAME) --sol005 \
$(OPTION_RO_HOSTNAME) \
$(OPTION_OS_AUTH_URL) \
$(OPTION_OS_USERNAME) \
def osm_add_options(parser):
parser.addoption("--osmhost", default="", help="osm hostname")
+ parse.addoption("--sol005",action="store_true", help="enable sol005 API")
parser.addoption("--osm_ro_host", default="", help="osm ro_host")
parser.addoption("--osm-descriptor-packages", default="", help="location of descriptor packages")
parser.addoption("--osm-vnfd-descriptor-packages", default="", help="vnfd packages to test")
def osm(request):
from lib.osm import osm
osmhost=request.config.getoption("--osmhost")
+ sol005=request.config.getoption("--sol005")
osm_ro_host=request.config.getoption("--osm_ro_host")
descriptors_dir=request.config.getoption("--osm-descriptor-packages")
vnfd_descriptors_list=request.config.getoption("--osm-vnfd-descriptor-packages").split(',')
ns_name_prefix=request.config.getoption("--osm-ns-name-prefix")
return osm.Osm(osmhost,
ro_host=osm_ro_host,
+ sol005=sol005
descriptors_dir=descriptors_dir,
vnfd_descriptors_list=vnfd_descriptors_list,
nsd_descriptors_list=nsd_descriptors_list,
# under the License.
-from osmclient.client import client
+from osmclient import client
class Osm():
- def __init__(self,osmhost,ro_host=None,descriptors_dir=None,vnfd_descriptors_list=None,nsd_descriptors_list=None,ns_name_prefix=None):
- self._OsmApi=client.Client(host=osmhost,ro_host=ro_host)
+ def __init__(self,osmhost,sol005=None,ro_host=None,descriptors_dir=None,vnfd_descriptors_list=None,nsd_descriptors_list=None,ns_name_prefix=None):
+ self._OsmApi=client.Client(host=osmhost,sol005=sol005,ro_host=ro_host)
self._descriptors_dir = descriptors_dir
self.vnfd_descriptors_list = vnfd_descriptors_list
self.nsd_descriptors_list = nsd_descriptors_list
resp=osm.get_api().vim.get(vim_name)
assert resp['name'] == vim_name
- assert resp['type'] == 'openstack'
+ assert resp['vim_type'] == 'openstack'
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 resp['vim_user'] == os_access['vim-username']
+ assert resp['vim_tenant_name'] == os_access['vim-tenant-name']
assert not osm.get_api().vim.delete(vim_name)
@pytest.mark.vmware
resp=osm.get_api().vim.get(vim_name)
assert resp['name'] == vim_name
- assert resp['type'] == 'vmware'
+ assert resp['vim_type'] == 'vmware'
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 resp['vim_user'] == os_access['vim-username']
+ assert resp['vim_tenant_name'] == os_access['vim-tenant-name']
assert not osm.get_api().vim.delete(vim_name)
#@pytest.mark.smoke
assert not osm.get_api().vim.create(vim['name'],os_access)
resp=osm.get_api().vim.get(vim['name'])
assert resp['name'] == vim['name']
- assert resp['type'] == vim['vim-type']
+ assert resp['vim_type'] == vim['vim-type']
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 resp['vim_user'] == os_access['vim-username']
+ assert resp['vim_tenant_name'] == os_access['vim-tenant-name']
for vim in osm.get_api().vim.list(False):
osm.get_api().vim.delete(vim['name'])