예제 #1
0
 def test_make_it(self):
     sot = server_group.ServerGroup(**EXAMPLE)
     self.assertEqual(EXAMPLE['id'], sot.id)
     self.assertEqual(EXAMPLE['name'], sot.name)
     self.assertEqual(EXAMPLE['members'], sot.member_ids)
     self.assertEqual(EXAMPLE['metadata'], sot.metadata)
     self.assertEqual(EXAMPLE['policies'], sot.policies)
예제 #2
0
 def test_basic(self):
     sot = server_group.ServerGroup()
     self.assertEqual('server_group', sot.resource_key)
     self.assertEqual('server_groups', sot.resources_key)
     self.assertEqual('/os-server-groups', sot.base_path)
     self.assertEqual('compute', sot.service.service_type)
     self.assertTrue(sot.allow_create)
     self.assertTrue(sot.allow_retrieve)
     self.assertFalse(sot.allow_update)
     self.assertTrue(sot.allow_delete)
     self.assertTrue(sot.allow_list)
예제 #3
0
    def test_basic(self):
        sot = server_group.ServerGroup()
        self.assertEqual('server_group', sot.resource_key)
        self.assertEqual('server_groups', sot.resources_key)
        self.assertEqual('/os-server-groups', sot.base_path)
        self.assertEqual('compute', sot.service.service_type)
        self.assertTrue(sot.allow_create)
        self.assertTrue(sot.allow_get)
        self.assertFalse(sot.allow_update)
        self.assertTrue(sot.allow_delete)
        self.assertTrue(sot.allow_list)

        self.assertDictEqual({"all_projects": "all_projects"},
                             sot._query_mapping._mapping)
예제 #4
0
    def test_basic(self):
        sot = server_group.ServerGroup()
        self.assertEqual('server_group', sot.resource_key)
        self.assertEqual('server_groups', sot.resources_key)
        self.assertEqual('/os-server-groups', sot.base_path)
        self.assertTrue(sot.allow_create)
        self.assertTrue(sot.allow_fetch)
        self.assertFalse(sot.allow_commit)
        self.assertTrue(sot.allow_delete)
        self.assertTrue(sot.allow_list)

        self.assertDictEqual(
            {
                "all_projects": "all_projects",
                "limit": "limit",
                "marker": "marker"
            }, sot._query_mapping._mapping)