Commit e8ba3e9f authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

Re-fix expected codes in network-libs (sorry)

parent 8ac8898f
......@@ -175,6 +175,8 @@ class Shell(Cmd):
tmp_args.pop('verbose', None)
tmp_args.pop('silent', None)
tmp_args.pop('config', None)
print 'YOLO >>>\n\t', '\n\t'.join([
('%s %s %s' % k, v, v.value) for k, v in args.items()])
help_parser = ArgumentParseManager(
cmd_name, tmp_args, required, syntax=syntax, description=descr)
return help_parser.print_help
......
......@@ -251,7 +251,7 @@ class CycladesNetworkClient(NetworkClient):
'Invalid format for "fixed_ips"', details=[
'fixed_ips format: [{"ip_address": IPv4}, ...]'])
port['fixed_ips'] = fixed_ips
r = self.ports_post(json_data=dict(port=port), success=200)
r = self.ports_post(json_data=dict(port=port), success=201)
return r.json['port']
def create_floatingip(self, floating_network_id, floating_ip_address=''):
......
......@@ -180,7 +180,7 @@ class NetworkClient(NetworkRestClient, Waiter):
return r.json['subnets']
def get_subnet_details(self, subnet_id):
r = self.subnets_get(subnet_id, success=200)
r = self.subnets_get(subnet_id, success=201)
return r.json
def update_subnet(
......@@ -250,7 +250,7 @@ class NetworkClient(NetworkRestClient, Waiter):
port['fixed_ips'] = fixed_ips
if security_groups:
port['security_groups'] = security_groups
r = self.ports_post(json_data=dict(port=port), success=200)
r = self.ports_post(json_data=dict(port=port), success=201)
return r.json['port']
def create_ports(self, ports):
......@@ -280,7 +280,7 @@ class NetworkClient(NetworkRestClient, Waiter):
assert port.get('network_id', None), msg
except AssertionError as ae:
raise ValueError('%s' % ae)
r = self.ports_post(json_data=dict(ports=list(ports)), success=200)
r = self.ports_post(json_data=dict(ports=list(ports)), success=201)
return r.json['ports']
def get_port_details(self, port_id):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment