def test_get_private_flavor_project_member(self): novautils.get_all_flavors(self.nova_cloud_client) novautils.create_flavor(self.nova_cloud_client, self.LAST_FLAVOR_NAME, self.FLAVOR_RAM, self.FLAVOR_VCPUS, self.FLAVOR_DISK, self.LAST_FLAVOR_ID, public=False) #The cloud admin can give access novautils.add_flavor_tenant_access(self.nova_cloud_client, self.LAST_FLAVOR_ID, self.PROJECT_ID) # Any member can get the details novautils.get_flavor(self.nova_cloud_client, self.LAST_FLAVOR_ID) novautils.get_flavor(self.nova_project_admin_client, self.LAST_FLAVOR_ID) # A member from another project cannot access self.assertAnyRaise(lambda: novautils.get_flavor( self.other_nova_member_client, self.LAST_FLAVOR_ID)) novautils.delete_flavor(self.nova_cloud_client, self.LAST_FLAVOR_ID)
def test_get_private_flavor_project_member(self): novautils.get_all_flavors(self.nova_cloud_client) novautils.create_flavor(self.nova_cloud_client, self.LAST_FLAVOR_NAME, self.FLAVOR_RAM, self.FLAVOR_VCPUS, self.FLAVOR_DISK, self.LAST_FLAVOR_ID, public=False) #The cloud admin can give access novautils.add_flavor_tenant_access(self.nova_cloud_client, self.LAST_FLAVOR_ID, self.PROJECT_ID) # Any member can get the details novautils.get_flavor(self.nova_cloud_client, self.LAST_FLAVOR_ID) novautils.get_flavor(self.nova_project_admin_client, self.LAST_FLAVOR_ID) # A member from another project cannot access self.assertAnyRaise(lambda: novautils.get_flavor(self.other_nova_member_client, self.LAST_FLAVOR_ID)) novautils.delete_flavor(self.nova_cloud_client, self.LAST_FLAVOR_ID)
def test_project_admin_create_delete_flavors(self): novautils.create_flavor(self.nova_project_admin_client, self.FLAVOR_NAME, self.FLAVOR_RAM, self.FLAVOR_VCPUS, self.FLAVOR_DISK, self.FLAVOR_ID) novautils.get_all_flavors(self.nova_project_admin_client) novautils.delete_flavor(self.nova_project_admin_client, self.FLAVOR_ID)
def test_list_flavors(self): novautils.get_all_flavors(self.nova_project_admin_client) novautils.get_all_flavors(self.nova_cloud_client) novautils.get_all_flavors(self.other_nova_member_client)