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
This commit is contained in:
Kyrylo Romanenko 2015-07-30 19:10:50 +03:00
parent 9efeb79660
commit c0c17099a5

@ -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.