Revision 6de57f9c snf-cyclades-app/synnefo/neutron/subnet_views.py
b/snf-cyclades-app/synnefo/neutron/subnet_views.py | ||
---|---|---|
57 | 57 |
|
58 | 58 |
def subnet_demux(request, offset): |
59 | 59 |
if request.method == 'GET': |
60 |
#return get_network(request,offset) |
|
61 |
return HttpResponse("in subnet det get") |
|
60 |
return get_network(request, offset) |
|
62 | 61 |
elif request.method == 'DELETE': |
63 | 62 |
#return delete_network(request,offset) |
64 | 63 |
return HttpResponse("in subnet det delete") |
... | ... | |
71 | 70 |
|
72 | 71 |
@api.api_method(http_method='GET', user_required=True, logger=log) |
73 | 72 |
def list_subnets(request): |
74 |
'''Placeholder'''
|
|
73 |
'''List all subnets of a user'''
|
|
75 | 74 |
log.debug('list_subnets') |
76 | 75 |
|
77 | 76 |
user_subnets = Subnet.objects.filter(network__userid=request.user_uniq) |
... | ... | |
119 | 118 |
|
120 | 119 |
@api.api_method(http_method='GET', user_required=True, logger=log) |
121 | 120 |
def get_subnet(request, offset): |
122 |
'''Placeholder'''
|
|
121 |
'''Show info of a specific subnet'''
|
|
123 | 122 |
try: |
124 | 123 |
subnet = Subnet.objects.get(id=offset) |
125 | 124 |
except Subnet.DoesNotExist: |
... | ... | |
132 | 131 |
|
133 | 132 |
@api.api_method(http_method='DELETE', user_required=True, logger=log) |
134 | 133 |
def delete_subnet(request, offset): |
135 |
'''Placeholder'''
|
|
134 |
'''Delete a subnet'''
|
|
136 | 135 |
try: |
137 | 136 |
subnet = Subnet.objects.get(id=offset) |
138 | 137 |
except Subnet.DoesNotExist: |
Also available in: Unified diff