diff options
author | vrvarma <vv8305@att.com> | 2018-11-01 10:46:18 -0400 |
---|---|---|
committer | vrvarma <vv8305@att.com> | 2018-11-01 11:36:15 -0400 |
commit | e8f00ec45adb71eac51e110ea19dd2bead78b2d3 (patch) | |
tree | 2ffe895b524b2c96e57461d3f95ebd5d14cb2211 /osdf/optimizers/pciopt/configdb.py | |
parent | 49570621115a7f5c89e607e52decb7aa583af4f6 (diff) |
oof changes for the new sdnr-configdb changes
OSDF changes required for the latest configdb api specs.
Improve performance building the minizinc request
Change-Id: I5558c96c13f3cac25d50aed61ded3ffa079df3f7
Signed-off-by: vrvarma <vv8305@att.com>
Issue-ID: OPTFRA-388
Diffstat (limited to 'osdf/optimizers/pciopt/configdb.py')
-rw-r--r-- | osdf/optimizers/pciopt/configdb.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/osdf/optimizers/pciopt/configdb.py b/osdf/optimizers/pciopt/configdb.py index bebc5c0..0e76884 100644 --- a/osdf/optimizers/pciopt/configdb.py +++ b/osdf/optimizers/pciopt/configdb.py @@ -42,20 +42,20 @@ def request(req_object, osdf_config, flat_policies): cell_list_response['network_id'] = network_id + ts = dt.strftime(dt.now(), '%Y-%m-%d %H:%M:%S%z') + rc = RestClient(userid=uid, passwd=passwd, method="GET", log_func=debug_log.debug, headers=headers) - cell_list_url = '{}/{}?networkId={}'.format(config['configDbUrl'], config['configDbGetCellListUrl'], network_id) + cell_list_url = '{}/{}/{}/{}'.format(config['configDbUrl'], config['configDbGetCellListUrl'], network_id, ts) cell_list_resp = rc.request(raw_response=True, url=cell_list_url) cell_resp = cell_list_resp.json() - ts = dt.strftime(dt.now(), '%Y-%m-%dT%H:%M:%S%z') cell_list = [] count = 0 for cell_id in cell_resp: cell_info = {'cell_id': cell_id, 'id': count} - nbr_list_url = '{}/{}?cellId={}&ts={}'.format(config['configDbUrl'], config['configDbGetNbrListUrl'], cell_id, - ts) + nbr_list_url = '{}/{}/{}/{}'.format(config['configDbUrl'], config['configDbGetNbrListUrl'], cell_id, ts) nbr_list_raw = rc.request(url=nbr_list_url, raw_response=True) cell_info['nbr_list'] = nbr_list_raw.json() cell_list.append(cell_info) |