aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-openstack-adapters/src/main
diff options
context:
space:
mode:
authorMnushkin, Dmitry <dmitry.mnushkin@att.com>2019-10-22 17:30:47 -0400
committerBenjamin, Max (mb388a) <mb388a@att.com>2019-10-22 17:30:47 -0400
commit9f6b254f0f1268a9754f547b44cee0f1bf5a48c7 (patch)
treeacee162f5f4ba7e0d82104b42bc22138f4d6c1c7 /adapters/mso-openstack-adapters/src/main
parent86f62530f1813152efbcc3d61f85e1fa6c943e36 (diff)
remove python heatstack method call, use java
remove python heatstack method call, use java Issue-ID: SO-2479 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I91c41cd8bd560e054cd2a87a6cbdaf0f5e86759a
Diffstat (limited to 'adapters/mso-openstack-adapters/src/main')
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java39
1 files changed, 4 insertions, 35 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
index 2c78e593a1..2769f1c9b8 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
@@ -414,34 +414,6 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
return new HashMap<>(stringInputs);
}
- protected boolean callHeatbridge(String heatStackId) {
- String executionDir = "/usr/local/lib/python2.7/dist-packages/heatbridge";
- String openstackIdentityUrl = "", username = "", password = "", tenant = "", region = "", owner = "";
- long waitTimeMs = 10000L;
- try {
- String[] cmdarray = {"/usr/bin/python", "HeatBridgeMain.py", openstackIdentityUrl, username, password,
- tenant, region, owner, heatStackId};
- String[] envp = null;
- File dir = new File(executionDir);
- logger.debug("Calling HeatBridgeMain.py in {} with arguments {}", dir, Arrays.toString(cmdarray));
- Runtime r = Runtime.getRuntime();
- Process p = r.exec(cmdarray, envp, dir);
- boolean wait = p.waitFor(waitTimeMs, TimeUnit.MILLISECONDS);
-
- logger.debug(" HeatBridgeMain.py returned {} with code {}", wait, p.exitValue());
- return wait && p.exitValue() == 0;
- } catch (IOException e) {
- logger.debug(" HeatBridgeMain.py failed with IO Exception! {}", e);
- return false;
- } catch (RuntimeException e) {
- logger.debug(" HeatBridgeMain.py failed during runtime! {}", e);
- return false;
- } catch (Exception e) {
- logger.debug(" HeatBridgeMain.py failed for unknown reasons! {}", e);
- return false;
- }
- }
-
private void heatbridge(StackInfo heatStack, String cloudOwner, String cloudSiteId, String tenantId,
String genericVnfName, String vfModuleId) {
try {
@@ -632,11 +604,6 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
vfRollback.setIsBase(isBaseRequest);
vfRollback.setModelCustomizationUuid(mcu);
- // Put data into A&AI through Heatstack
- if (enableBridge != null && enableBridge) {
- callHeatbridge(baseVfHeatStackId);
- }
-
// handle a nestedStackId if sent- this one would be for the volume - so applies to both Vf and Vnf
StackInfo nestedHeatStack = null;
Map<String, Object> nestedVolumeOutputs = null;
@@ -1156,8 +1123,10 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
}
}
logger.debug("VF Module {} successfully created", vfModuleName);
- // call heatbridge
- heatbridge(heatStack, cloudOwner, cloudSiteId, tenantId, genericVnfName, vfModuleId);
+ if (enableBridge != null && enableBridge) {
+ // call heatbridge
+ heatbridge(heatStack, cloudOwner, cloudSiteId, tenantId, genericVnfName, vfModuleId);
+ }
} catch (Exception e) {
logger.debug("unhandled exception in create VF", e);
throw new VnfException("Exception during create VF " + e.getMessage());