X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=osdf%2Foptimizers%2Flicenseopt%2Fsimple_license_allocation.py;h=beafbe4f24267486ae9587827aecb4c0de4aff7e;hb=2d2ac618f8538fe243c292540fedfbf45e19b118;hp=1b5b670807a0812c9f1c5d1b88d8f562e1ffc10b;hpb=0b855c08fd98fb8fa0f4bc40d8df430c897b4bad;p=optf%2Fosdf.git diff --git a/osdf/optimizers/licenseopt/simple_license_allocation.py b/osdf/optimizers/licenseopt/simple_license_allocation.py index 1b5b670..beafbe4 100644 --- a/osdf/optimizers/licenseopt/simple_license_allocation.py +++ b/osdf/optimizers/licenseopt/simple_license_allocation.py @@ -19,10 +19,9 @@ import json from requests import RequestException -from osdf.datasources.sdc import sdc, constraint_handler +from osdf.adapters.sdc import sdc, constraint_handler from osdf.logging.osdf_logging import audit_log, metrics_log, MH from osdf.config.base import osdf_config -from osdf.utils import data_mapping def license_optim(request_json): @@ -36,11 +35,12 @@ def license_optim(request_json): config = osdf_config.deployment model_name = request_json['placementInfo']['serviceModelInfo']['modelName'] - service_name = data_mapping.get_service_type(model_name) + # service_name = data_mapping.get_service_type(model_name) + service_name = model_name license_info = [] - order_info = json.loads(request_json["placementInfo"]["orderInfo"]) + order_info = json.loads(request_json["placementInfo"]["requestParameters"]) if service_name == 'VPE': data_mapping.normalize_user_params(order_info) for licenseDemand in request_json['placementInfo']['demandInfo']['licenseDemand']: