- self.nova = nClient.Client(2, **self.n_creds)
- self.keystone = ksClient.Client(**self.k_creds)
+ if self.osc_api_version == 'v3.3':
+ self.nova = nClient(APIVersion(version_str='2'), **self.n_creds)
+ self.keystone = ksClient.Client(**self.k_creds)
+ self.ne_endpoint=self.keystone.service_catalog.url_for(service_type='network', endpoint_type='publicURL')
+ self.neutron = neClient.Client(APIVersion(version_str='2'), endpoint_url=self.ne_endpoint, token=self.keystone.auth_token, **self.k_creds)
+ else:
+ self.nova = nClient_v2.Client('2', **self.n_creds)
+ self.keystone = ksClient_v2.Client(**self.k_creds)
+ self.ne_endpoint=self.keystone.service_catalog.url_for(service_type='network', endpoint_type='publicURL')
+ self.neutron = neClient_v2.Client('2.0', endpoint_url=self.ne_endpoint, token=self.keystone.auth_token, **self.k_creds)