Exemplo n.º 1
0
 def test_make_it(self):
     sot = metering_label.MeteringLabel(**EXAMPLE)
     self.assertEqual(EXAMPLE['description'], sot.description)
     self.assertEqual(EXAMPLE['id'], sot.id)
     self.assertEqual(EXAMPLE['name'], sot.name)
     self.assertEqual(EXAMPLE['tenant_id'], sot.project_id)
     self.assertEqual(EXAMPLE['shared'], sot.is_shared)
Exemplo n.º 2
0
 def test_basic(self):
     sot = metering_label.MeteringLabel()
     self.assertEqual('metering_label', sot.resource_key)
     self.assertEqual('metering_labels', sot.resources_key)
     self.assertEqual('/metering/metering-labels', sot.base_path)
     self.assertTrue(sot.allow_create)
     self.assertTrue(sot.allow_fetch)
     self.assertTrue(sot.allow_commit)
     self.assertTrue(sot.allow_delete)
     self.assertTrue(sot.allow_list)
 def test_basic(self):
     sot = metering_label.MeteringLabel()
     self.assertEqual('metering_label', sot.resource_key)
     self.assertEqual('metering_labels', sot.resources_key)
     self.assertEqual('/v2.0/metering-labels', sot.base_path)
     self.assertEqual('network', sot.service.service_type)
     self.assertTrue(sot.allow_create)
     self.assertTrue(sot.allow_retrieve)
     self.assertTrue(sot.allow_update)
     self.assertTrue(sot.allow_delete)
     self.assertTrue(sot.allow_list)
Exemplo n.º 4
0
 def get_metering_label(self, **data):
     return metering_label.MeteringLabel(data).get(self.session)
Exemplo n.º 5
0
 def create_metering_label(self, **data):
     return metering_label.MeteringLabel(data).create(self.session)
Exemplo n.º 6
0
 def delete_metering_label(self, **data):
     metering_label.MeteringLabel(data).delete(self.session)