Rename "network" to "uuid" in server create w. net 0.12rc3
authorStavros Sachtouris <saxtouri@admin.grnet.gr>
Mon, 9 Dec 2013 15:05:06 +0000 (17:05 +0200)
committerStavros Sachtouris <saxtouri@admin.grnet.gr>
Mon, 9 Dec 2013 15:05:50 +0000 (17:05 +0200)
kamaki/cli/commands/cyclades.py
kamaki/clients/compute/__init__.py

index 1849fc1..daf37ac 100644 (file)
@@ -430,8 +430,8 @@ class server_create(_init_cyclades, _optional_json, _server_wait):
             networks = []
         else:
             networks = [dict(uuid=netid) for netid in (
-                (self['network_id'] or []) + (self['network_id_and_ip'] or [])
-            )] or None
+                self['network_id'] or [])] + (self['network_id_and_ip'] or [])
+            networks = networks or None
         servers = [dict(
             name='%s%s' % (prefix, i if size > 1 else ''),
             flavor_id=flavor_id,
index a8a83fc..13e92d3 100644 (file)
@@ -130,8 +130,8 @@ class ComputeClient(ComputeRestClient):
 
         :param networks: (list of dicts) Networks to connect to, list this:
             "networks": [
-            {"network": <network_uuid>},
-            {"network": <network_uuid>, "fixed_ip": address},
+            {"uuid": <network_uuid>},
+            {"uuid": <network_uuid>, "fixed_ip": address},
             {"port": <port_id>}, ...]
             ATTENTION: Empty list is different to None. None means ' do not
             mention it', empty list means 'automatically get an ip'