Revision e8ba3e9f
b/kamaki/cli/command_shell.py | ||
---|---|---|
175 | 175 |
tmp_args.pop('verbose', None) |
176 | 176 |
tmp_args.pop('silent', None) |
177 | 177 |
tmp_args.pop('config', None) |
178 |
print 'YOLO >>>\n\t', '\n\t'.join([ |
|
179 |
('%s %s %s' % k, v, v.value) for k, v in args.items()]) |
|
178 | 180 |
help_parser = ArgumentParseManager( |
179 | 181 |
cmd_name, tmp_args, required, syntax=syntax, description=descr) |
180 | 182 |
return help_parser.print_help |
b/kamaki/clients/cyclades/__init__.py | ||
---|---|---|
251 | 251 |
'Invalid format for "fixed_ips"', details=[ |
252 | 252 |
'fixed_ips format: [{"ip_address": IPv4}, ...]']) |
253 | 253 |
port['fixed_ips'] = fixed_ips |
254 |
r = self.ports_post(json_data=dict(port=port), success=200)
|
|
254 |
r = self.ports_post(json_data=dict(port=port), success=201)
|
|
255 | 255 |
return r.json['port'] |
256 | 256 |
|
257 | 257 |
def create_floatingip(self, floating_network_id, floating_ip_address=''): |
b/kamaki/clients/network/__init__.py | ||
---|---|---|
180 | 180 |
return r.json['subnets'] |
181 | 181 |
|
182 | 182 |
def get_subnet_details(self, subnet_id): |
183 |
r = self.subnets_get(subnet_id, success=200)
|
|
183 |
r = self.subnets_get(subnet_id, success=201)
|
|
184 | 184 |
return r.json |
185 | 185 |
|
186 | 186 |
def update_subnet( |
... | ... | |
250 | 250 |
port['fixed_ips'] = fixed_ips |
251 | 251 |
if security_groups: |
252 | 252 |
port['security_groups'] = security_groups |
253 |
r = self.ports_post(json_data=dict(port=port), success=200)
|
|
253 |
r = self.ports_post(json_data=dict(port=port), success=201)
|
|
254 | 254 |
return r.json['port'] |
255 | 255 |
|
256 | 256 |
def create_ports(self, ports): |
... | ... | |
280 | 280 |
assert port.get('network_id', None), msg |
281 | 281 |
except AssertionError as ae: |
282 | 282 |
raise ValueError('%s' % ae) |
283 |
r = self.ports_post(json_data=dict(ports=list(ports)), success=200)
|
|
283 |
r = self.ports_post(json_data=dict(ports=list(ports)), success=201)
|
|
284 | 284 |
return r.json['ports'] |
285 | 285 |
|
286 | 286 |
def get_port_details(self, port_id): |
Also available in: Unified diff