Revision 0db8331f kamaki/clients/network/__init__.py
b/kamaki/clients/network/__init__.py | ||
---|---|---|
52 | 52 |
|
53 | 53 |
def create_networks(self, networks): |
54 | 54 |
"""Atomic operation for batch network creation (all or nothing) |
55 |
|
|
55 | 56 |
:param networks: (list) [ |
56 | 57 |
{name: ..(str).., admin_state_up: ..(bool).., shared: ..(bool)..}, |
57 | 58 |
{name: ..(str).., admin_state_up: ..(bool).., shared: ..(bool)..}] |
58 | 59 |
name is mandatory, the rest is optional |
59 | 60 |
e.g., create_networks([ |
60 |
{name: 'net1', admin_state_up: True},
|
|
61 |
{name: 'net2'}])
|
|
61 |
{name: 'net1', admin_state_up: True}, |
|
62 |
{name: 'net2'}]) |
|
62 | 63 |
:returns: (list of dicts) created networks details |
63 | 64 |
:raises ValueError: if networks is misformated |
64 | 65 |
:raises ClientError: if the request failed or didn't return 201 |
... | ... | |
144 | 145 |
|
145 | 146 |
def create_subnets(self, subnets): |
146 | 147 |
"""Atomic operation for batch subnet creation (all or nothing) |
148 |
|
|
147 | 149 |
:param subnets: (list of dicts) {key: ...} with all parameters in the |
148 | 150 |
method create_subnet, where method mandatory / optional paramteres |
149 | 151 |
respond to mandatory / optional paramters in subnets items |
... | ... | |
255 | 257 |
|
256 | 258 |
def create_ports(self, ports): |
257 | 259 |
"""Atomic operation for batch port creation (all or nothing) |
260 |
|
|
258 | 261 |
:param ports: (list of dicts) {key: ...} with all parameters in the |
259 | 262 |
method create_port, where method mandatory / optional paramteres |
260 | 263 |
respond to mandatory / optional paramters in ports items |
Also available in: Unified diff