diff options
author | Vijay Venkatesh Kumar <vv770d@att.com> | 2020-01-24 22:05:00 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-01-24 22:05:00 +0000 |
commit | 7ca9a6e800a3512434fefffba1fc502e6fb5ac62 (patch) | |
tree | e74e315b8c26f262883bd5b7d30ba7487a9ee495 /mod/runtimeapi/runtime-web/src/main/java/org/onap/dcae/runtime/web/service/BlueprintInventory.java | |
parent | 2d5a46f5fa777495b8a88f8b630c4cd527cb85a6 (diff) | |
parent | 25cd97d9626dcc1cd3dd82b3ad5c934cdb137342 (diff) |
Merge "Improve mod/runtimeapi code coverage"
Diffstat (limited to 'mod/runtimeapi/runtime-web/src/main/java/org/onap/dcae/runtime/web/service/BlueprintInventory.java')
-rw-r--r-- | mod/runtimeapi/runtime-web/src/main/java/org/onap/dcae/runtime/web/service/BlueprintInventory.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mod/runtimeapi/runtime-web/src/main/java/org/onap/dcae/runtime/web/service/BlueprintInventory.java b/mod/runtimeapi/runtime-web/src/main/java/org/onap/dcae/runtime/web/service/BlueprintInventory.java index bb6839c..789c9d1 100644 --- a/mod/runtimeapi/runtime-web/src/main/java/org/onap/dcae/runtime/web/service/BlueprintInventory.java +++ b/mod/runtimeapi/runtime-web/src/main/java/org/onap/dcae/runtime/web/service/BlueprintInventory.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,6 +39,8 @@ public class BlueprintInventory { Logger logger = LoggerFactory.getLogger(BlueprintInventory.class); + private RestTemplate restTemplate = new RestTemplate(); + public void distributeToInventory(List<BlueprintVessel> blueprints) { for (BlueprintVessel bpv : blueprints) { JSONObject body = prepareBlueprintJsonObject(bpv.name, bpv.version, bpv.blueprint); @@ -51,7 +53,6 @@ public class BlueprintInventory { // Should work with inventory too! private boolean postToDashboard(JSONObject blueprintJsonObject){ //1. setup - RestTemplate restTemplate = new RestTemplate(); HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_JSON); // NOTE: This commented out line is to be used for dcae dashboard api and not inventory |