Revision 56f5c6fc kamaki/clients/networking/rest_api.py
b/kamaki/clients/networking/rest_api.py | ||
---|---|---|
44 | 44 |
return self.get(path4url('networks'), **kwargs) |
45 | 45 |
|
46 | 46 |
def networks_post(self, json_data, **kwargs): |
47 |
return self.post(path4url('networks'), json=dumps(json_data), **kwargs)
|
|
47 |
return self.post(path4url('networks'), json=json_data, **kwargs)
|
|
48 | 48 |
|
49 | 49 |
def networks_put(self, network_id, json_data, **kwargs): |
50 | 50 |
return self.put( |
51 |
path4url('networks', network_id), json=dumps(json_data), **kwargs)
|
|
51 |
path4url('networks', network_id), json=json_data, **kwargs)
|
|
52 | 52 |
|
53 | 53 |
def networks_delete(self, network_id, **kwargs): |
54 | 54 |
return self.delete(path4url('networks', network_id), **kwargs) |
... | ... | |
59 | 59 |
return self.get(path4url('subnets'), **kwargs) |
60 | 60 |
|
61 | 61 |
def subnets_post(self, json_data, **kwargs): |
62 |
return self.post(path4url('subnets'), json=dumps(json_data), **kwargs)
|
|
62 |
return self.post(path4url('subnets'), json=json_data, **kwargs)
|
|
63 | 63 |
|
64 | 64 |
def subnets_put(self, subnet_id, **kwargs): |
65 | 65 |
return self.put(path4url('subnets', subnet_id), **kwargs) |
... | ... | |
81 | 81 |
self.set_param('mac_address', mac_address, iff=mac_address) |
82 | 82 |
self.set_param('fixed_ips', fixed_ips, iff=fixed_ips) |
83 | 83 |
self.set_param('security_groups', security_groups, iff=security_groups) |
84 |
data = dumps(json_data) if json_data else None |
|
85 |
return self.post(path4url('ports'), json=data, **kwargs) |
|
84 |
return self.post(path4url('ports'), json=json_data, **kwargs) |
|
86 | 85 |
|
87 | 86 |
def ports_put( |
88 | 87 |
self, port_id, |
... | ... | |
93 | 92 |
self.set_param('mac_address', mac_address, iff=mac_address) |
94 | 93 |
self.set_param('fixed_ips', fixed_ips, iff=fixed_ips) |
95 | 94 |
self.set_param('security_groups', security_groups, iff=security_groups) |
96 |
data = dumps(json_data) if json_data else None |
|
97 |
return self.put(path4url('ports', port_id), json=data, **kwargs) |
|
95 |
return self.put(path4url('ports', port_id), json=json_data, **kwargs) |
|
98 | 96 |
|
99 | 97 |
def ports_delete(self, port_id, **kwargs): |
100 | 98 |
return self.delete(path4url('ports', port_id), **kwargs) |
Also available in: Unified diff