Revision 0c37a721

b/snf-cyclades-app/synnefo/api/images.py
113 113
    #                       badRequest (400),
114 114
    #                       overLimit (413)
115 115
    
116
    log.info('list_images detail=%s', detail)
116
    log.debug('list_images detail=%s', detail)
117 117
    backend = ImageBackend(request.user_uniq)
118 118
    
119 119
    since = isoparse(request.GET.get('changes-since'))
......
167 167
    #                       itemNotFound (404),
168 168
    #                       overLimit (413)
169 169
    
170
    log.info('get_image_details %s', image_id)
170
    log.debug('get_image_details %s', image_id)
171 171
    image = util.get_image(image_id, request.user_uniq)
172 172
    reply = image_to_dict(image)
173 173
    
......
205 205
    #                       badRequest (400),
206 206
    #                       overLimit (413)
207 207
    
208
    log.info('list_image_metadata %s', image_id)
208
    log.debug('list_image_metadata %s', image_id)
209 209
    image = util.get_image(image_id, request.user_uniq)
210 210
    metadata = image['properties']
211 211
    return util.render_metadata(request, metadata, use_values=True, status=200)
......
251 251
    #                       badRequest (400),
252 252
    #                       overLimit (413)
253 253
    
254
    log.info('get_image_metadata_item %s %s', image_id, key)
254
    log.debug('get_image_metadata_item %s %s', image_id, key)
255 255
    image = util.get_image(image_id, request.user_uniq)
256 256
    val = image['properties'].get(key)
257 257
    if val is None:
b/snf-cyclades-app/synnefo/api/networks.py
118 118
    #                       badRequest (400),
119 119
    #                       overLimit (413)
120 120

  
121
    log.info('list_networks detail=%s', detail)
121
    log.debug('list_networks detail=%s', detail)
122 122
    since = util.isoparse(request.GET.get('changes-since'))
123 123
    user_networks = Network.objects.filter(Q(userid=request.user_uniq) |
124 124
                                           Q(public=True))
......
223 223
    #                       itemNotFound (404),
224 224
    #                       overLimit (413)
225 225

  
226
    log.info('get_network_details %s', network_id)
226
    log.debug('get_network_details %s', network_id)
227 227
    net = util.get_network(network_id, request.user_uniq)
228 228
    netdict = network_to_dict(net, request.user_uniq)
229 229
    return render_network(request, netdict)
......
285 285
@util.api_method('POST')
286 286
def network_action(request, network_id):
287 287
    req = util.get_request_dict(request)
288
    log.info('network_action %s %s', network_id, req)
288
    log.debug('network_action %s %s', network_id, req)
289 289
    if len(req) != 1:
290 290
        raise BadRequest('Malformed request.')
291 291

  
b/snf-cyclades-app/synnefo/api/servers.py
159 159
    #                       badRequest (400),
160 160
    #                       overLimit (413)
161 161

  
162
    log.info('list_servers detail=%s', detail)
162
    log.debug('list_servers detail=%s', detail)
163 163
    user_vms = VirtualMachine.objects.filter(userid=request.user_uniq)
164 164

  
165 165
    since = util.isoparse(request.GET.get('changes-since'))
......
259 259

  
260 260
    if backend is None:
261 261
        transaction.rollback()
262
        log.error("No available backends for VM with flavor %s", flavor)
262 263
        raise Exception
263 264
    transaction.commit()
264 265

  
......
266 267
        (network, address) = util.allocate_public_address(backend)
267 268
        if address is None:
268 269
            transaction.rollback()
270
            log.error("Public networks of backend %s are full", backend)
269 271
            raise faults.OverLimit("Can not allocate IP for new machine."
270 272
                                   " Public networks are full.")
271 273
        transaction.commit()
......
282 284
        imageid=image_id,
283 285
        flavor=flavor)
284 286

  
285
    log.info("Create VM %s, with NIC %s, on Backend %s", vm, nic, backend)
