Commit e173ca00 authored by Dionysis Grigoropoulos's avatar Dionysis Grigoropoulos
Browse files

cyclades: Set detail=True by default

* Set detail=True by default for networks and ports
* Update subnets to support /detail
parent b066f6c2
......@@ -82,7 +82,7 @@ def network_demux(request, network_id):
@api.api_method(http_method='GET', user_required=True, logger=log)
def list_networks(request, detail=False):
def list_networks(request, detail=True):
log.debug('list_networks detail=%s', detail)
user_networks = Network.objects.filter(Q(userid=request.user_uniq) |
......
......@@ -79,7 +79,7 @@ def port_demux(request, port_id):
@api.api_method(http_method='GET', user_required=True, logger=log)
def list_ports(request, detail=False):
def list_ports(request, detail=True):
log.debug('list_ports detail=%s', detail)
......
......@@ -52,6 +52,7 @@ log = getLogger(__name__)
urlpatterns = patterns(
'synnefo.api.subnets',
(r'^(?:/|.json|.xml)?$', 'demux'),
(r'^/detail(?:.json|.xml)?$', 'list_subnets', {'detail': True}),
(r'^/([-\w]+)(?:/|.json|.xml)?$', 'subnet_demux'))
......@@ -76,7 +77,7 @@ def subnet_demux(request, sub_id):
@api.api_method(http_method='GET', user_required=True, logger=log)
def list_subnets(request):
def list_subnets(request, detail=True):
"""List all subnets of a user"""
userid = request.user_uniq
subnets_list = Subnet.objects.filter(Q(network__public=True) |
......
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