Commit 64ddc038 authored by Mohamed Khalil Labidi's avatar Mohamed Khalil Labidi
Browse files

Fix infrastructure clean when removeClouds is called in SAL

parent c8bb615f
......@@ -633,13 +633,14 @@ public class PAGateway {
cloudIDs.forEach(cloudID -> {
PACloud cloud = EntityManagerHelper.find(PACloud.class, cloudID);
LOGGER.info("Removing cloud : " + cloud.toString());
connectorIaasGateway.deleteInfrastructure(cloud.getDummyInfrastructureName());
for (Map.Entry<String, String> entry : cloud.getDeployedRegions().entrySet()) {
try {
String nodeSourceName = cloud.getNodeSourceNamePrefix() + entry.getKey();
LOGGER.info("Removing node source " + nodeSourceName + " from the ProActive server.");
resourceManagerGateway.removeNodeSource(nodeSourceName, preempt);
} catch (NotConnectedException | PermissionRestException e) {
LOGGER.error(String.valueOf(e.getStackTrace()));
LOGGER.error(Arrays.toString(e.getStackTrace()));
}
}
if (cloud.getDeployments() != null) {
......
......@@ -51,7 +51,7 @@ public class PAConnectorIaasGateway {
LOGGER.info("requestUri = " + requestUri.toString());
if (connection.getResponseCode() != HttpURLConnection.HTTP_OK) {
LOGGER.warn("Failed : HTTP error code : " + connection.getResponseCode());
LOGGER.error("Failed : HTTP error code : " + connection.getResponseCode());
return null;
}
......@@ -81,7 +81,7 @@ public class PAConnectorIaasGateway {
LOGGER.info("requestUri = " + requestUri.toString());
if (connection.getResponseCode() != HttpURLConnection.HTTP_OK) {
LOGGER.warn("Failed : HTTP error code : " + connection.getResponseCode());
LOGGER.error("Failed : HTTP error code : " + connection.getResponseCode());
return null;
}
......@@ -111,7 +111,7 @@ public class PAConnectorIaasGateway {
LOGGER.debug("requestUri = " + requestUri.toString());
if (connection.getResponseCode() != HttpURLConnection.HTTP_OK) {
LOGGER.warn("Failed : HTTP error code : " + connection.getResponseCode());
LOGGER.error("Failed : HTTP error code : " + connection.getResponseCode());
return null;
}
......@@ -168,7 +168,7 @@ public class PAConnectorIaasGateway {
LOGGER.debug("requestUri = " + requestUri.toString());
if (connection.getResponseCode() != HttpURLConnection.HTTP_OK) {
LOGGER.warn("Failed : HTTP error code : " + connection.getResponseCode());
LOGGER.error("Failed : HTTP error code : " + connection.getResponseCode());
}
LOGGER.debug("Infrastructure defined successfully.");
......@@ -189,7 +189,7 @@ public class PAConnectorIaasGateway {
LOGGER.debug("requestUri = " + requestUri.toString());
if (connection.getResponseCode() != HttpURLConnection.HTTP_OK) {
LOGGER.warn("Failed : HTTP error code : " + connection.getResponseCode());
LOGGER.error("Failed : HTTP error code : " + connection.getResponseCode());
return null;
}
......@@ -222,7 +222,7 @@ public class PAConnectorIaasGateway {
LOGGER.debug("requestUri = " + requestUri.toString());
if (connection.getResponseCode() != HttpURLConnection.HTTP_OK) {
LOGGER.warn("Failed : HTTP error code : " + connection.getResponseCode());
LOGGER.error("Failed : HTTP error code : " + connection.getResponseCode());
}
LOGGER.debug("Infrastructure deleted successfully.");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment