diff options
author | Zuul <zuul@review.opendev.org> | 2019-10-19 17:48:53 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2019-10-19 17:48:53 +0000 |
commit | 380fc0851387bd4c875afaebc0858646d061beb5 (patch) | |
tree | b1881d0c530991f302e472230b6ffbf5866647dd /novaclient/tests | |
parent | 71c29a184b388b38d81dc609b9883c5e8f7166cf (diff) | |
parent | f420c058513018132f36a743dcea069e4925370e (diff) | |
download | python-novaclient-380fc0851387bd4c875afaebc0858646d061beb5.tar.gz |
Merge "Add functional test for migration-list in v2.80"16.0.0
Diffstat (limited to 'novaclient/tests')
-rw-r--r-- | novaclient/tests/functional/v2/test_migrations.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/novaclient/tests/functional/v2/test_migrations.py b/novaclient/tests/functional/v2/test_migrations.py index 855d8ce5..34a03695 100644 --- a/novaclient/tests/functional/v2/test_migrations.py +++ b/novaclient/tests/functional/v2/test_migrations.py @@ -41,6 +41,8 @@ class TestMigrationList(base.ClientTestBase): # Find the source compute by getting OS-EXT-SRV-ATTR:host from the # nova show output. server = self.nova('show', params='%s' % server_id) + server_user_id = self._get_value_from_the_table(server, 'user_id') + tenant_id = self._get_value_from_the_table(server, 'tenant_id') source_compute = self._get_value_from_the_table( server, 'OS-EXT-SRV-ATTR:host') # now resize up @@ -97,3 +99,14 @@ class TestMigrationList(base.ClientTestBase): migrations = self._filter_migrations( '2.66', 'resize', uuidutils.generate_uuid()) self.assertNotIn(server_id, migrations) + + # Listing migrations with v2.80 and make sure there are the User ID + # and Project ID values in the output. + migrations = self.nova('migration-list', + flags='--os-compute-api-version 2.80') + user_id = self._get_column_value_from_single_row_table( + migrations, 'User ID') + self.assertEqual(server_user_id, user_id) + project_id = self._get_column_value_from_single_row_table( + migrations, 'Project ID') + self.assertEqual(tenant_id, project_id) |