Renamed 'servicevm' in python-tackerclient
After renaming the service 'servicevm' and 'advsvc' in install file, functional tests were failing. Now renamed to 'tacker' in all files of python-tackerclient repo so that functional test wouldn't fail. Change-Id: I919d77276af72586a20f50239166325adbf9fb11 Partial-Bug: #1524224
This commit is contained in:
		 an.abdulrehman
					an.abdulrehman
				
			
				
					committed by
					
						 Abdul Rehman
						Abdul Rehman
					
				
			
			
				
	
			
			
			 Abdul Rehman
						Abdul Rehman
					
				
			
						parent
						
							d621916252
						
					
				
				
					commit
					5903bc9338
				
			| @@ -56,7 +56,7 @@ class HTTPClient(object): | |||||||
|                  endpoint_url=None, insecure=False, |                  endpoint_url=None, insecure=False, | ||||||
|                  endpoint_type='publicURL', |                  endpoint_type='publicURL', | ||||||
|                  auth_strategy='keystone', ca_cert=None, log_credentials=False, |                  auth_strategy='keystone', ca_cert=None, log_credentials=False, | ||||||
|                  service_type='servicevm', |                  service_type='nfv-orchestration', | ||||||
|                  **kwargs): |                  **kwargs): | ||||||
|  |  | ||||||
|         self.username = username |         self.username = username | ||||||
| @@ -256,7 +256,7 @@ class HTTPClient(object): | |||||||
|  |  | ||||||
|         body = json.loads(body) |         body = json.loads(body) | ||||||
|         for endpoint in body.get('endpoints', []): |         for endpoint in body.get('endpoints', []): | ||||||
|             if (endpoint['type'] == 'servicevm' and |             if (endpoint['type'] == 'nfv-orchestration' and | ||||||
|                     endpoint.get('region') == self.region_name): |                     endpoint.get('region') == self.region_name): | ||||||
|                 if self.endpoint_type not in endpoint: |                 if self.endpoint_type not in endpoint: | ||||||
|                     raise exceptions.EndpointTypeNotFound( |                     raise exceptions.EndpointTypeNotFound( | ||||||
| @@ -359,7 +359,7 @@ def construct_http_client(username=None, | |||||||
|                           log_credentials=None, |                           log_credentials=None, | ||||||
|                           auth_strategy='keystone', |                           auth_strategy='keystone', | ||||||
|                           ca_cert=None, |                           ca_cert=None, | ||||||
|                           service_type='servicevm', |                           service_type='nfv-orchestration', | ||||||
|                           session=None, |                           session=None, | ||||||
|                           **kwargs): |                           **kwargs): | ||||||
|  |  | ||||||
|   | |||||||
| @@ -248,8 +248,10 @@ class TackerShell(app.App): | |||||||
|  |  | ||||||
|         parser.add_argument( |         parser.add_argument( | ||||||
|             '--os-service-type', metavar='<os-service-type>', |             '--os-service-type', metavar='<os-service-type>', | ||||||
|             default=env('OS_SERVICEVM_SERVICE_TYPE', default='servicevm'), |             default=env('OS_TACKER_SERVICE_TYPE', | ||||||
|             help=_('Defaults to env[OS_SERVICEVM_SERVICE_TYPE] or servicevm.')) |                         default='nfv-orchestration'), | ||||||
|  |             help=_('Defaults to env[OS_TACKER_SERVICE_TYPE] or \ | ||||||
|  |                     nfv-orchestration.')) | ||||||
|  |  | ||||||
|         parser.add_argument( |         parser.add_argument( | ||||||
|             '--os-endpoint-type', metavar='<os-endpoint-type>', |             '--os-endpoint-type', metavar='<os-endpoint-type>', | ||||||
| @@ -260,7 +262,8 @@ class TackerShell(app.App): | |||||||
|         # backward compatibility. |         # backward compatibility. | ||||||
|         parser.add_argument( |         parser.add_argument( | ||||||
|             '--service-type', metavar='<service-type>', |             '--service-type', metavar='<service-type>', | ||||||
|             default=env('OS_SERVICEVM_SERVICE_TYPE', default='servicevm'), |             default=env('OS_TACKER_SERVICE_TYPE', | ||||||
|  |                         default='nfv-orchestration'), | ||||||
|             help=_('DEPRECATED! Use --os-service-type.')) |             help=_('DEPRECATED! Use --os-service-type.')) | ||||||
|  |  | ||||||
|         # FIXME(bklei): --endpoint-type is deprecated but kept in for |         # FIXME(bklei): --endpoint-type is deprecated but kept in for | ||||||
| @@ -669,7 +672,8 @@ class TackerShell(app.App): | |||||||
|  |  | ||||||
|         super(TackerShell, self).initialize_app(argv) |         super(TackerShell, self).initialize_app(argv) | ||||||
|  |  | ||||||
|         self.api_version = {'servicevm': self.api_version} |         self.api_version = {'nfv-orchestration': | ||||||
|  |                             self.api_version} | ||||||
|  |  | ||||||
|         # If the user is not asking for help, make sure they |         # If the user is not asking for help, make sure they | ||||||
|         # have given us auth. |         # have given us auth. | ||||||
|   | |||||||
| @@ -19,7 +19,7 @@ from tackerclient.common import utils | |||||||
| from tackerclient.openstack.common.gettextutils import _ | from tackerclient.openstack.common.gettextutils import _ | ||||||
|  |  | ||||||
|  |  | ||||||
| API_NAME = 'servicevm' | API_NAME = 'nfv-orchestration' | ||||||
| API_VERSIONS = { | API_VERSIONS = { | ||||||
|     '1.0': 'tackerclient.v1_0.client.Client', |     '1.0': 'tackerclient.v1_0.client.Client', | ||||||
| } | } | ||||||
|   | |||||||
| @@ -353,7 +353,7 @@ class TackerCommandMeta(abc.ABCMeta): | |||||||
| @six.add_metaclass(TackerCommandMeta) | @six.add_metaclass(TackerCommandMeta) | ||||||
| class TackerCommand(command.OpenStackCommand): | class TackerCommand(command.OpenStackCommand): | ||||||
|  |  | ||||||
|     api = 'servicevm' |     api = 'nfv-orchestration' | ||||||
|     values_specs = [] |     values_specs = [] | ||||||
|     json_indent = None |     json_indent = None | ||||||
|  |  | ||||||
| @@ -409,7 +409,7 @@ class CreateCommand(TackerCommand, show.ShowOne): | |||||||
|  |  | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     api = 'servicevm' |     api = 'nfv-orchestration' | ||||||
|     resource = None |     resource = None | ||||||
|     log = None |     log = None | ||||||
|     remove_output_fields = [] |     remove_output_fields = [] | ||||||
| @@ -455,7 +455,7 @@ class UpdateCommand(TackerCommand): | |||||||
|     """Update resource's information |     """Update resource's information | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     api = 'servicevm' |     api = 'nfv-orchestration' | ||||||
|     resource = None |     resource = None | ||||||
|     log = None |     log = None | ||||||
|     allow_names = True |     allow_names = True | ||||||
| @@ -503,7 +503,7 @@ class DeleteCommand(TackerCommand): | |||||||
|  |  | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     api = 'servicevm' |     api = 'nfv-orchestration' | ||||||
|     resource = None |     resource = None | ||||||
|     log = None |     log = None | ||||||
|     allow_names = True |     allow_names = True | ||||||
| @@ -543,7 +543,7 @@ class ListCommand(TackerCommand, lister.Lister): | |||||||
|  |  | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     api = 'servicevm' |     api = 'nfv-orchestration' | ||||||
|     resource = None |     resource = None | ||||||
|     log = None |     log = None | ||||||
|     _formatters = {} |     _formatters = {} | ||||||
| @@ -642,7 +642,7 @@ class ShowCommand(TackerCommand, show.ShowOne): | |||||||
|  |  | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     api = 'servicevm' |     api = 'nfv-orchestration' | ||||||
|     resource = None |     resource = None | ||||||
|     log = None |     log = None | ||||||
|     allow_names = True |     allow_names = True | ||||||
|   | |||||||
| @@ -52,7 +52,7 @@ KS_TOKEN_RESULT = { | |||||||
|                             'internalURL': ENDPOINT_URL, |                             'internalURL': ENDPOINT_URL, | ||||||
|                             'publicURL': ENDPOINT_URL, |                             'publicURL': ENDPOINT_URL, | ||||||
|                             'region': REGION}], |                             'region': REGION}], | ||||||
|              'type': 'servicevm', |              'type': 'nfv-orchestration', | ||||||
|              'name': 'Tacker Service'} |              'name': 'Tacker Service'} | ||||||
|         ] |         ] | ||||||
|     } |     } | ||||||
| @@ -60,7 +60,7 @@ KS_TOKEN_RESULT = { | |||||||
|  |  | ||||||
| ENDPOINTS_RESULT = { | ENDPOINTS_RESULT = { | ||||||
|     'endpoints': [{ |     'endpoints': [{ | ||||||
|         'type': 'servicevm', |         'type': 'nfv-orchestration', | ||||||
|         'name': 'Tacker Service', |         'name': 'Tacker Service', | ||||||
|         'region': REGION, |         'region': REGION, | ||||||
|         'adminURL': ENDPOINT_URL, |         'adminURL': ENDPOINT_URL, | ||||||
|   | |||||||
| @@ -127,8 +127,10 @@ class ShellTest(testtools.TestCase): | |||||||
|             token='', url='', auth_url='http://127.0.0.1:5000/', |             token='', url='', auth_url='http://127.0.0.1:5000/', | ||||||
|             tenant_name='test', tenant_id='tenant_id', |             tenant_name='test', tenant_id='tenant_id', | ||||||
|             username='test', user_id='', |             username='test', user_id='', | ||||||
|             password='test', region_name='', api_version={'servicevm': '1.0'}, |             password='test', region_name='', | ||||||
|             auth_strategy='keystone', service_type='servicevm', |             api_version={'nfv-orchestration': '1.0'}, | ||||||
|  |             auth_strategy='keystone', | ||||||
|  |             service_type='nfv-orchestration', | ||||||
|             endpoint_type='publicURL', insecure=False, ca_cert=None, |             endpoint_type='publicURL', insecure=False, ca_cert=None, | ||||||
|             log_credentials=True) |             log_credentials=True) | ||||||
|         tacker_shell.run_subcommand(['device-template-list']) |         tacker_shell.run_subcommand(['device-template-list']) | ||||||
|   | |||||||
| @@ -118,7 +118,7 @@ class TestSSL(testtools.TestCase): | |||||||
|         ) |         ) | ||||||
|         self.mox.ReplayAll() |         self.mox.ReplayAll() | ||||||
|  |  | ||||||
|         version = {'servicevm': '1.0'} |         version = {'nfv-orchestration': '1.0'} | ||||||
|         ClientManager(ca_cert=CA_CERT, |         ClientManager(ca_cert=CA_CERT, | ||||||
|                       api_version=version, |                       api_version=version, | ||||||
|                       url=END_URL, |                       url=END_URL, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user