aboutsummaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/GlanceClientImpl.java14
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java8
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java7
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java21
4 files changed, 50 insertions, 0 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/GlanceClientImpl.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/GlanceClientImpl.java
index 7a9fdfe70b..b614a92177 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/GlanceClientImpl.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/GlanceClientImpl.java
@@ -28,6 +28,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import com.woorea.openstack.base.client.OpenStackRequest;
import com.woorea.openstack.glance.Glance;
+import com.woorea.openstack.glance.model.Image;
import com.woorea.openstack.glance.model.Images;
@Component
@@ -84,4 +85,17 @@ public class GlanceClientImpl extends MsoCommonUtils {
}
}
+ public Image queryImage(String cloudSiteId, String tenantId, String imageId)
+ throws MsoCloudSiteNotFound, GlanceClientException {
+ try {
+ Glance glanceClient = getGlanceClient(cloudSiteId, tenantId);
+ // list is set to false, otherwise an invalid URL is appended
+ OpenStackRequest<Image> request = glanceClient.images().show(imageId);
+ return executeAndRecordOpenstackRequest(request, false);
+ } catch (MsoException e) {
+ logger.error("Error building Glance Client", e);
+ throw new GlanceClientException("Error building Glance Client", e);
+ }
+ }
+
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java
index dcf33da128..a00b9f9002 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java
@@ -272,6 +272,14 @@ public class HeatBridgeImpl implements HeatBridgeApi {
} else {
lIf.setInterfaceRole(port.getvNicType());
}
+ boolean isL2Multicast = false;
+ if (port.getProfile().get("trusted") != null) {
+ String trusted = port.getProfile().get("trusted").toString();
+ if (Boolean.parseBoolean(trusted)) {
+ isL2Multicast = true;
+ }
+ }
+ lIf.setL2Multicasting(isL2Multicast);
updateLInterfaceIps(port, lIf);
updateLInterfaceVlan(port, lIf);
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java
index 84ff054a7c..7feaa9c4c3 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java
@@ -27,6 +27,7 @@ import javax.xml.bind.annotation.XmlElement;
import org.onap.so.adapters.requestsdb.exceptions.MsoRequestsDbException;
import org.onap.so.db.request.beans.InfraActiveRequests;
import org.onap.so.db.request.beans.InstanceNfvoMapping;
+import org.onap.so.db.request.beans.OperationStatus;
import org.onap.so.db.request.beans.ResourceOperationStatus;
/**
@@ -77,6 +78,12 @@ public interface MsoRequestsDbAdapter {
public boolean getSiteStatus(@WebParam(name = "siteName") @XmlElement(required = true) String siteName);
@WebMethod
+ public OperationStatus getServiceOperationStatus(
+ @WebParam(name = "serviceId") @XmlElement(required = true) String serviceId,
+ @WebParam(name = "operationId") @XmlElement(required = false) String operationId)
+ throws MsoRequestsDbException;
+
+ @WebMethod
public void updateServiceOperationStatus(
@WebParam(name = "serviceId") @XmlElement(required = true) String serviceId,
@WebParam(name = "operationId") @XmlElement(required = false) String operationId,
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
index b262cb21cb..8782cce34a 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
@@ -222,6 +222,27 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
}
/**
+ * get the operation status
+ *
+ * @param serviceId
+ * @param operationId
+ * @return operationStatus
+ * @throws MsoRequestsDbException
+ */
+ @Override
+ @Transactional
+ public OperationStatus getServiceOperationStatus(String serviceId, String operationId)
+ throws MsoRequestsDbException {
+ OperationStatus operationStatus;
+ if (operationId.isEmpty()) {
+ operationStatus = operationStatusRepository.findOneByServiceId(serviceId);
+ } else {
+ operationStatus = operationStatusRepository.findOneByServiceIdAndOperationId(serviceId, operationId);
+ }
+ return operationStatus;
+ }
+
+ /**
* update operation status <br>
*
* @param serviceId