Revision 447365fe kamaki/clients/network/rest_api.py

b/kamaki/clients/network/rest_api.py
72 72
            return self.get(path4url('ports', port_id), **kwargs)
73 73
        return self.get(path4url('ports'), **kwargs)
74 74

  
75
    def ports_post(
76
            self,
77
            json_data=None,
78
            name=None, mac_address=None, fixed_ips=None, security_groups=None,
79
            **kwargs):
80
        self.set_param('name', name, iff=name)
81
        self.set_param('mac_address', mac_address, iff=mac_address)
82
        self.set_param('fixed_ips', fixed_ips, iff=fixed_ips)
83
        self.set_param('security_groups', security_groups, iff=security_groups)
75
    def ports_post(self, json_data=None, **kwargs):
84 76
        return self.post(path4url('ports'), json=json_data, **kwargs)
85 77

  
86
    def ports_put(
87
            self, port_id,
88
            json_data=None,
89
            name=None, mac_address=None, fixed_ips=None, security_groups=None,
90
            **kwargs):
91
        self.set_param('name', name, iff=name)
92
        self.set_param('mac_address', mac_address, iff=mac_address)
93
        self.set_param('fixed_ips', fixed_ips, iff=fixed_ips)
94
        self.set_param('security_groups', security_groups, iff=security_groups)
78
    def ports_put(self, port_id, json_data=None, **kwargs):
95 79
        return self.put(path4url('ports', port_id), json=json_data, **kwargs)
96 80

  
97 81
    def ports_delete(self, port_id, **kwargs):

Also available in: Unified diff