diff options
author | Tait,Trevor(rt0435) <rtait@amdocs.com> | 2018-10-26 13:27:54 -0400 |
---|---|---|
committer | Leigh, Phillip (pl876u) <phillip.leigh@amdocs.com> | 2018-10-26 15:28:46 -0400 |
commit | f6a725a0b5b6864c09443e7f328927772a78ea05 (patch) | |
tree | 9a7aec7d4a93059e28ea1b15eee2576f1ad87c5a /src/main/java/org/onap/pomba/contextbuilder/sdnc/handlers/GenericResourceApiHandler.java | |
parent | b5f75d3996fbfd270e301abbe38766a9f6cf3a40 (diff) |
SDNC context builder API Mapping Configuration
Issue-ID: LOG-421
Add code to use the VNF-API on SDNC where required.
This involves using the api-mapping logic to select the VNF-API over the
GNERIC-RESOURCES-API as well as adding the code to extract the
information required by the VNF-API from AAI and adding the code to
parse the VNF-API resonse into ModelContext.
Change-Id: I4447a14d7fa39b2c5d9b655c2b20e651e56d3d77
Signed-off-by: Tait,Trevor(rt0435) <rtait@amdocs.com>
Diffstat (limited to 'src/main/java/org/onap/pomba/contextbuilder/sdnc/handlers/GenericResourceApiHandler.java')
-rw-r--r-- | src/main/java/org/onap/pomba/contextbuilder/sdnc/handlers/GenericResourceApiHandler.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/onap/pomba/contextbuilder/sdnc/handlers/GenericResourceApiHandler.java b/src/main/java/org/onap/pomba/contextbuilder/sdnc/handlers/GenericResourceApiHandler.java index 885c923..09e1d6b 100644 --- a/src/main/java/org/onap/pomba/contextbuilder/sdnc/handlers/GenericResourceApiHandler.java +++ b/src/main/java/org/onap/pomba/contextbuilder/sdnc/handlers/GenericResourceApiHandler.java @@ -43,11 +43,11 @@ public class GenericResourceApiHandler { @Autowired private String sdncGenericResourcePath; - + private String specPath = "config/sdncgenericresource.spec"; public ModelContext process(Exchange exchange) throws Exception { - ModelContext context; + ModelContext context = new ModelContext(); log.info("in GENERIC-RESOURCE-API HANDLER: "); ServiceEntity serviceEntity = (ServiceEntity)exchange.getIn().getBody(); @@ -55,7 +55,7 @@ public class GenericResourceApiHandler { try { String sdncResponse = RestUtil.getSdncGenericResource(jerseyClient, sdncBaseUrl, sdncBasicAuthorization, sdncGenericResourcePath, serviceInstanceId); - context = RestUtil.transform(sdncResponse); + context = RestUtil.transformGenericResource(sdncResponse, specPath); } catch (AuditException ae) { throw ae; } catch (Exception e) { |