Correct "To create a server" SDK example

"To create a server" SDK example incorrectly used net_id instead of
net.id when assigning the network identifier to a NIC.

Change-Id: Ica993938c57e048f56c03c777ccdebae7ffdedfa
Closes-Bug: #1390347
backport: juno
This commit is contained in:
Stephen Gordon 2014-11-07 09:27:53 +01:00
parent 601f41b8b1
commit 404206136c

View File

@ -112,7 +112,7 @@ net = nova_client.networks.find(label="private")</programlisting>
<step> <step>
<para>To create the server, use the network, image, and <para>To create the server, use the network, image, and
flavor:</para> flavor:</para>
<programlisting language="python">nics = [{'net-id': net_id}] <programlisting language="python">nics = [{'net-id': net.id}]
instance = nova_client.servers.create(name="vm2", image=image, instance = nova_client.servers.create(name="vm2", image=image,
flavor=flavor, key_name="keypair-1", nics=nics)</programlisting> flavor=flavor, key_name="keypair-1", nics=nics)</programlisting>
</step> </step>