Commit 0c3c41fa authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

cyclades: Log userid in create requests

parent cb82bfb9
......@@ -141,9 +141,9 @@ def allocate_floating_ip(request):
req = utils.get_request_dict(request)
floating_ip_dict = api.utils.get_attribute(req, "floatingip",
required=True, attr_type=dict)
log.info('allocate_floating_ip %s', req)
userid = request.user_uniq
log.info('allocate_floating_ip user: %s request: %s', userid, req)
# the network_pool is a mandatory field
network_id = api.utils.get_attribute(floating_ip_dict,
......
......@@ -110,7 +110,7 @@ def list_networks(request, detail=True):
def create_network(request):
userid = request.user_uniq
req = api.utils.get_request_dict(request)
log.info('create_network %s', req)
log.info('create_network user: %s request: %s', userid, req)
network_dict = api.utils.get_attribute(req, "network",
attr_type=dict)
......
......@@ -105,7 +105,7 @@ def list_ports(request, detail=True):
def create_port(request):
user_id = request.user_uniq
req = api.utils.get_request_dict(request)
log.info('create_port %s', req)
log.info('create_port user: %s request: %s', user_id, req)
port_dict = api.utils.get_attribute(req, "port", attr_type=dict)
net_id = api.utils.get_attribute(port_dict, "network_id",
......
......@@ -370,8 +370,8 @@ def create_server(request):
# serverCapacityUnavailable (503),
# overLimit (413)
req = utils.get_request_dict(request)
log.info('create_server %s', req)
user_id = request.user_uniq
log.info('create_server user: %s request: %s', user_id, req)
try:
server = req['server']
......
......@@ -102,7 +102,8 @@ def create_subnet(request):
"""
dictionary = utils.get_request_dict(request)
log.info('create subnet %s', dictionary)
user_id = request.user_uniq
log.info('create subnet user: %s request: %s', user_id, dictionary)
try:
subnet = dictionary['subnet']
......@@ -153,7 +154,7 @@ def create_subnet(request):
dns_nameservers=dns,
allocation_pools=allocation_pools,
host_routes=hosts,
user_id=request.user_uniq)
user_id=user_id)
subnet_dict = subnet_to_dict(sub)
data = json.dumps({'subnet': subnet_dict})
......
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