Revision 76c8e33d api/handlers.py
b/api/handlers.py | ||
---|---|---|
309 | 309 |
class ServerAddressHandler(BaseHandler): |
310 | 310 |
allowed_methods = ('GET', 'PUT', 'DELETE') |
311 | 311 |
|
312 |
def read(self, request, id, type=None):
|
|
312 |
def read(self, request, id, networkID=None):
|
|
313 | 313 |
"""List IP addresses for a server""" |
314 | 314 |
|
315 |
if type is None: |
|
316 |
pass |
|
317 |
elif type == "private": |
|
318 |
pass |
|
319 |
elif type == "public": |
|
315 |
if networkID is None: |
|
320 | 316 |
pass |
321 | 317 |
return {} |
322 | 318 |
|
323 |
def update(self, request, id, address):
|
|
319 |
def update(self, request, id, networkID=None):
|
|
324 | 320 |
"""Share an IP address to another in the group""" |
325 | 321 |
return accepted |
326 | 322 |
|
327 |
def delete(self, request, id, address):
|
|
323 |
def delete(self, request, id, networkID=None):
|
|
328 | 324 |
"""Unshare an IP address""" |
329 | 325 |
return accepted |
330 | 326 |
|
Also available in: Unified diff