]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Remove service name from nova() def
authorSteven Dake <sdake@redhat.com>
Thu, 21 Jun 2012 22:05:00 +0000 (15:05 -0700)
committerSteven Dake <sdake@redhat.com>
Thu, 21 Jun 2012 22:05:00 +0000 (15:05 -0700)
The service_name field is not unique between distros or versions of
openstack, but is used to select endpoints for communication with nova
and volume services.  The nova client will sort out the correct operation
based upon the service_type field.

The service_name field should probably just be removed from the API
definition upstream.

Tested on F16 & Devstack U12.

Change-Id: I36409dba9d9ec2b453a027fc1e2e78f7c8ace2a2
Signed-off-by: Steven Dake <sdake@redhat.com>
heat/engine/resources.py

index 2764feb73e1c6e25aea78ae4d97984c4e1aba19a..c9072a1aa960eca1a0dd87a3eacab4f8ad5649f1 100644 (file)
@@ -120,11 +120,6 @@ class Resource(object):
         if service_type in self._nova:
             return self._nova[service_type]
 
-        if service_type == 'compute':
-            service_name = 'nova'
-        else:
-            service_name = None
-
         con = self.stack.context
         self._nova[service_type] = nc.Client(con.username,
                                              con.password,
@@ -132,8 +127,7 @@ class Resource(object):
                                              con.auth_url,
                                              proxy_token=con.auth_token,
                                              proxy_tenant_id=con.tenant_id,
-                                             service_type=service_type,
-                                             service_name=service_name)
+                                             service_type=service_type)
         return self._nova[service_type]
 
     def calculate_properties(self):