Beispiel #1
0
    def test_cloud_admin_list_server(self):
        server_cloud_admin = novautils.create_server(self.nova_cloud_client,
                                                     self.CLOUD_ADMIN_SERVER,
                                                     self.IMAGE_ID,
                                                     self.FLAVOR_TINY_ID)

        server_project_admin = novautils.create_server(
            self.nova_project_admin_client, self.PROJECT_ADMIN_SERVER,
            self.IMAGE_ID, self.FLAVOR_TINY_ID)

        servers = novautils.get_all_servers(self.nova_cloud_client)
        self.assertTrue(server_cloud_admin in servers)
        self.assertTrue(server_project_admin in servers)

        servers_member_same_project = novautils.get_all_servers(
            self.nova_member_client)
        self.assertTrue(server_cloud_admin in servers_member_same_project)
        self.assertTrue(server_project_admin in servers_member_same_project)

        servers_member_other_project = novautils.get_all_servers(
            self.other_nova_member_client)
        self.assertFalse(server_cloud_admin in servers_member_other_project)
        self.assertFalse(server_project_admin in servers_member_other_project)

        servers_same_project = novautils.get_all_servers(
            self.nova_project_admin_client)
        self.assertTrue(server_cloud_admin in servers_same_project)
        self.assertTrue(server_project_admin in servers_same_project)

        servers_another_project = novautils.get_all_servers(
            self.other_nova_project_admin_client)
        self.assertFalse(server_cloud_admin in servers_another_project)
        self.assertFalse(server_project_admin in servers_another_project)

        server_cloud_id = server_cloud_admin.id
        server_project_id = server_project_admin.id
        novautils.delete_server(self.nova_project_admin_client,
                                server_project_id)
        novautils.delete_server(self.nova_cloud_client, server_cloud_id)
Beispiel #2
0
    def test_cloud_admin_list_server(self):
        server_cloud_admin = novautils.create_server(self.nova_cloud_client,
                                self.CLOUD_ADMIN_SERVER,
                                self.IMAGE_ID,
                                self.FLAVOR_TINY_ID)

        server_project_admin = novautils.create_server(self.nova_project_admin_client,
                                self.PROJECT_ADMIN_SERVER,
                                self.IMAGE_ID,
                                self.FLAVOR_TINY_ID)

        servers = novautils.get_all_servers(self.nova_cloud_client)
        self.assertTrue(server_cloud_admin in servers)
        self.assertTrue(server_project_admin in servers)

        servers_member_same_project = novautils.get_all_servers(self.nova_member_client)
        self.assertTrue(server_cloud_admin in servers_member_same_project)
        self.assertTrue(server_project_admin in servers_member_same_project)

        servers_member_other_project = novautils.get_all_servers(self.other_nova_member_client)
        self.assertFalse(server_cloud_admin in servers_member_other_project)
        self.assertFalse(server_project_admin in servers_member_other_project)

        servers_same_project = novautils.get_all_servers(self.nova_project_admin_client)
        self.assertTrue(server_cloud_admin in servers_same_project)
        self.assertTrue(server_project_admin in servers_same_project)

        servers_another_project = novautils.get_all_servers(self.other_nova_project_admin_client)
        self.assertFalse(server_cloud_admin in servers_another_project)
        self.assertFalse(server_project_admin in servers_another_project)

        server_cloud_id = server_cloud_admin.id
        server_project_id = server_project_admin.id
        novautils.delete_server(self.nova_project_admin_client,
                                  server_project_id)
        novautils.delete_server(self.nova_cloud_client,
                                  server_cloud_id)
Beispiel #3
0
 def test_project_member_list_servers(self):
     novautils.get_all_servers(self.other_nova_member_client)
Beispiel #4
0
 def test_cloud_admin_list_servers(self):
     novautils.get_all_servers(self.nova_cloud_client)
Beispiel #5
0
 def test_project_admin_list_servers(self):
     novautils.get_all_servers(self.nova_project_admin_client)
Beispiel #6
0
 def test_project_member_list_servers(self):
     novautils.get_all_servers(self.other_nova_member_client)
Beispiel #7
0
 def test_cloud_admin_list_servers(self):
     novautils.get_all_servers(self.nova_cloud_client)
Beispiel #8
0
 def test_project_admin_list_servers(self):
     novautils.get_all_servers(self.nova_project_admin_client)