diff --git a/contrib/rackspace/heat/engine/plugins/cloud_loadbalancer.py b/contrib/rackspace/heat/engine/plugins/cloud_loadbalancer.py index c66ff99e02..538df497d0 100644 --- a/contrib/rackspace/heat/engine/plugins/cloud_loadbalancer.py +++ b/contrib/rackspace/heat/engine/plugins/cloud_loadbalancer.py @@ -431,9 +431,6 @@ class CloudLoadBalancer(rackspace_resource.RackspaceResource): except exception.StackValidationFailed as svf: return {'Error': str(svf)} - def FnGetRefId(self): - return unicode(self.name) - def _public_ip(self): #TODO(andrew-plunk) return list here and let caller choose ip for ip in self.clb.get(self.resource_id).virtual_ips: diff --git a/contrib/rackspace/heat/tests/test_cloud_loadbalancer.py b/contrib/rackspace/heat/tests/test_cloud_loadbalancer.py index aed5875cb9..d0772a692f 100644 --- a/contrib/rackspace/heat/tests/test_cloud_loadbalancer.py +++ b/contrib/rackspace/heat/tests/test_cloud_loadbalancer.py @@ -401,6 +401,18 @@ class LoadBalancerTest(HeatTestCase): scheduler.TaskRunner(rsrc.create)() self.m.VerifyAll() + def test_ref_id(self): + """The Reference ID of the resource is the resource ID.""" + template = self._set_template(self.lb_template) + rsrc, fake_loadbalancer = self._mock_loadbalancer(template, + self.lb_name, + self.expected_body) + self.m.ReplayAll() + scheduler.TaskRunner(rsrc.create)() + self.m.VerifyAll() + + self.assertEqual(rsrc.FnGetRefId(), rsrc.resource_id) + def test_post_creation_error_page(self): error_page = "REALLY BIG ERROR"