286

  
287 287
    try:
288 288
        jobID = create_instance(vm, nic, flavor, image, password, personality)
289 289
    except GanetiApiError:
290 290
        vm.delete()
291 291
        raise
292 292

  
293
    log.info("User %s created VM %s, NIC %s, Backend %s, JobID %s",
294
            request.user_uniq, vm, nic, backend, str(jobID))
295

  
293 296
    vm.backendjobid = jobID
294 297
    vm.save()
295 298

  
......
299 302
            meta_value=val,
300 303
            vm=vm)
301 304

  
302
    log.info('User %s created vm with %s cpus, %s ram and %s storage',
303
             request.user_uniq, flavor.cpu, flavor.ram, flavor.disk)
304

  
305 305
    server = vm_to_dict(vm, detail=True)
306 306
    server['status'] = 'BUILD'
307 307
    server['adminPass'] = password
......
322 322
    #                       itemNotFound (404),
323 323
    #                       overLimit (413)
324 324

  
325
    log.info('get_server_details %s', server_id)
325
    log.debug('get_server_details %s', server_id)
326 326
    vm = util.get_vm(server_id, request.user_uniq)
327 327
    server = vm_to_dict(vm, detail=True)
328 328
    return render_server(request, server)
......
376 376
@util.api_method('POST')
377 377
def server_action(request, server_id):
378 378
    req = util.get_request_dict(request)
379
    log.info('server_action %s %s', server_id, req)
379
    log.debug('server_action %s %s', server_id, req)
380 380
    vm = util.get_vm(server_id, request.user_uniq)
381 381
    if len(req) != 1:
382 382
        raise faults.BadRequest("Malformed request")
......
402 402
    #                       badRequest (400),
403 403
    #                       overLimit (413)
404 404

  
405
    log.info('list_addresses %s', server_id)
405
    log.debug('list_addresses %s', server_id)
406 406
    vm = util.get_vm(server_id, request.user_uniq)
407 407
    addresses = [nic_to_dict(nic) for nic in vm.nics.all()]
408 408

  
......
424 424
    #                       itemNotFound (404),
425 425
    #                       overLimit (413)
426 426

  
427
    log.info('list_addresses_by_network %s %s', server_id, network_id)
427
    log.debug('list_addresses_by_network %s %s', server_id, network_id)
428 428
    machine = util.get_vm(server_id, request.user_uniq)
429 429
    network = util.get_network(network_id, request.user_uniq)
430 430
    nic = util.get_nic(machine, network)
......
447 447
    #                       badRequest (400),
448 448
    #                       overLimit (413)
449 449

  
450
    log.info('list_server_metadata %s', server_id)
450
    log.debug('list_server_metadata %s', server_id)
451 451
    vm = util.get_vm(server_id, request.user_uniq)
452 452
    metadata = dict((m.meta_key, m.meta_value) for m in vm.metadata.all())
453 453
    return util.render_metadata(request, metadata, use_values=True, status=200)
......
493 493
    #                       badRequest (400),
494 494
    #                       overLimit (413)
495 495

  
496
    log.info('get_server_metadata_item %s %s', server_id, key)
496
    log.debug('get_server_metadata_item %s %s', server_id, key)
497 497
    vm = util.get_vm(server_id, request.user_uniq)
498 498
    meta = util.get_vm_meta(vm, key)
499 499
    d = {meta.meta_key: meta.meta_value}
......
566 566
    #                       itemNotFound (404),
567 567
    #                       overLimit (413)
568 568

  
569
    log.info('server_stats %s', server_id)
569
    log.debug('server_stats %s', server_id)
570 570
    vm = util.get_vm(server_id, request.user_uniq)
571 571
    #secret = util.encrypt(vm.backend_vm_id)
572 572
    secret = vm.backend_vm_id      # XXX disable backend id encryption

Also available in: Unified diff