diff options
author | Kyrylo Romanenko <kromanenko@mirantis.com> | 2015-07-30 19:10:50 +0300 |
---|---|---|
committer | Kyrylo Romanenko <kromanenko@mirantis.com> | 2015-07-30 19:10:50 +0300 |
commit | c0c17099a54daabdcf3e6727f941d06ee9d50ba3 (patch) | |
tree | 09c8b0f9753ed6691908a5b8de577e6a4a379564 | |
parent | 9efeb79660b387a66820f3af5af3ce33753ddd98 (diff) | |
download | python-novaclient-c0c17099a54daabdcf3e6727f941d06ee9d50ba3.tar.gz |
Specify NIC option for nova boot
Choose first network from networks list and specify
it for nova boot. Otherwise nova can not boot instance
when more then one network available.
Change-Id: I4813f6fff3050e2141e3a5e8eb4d7d8919721703
-rw-r--r-- | novaclient/tests/functional/test_instances.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/novaclient/tests/functional/test_instances.py b/novaclient/tests/functional/test_instances.py index 8df28d13..8350b4f0 100644 --- a/novaclient/tests/functional/test_instances.py +++ b/novaclient/tests/functional/test_instances.py @@ -71,8 +71,10 @@ class TestInstanceCLI(base.ClientTestBase): name = str(uuid.uuid4()) # Boot via the cli, as we're primarily testing the cli in this test - self.nova('boot', params="--flavor %s --image %s %s --poll" % - (self.flavor.name, self.image.name, name)) + network = self.client.networks.list()[0] + self.nova('boot', + params="--flavor %s --image %s %s --nic net-id=%s --poll" % + (self.flavor.name, self.image.name, name, network.id)) # Be nice about cleaning up, however, use the API for this to avoid # parsing text. |