]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Rackspace database resource output is null
authorVijendar Komalla <vijendar.komalla@RACKSPACE.COM>
Tue, 30 Jul 2013 18:52:17 +0000 (13:52 -0500)
committerVijendar Komalla <vijendar.komalla@RACKSPACE.COM>
Tue, 30 Jul 2013 18:52:28 +0000 (13:52 -0500)
This change is a small correction to my previous change that was
already merged(bug #1204601). Below given code snippets show the
one line code change
(Please note the change in return statement in below code)

code before this change:
        for link in dbinstance.links:
            if link['rel'] == 'self':
                return dbinstance.links[0]['href']

code with this change:
        for link in dbinstance.links:
            if link['rel'] == 'self':
                return link['href']

Fixes Bug #1204601

Change-Id: Ia81722eb3877e15e1c472e94ed845f3425949b68

heat/engine/resources/rackspace/clouddatabase.py

index c01f4fa3c7cbb64603df62ca4ad02c565a888a9c..ef344b92de6e27ebdd143e62f6622325b7dd98b8 100644 (file)
@@ -235,7 +235,7 @@ class CloudDBInstance(rackspace_resource.RackspaceResource):
 
         for link in dbinstance.links:
             if link['rel'] == 'self':
-                return dbinstance.links[0]['href']
+                return link['href']
 
     def _resolve_attribute(self, name):
         if name == 'hostname':