aboutsummaryrefslogtreecommitdiffstats
path: root/osdf/optimizers/licenseopt/simple_license_allocation.py
diff options
context:
space:
mode:
authorSastry Isukapalli <sastry@research.att.com>2018-03-22 00:58:14 -0400
committerSastry Isukapalli <sastry@research.att.com>2018-03-22 05:06:43 +0000
commit139176363ab87c7ae55ef1f224182c66a4d8fc2c (patch)
treeba69da5cec799ccf49577db4cfc17cb21338ece9 /osdf/optimizers/licenseopt/simple_license_allocation.py
parent1a9638f5d5fc78f7e8be700e71b506fed3cc9d2d (diff)
Fix "brain-overload" functions flagged by SONAR
Refactored two brain-overload functions Moved a policy util function from conductor/api_builder.py to policy/utils.py Issue-ID: OPTFRA-195 Change-Id: I879e7f4f5d92cc530c66d3ed071bf5246397ba13 Signed-off-by: Sastry Isukapalli <sastry@research.att.com>
Diffstat (limited to 'osdf/optimizers/licenseopt/simple_license_allocation.py')
-rw-r--r--osdf/optimizers/licenseopt/simple_license_allocation.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/osdf/optimizers/licenseopt/simple_license_allocation.py b/osdf/optimizers/licenseopt/simple_license_allocation.py
index ad9acfc..74d220f 100644
--- a/osdf/optimizers/licenseopt/simple_license_allocation.py
+++ b/osdf/optimizers/licenseopt/simple_license_allocation.py
@@ -31,10 +31,10 @@ def license_optim(request_json):
license_info = []
- for licenseDemand in request_json.get('placementInfo', {}).get('demandInfo', {}).get('licenseDemands', []):
+ for demand in request_json.get('placementInfo', {}).get('demandInfo', {}).get('licenseDemands', []):
license_info.append(
- {'serviceResourceId': licenseDemand['serviceResourceId'],
- 'resourceModuleName': licenseDemand['resourceModuleName'],
+ {'serviceResourceId': demand['serviceResourceId'],
+ 'resourceModuleName': demand['resourceModuleName'],
'entitlementPoolList': "NOT SUPPORTED",
'licenseKeyGroupList': "NOT SUPPORTED"
})