def test_describe_hosts_volume(self): db.service_create(self._c, {'host': 'volume1', 'binary': "engine-volume", 'topic': 'volume', 'report_count': 0, 'availability_zone': "zone1"}) hosts = self._ac.describe_hosts(self._c)['hosts'] self.assertEqual('volume1', hosts[0]['hostname'])
def test_describe_hosts_volume(self): db.service_create( self._c, { 'host': 'volume1', 'binary': "engine-volume", 'topic': 'volume', 'report_count': 0, 'availability_zone': "zone1" }) hosts = self._ac.describe_hosts(self._c)['hosts'] self.assertEqual('volume1', hosts[0]['hostname'])
def _create_service_ref(self, context): zone = FLAGS.node_availability_zone service_ref = db.service_create(context, {'host': self.host, 'binary': self.binary, 'topic': self.topic, 'report_count': 0, 'availability_zone': zone}) self.service_id = service_ref['id']