From 2d2ac618f8538fe243c292540fedfbf45e19b118 Mon Sep 17 00:00:00 2001 From: Sastry Isukapalli Date: Sun, 11 Feb 2018 21:09:32 -0500 Subject: Removed unused DB-adapters, test cases, 60+% cover We are not using OracleDB, PostgresDB, and VerticaDB, so there is no need to keep the "dead code" -- we can always add it back as needed. Added test cases so that all the files are at least minimally covered. Overall coverage on my local tox shows 66% coverage (I manually ensured all files are included in the coverage report). Issue-ID: OPTFRA-95 Change-Id: If1cab112236b4f32a96315308ce815088fa092d1 Signed-off-by: Sastry Isukapalli --- osdf/optimizers/licenseopt/simple_license_allocation.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'osdf/optimizers') 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']: -- cgit 1.2.3-korg