not condition

add name property to the openstack cluster entity

Change-Id: Icbd146e8773cbfa26a37a69e59f8705d5d37a851
This commit is contained in:
Alexey Weyl 2017-02-02 08:01:27 +00:00
parent 5237b7193a
commit 10006a9cbe
3 changed files with 11 additions and 6 deletions

View File

@ -64,6 +64,9 @@ notification_driver = messagingv2
notification_topics = notifications,vitrage_notifications
notification_driver = messagingv2
[oslo_messaging_notifications]
transport_url = rabbit://$RABBIT_USERID:$RABBIT_PASSWORD@$RABBIT_HOST:5672/
[[post-config|\$HEAT_CONF]]
[DEFAULT]
notification_topics = notifications,vitrage_notifications

View File

@ -85,7 +85,8 @@ class ZoneTransformer(ResourceTransformerBase):
neighbors = []
metadata = {
VProps.IS_PLACEHOLDER: False,
VProps.STATE: 'available'
VProps.STATE: 'available',
VProps.NAME: OPENSTACK_CLUSTER
}
cluster_neighbor = self._create_neighbor(entity_event,
CLUSTER_ID,

View File

@ -341,8 +341,6 @@ class BaseApiTest(base.BaseTestCase):
entities):
self.assertIsNotNone(graph)
self.assertIsNotNone(entities)
self.assertEqual(num_entities, graph.num_vertices())
self.assertEqual(num_edges, graph.num_edges())
for entity in entities:
query = {
@ -357,13 +355,16 @@ class BaseApiTest(base.BaseTestCase):
'%s%s' % ('Num vertices is incorrect for: ',
entity[VProps.TYPE]))
num_edges = sum([len(graph.get_edges(vertex.vertex_id))
entity_num_edges = sum([len(graph.get_edges(vertex.vertex_id))
for vertex in vertices])
self.assertEqual(entity[self.NUM_EDGES_PER_TYPE],
num_edges,
entity_num_edges,
'%s%s' % ('Num edges is incorrect for: ',
entity[VProps.TYPE]))
self.assertEqual(num_entities, graph.num_vertices())
self.assertEqual(num_edges, graph.num_edges())
@staticmethod
def _get_value(item, key):
return utils.uni2str(item[key])