X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Fvim-emu.git;a=blobdiff_plain;f=src%2Femuvim%2Fapi%2Frest%2Fcompute.py;fp=src%2Femuvim%2Fapi%2Frest%2Fcompute.py;h=8d46aa2fa1a4f02025e45abb0b925a69ea26fdb3;hp=2ffa3e87f563ecdf14f1f5067ba92f2f5cf9c969;hb=33d768923110817c5c364cda695e4699c8431776;hpb=e261467f32cd8ce6ad524b874d156a084859f3f0 diff --git a/src/emuvim/api/rest/compute.py b/src/emuvim/api/rest/compute.py index 2ffa3e8..8d46aa2 100755 --- a/src/emuvim/api/rest/compute.py +++ b/src/emuvim/api/rest/compute.py @@ -174,16 +174,16 @@ class ComputeResources(Resource): # then no data if params is None: params = {} - logging.info("REST CALL: update container resources {0}".format(params)) + logging.debug("REST CALL: update container resources {0}".format(params)) #check if container exists d = dcs.get(dc_label).net.getNodeByName(compute_name) # general request of cpu percentage # create a mutable copy params = params.to_dict() - if 'cpu' in params: + if 'cpu_bw' in params: cpu_period = int(dcs.get(dc_label).net.cpu_period) - value = params.get('cpu') + value = params.get('cpu_bw') cpu_quota = int(cpu_period * float(value)) #put default values back if float(value) <= 0: