diff options
Diffstat (limited to 'dcaedt_catalog/asdc')
-rw-r--r-- | dcaedt_catalog/asdc/src/main/java/org/onap/sdc/dcae/client/ISdcClient.java | 2 | ||||
-rw-r--r-- | dcaedt_catalog/asdc/src/main/java/org/onap/sdc/dcae/client/SdcRestClient.java | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/dcaedt_catalog/asdc/src/main/java/org/onap/sdc/dcae/client/ISdcClient.java b/dcaedt_catalog/asdc/src/main/java/org/onap/sdc/dcae/client/ISdcClient.java index 9623d4c..77ff046 100644 --- a/dcaedt_catalog/asdc/src/main/java/org/onap/sdc/dcae/client/ISdcClient.java +++ b/dcaedt_catalog/asdc/src/main/java/org/onap/sdc/dcae/client/ISdcClient.java @@ -25,6 +25,8 @@ public interface ISdcClient { String addExternalMonitoringReference(String userId, CreateVFCMTRequest resource, ReferenceUUID vfcmtUuid, String requestId); + void updateExternalMonitoringReference(String userId, String contextType, String serviceUuid, String vfiName, String vfcmtUuid, ReferenceUUID updatedReference, String requestId); + void deleteExternalMonitoringReference(String userId, String contextType, String uuid, String vfiName, String vfcmtUuid, String requestId); ResourceDetailed createResource(String userId, CreateVFCMTRequest resource, String requestId); diff --git a/dcaedt_catalog/asdc/src/main/java/org/onap/sdc/dcae/client/SdcRestClient.java b/dcaedt_catalog/asdc/src/main/java/org/onap/sdc/dcae/client/SdcRestClient.java index 7b89465..e405ffc 100644 --- a/dcaedt_catalog/asdc/src/main/java/org/onap/sdc/dcae/client/SdcRestClient.java +++ b/dcaedt_catalog/asdc/src/main/java/org/onap/sdc/dcae/client/SdcRestClient.java @@ -126,6 +126,12 @@ public class SdcRestClient implements ISdcClient { return addExternalMonitoringReference(userId, resource.getContextType(), resource.getServiceUuid(), resource.getVfiName(), vfcmtUuid, requestId); } + public void updateExternalMonitoringReference(String userId, String contextType, String serviceUuid, String vfiName, String vfcmtUuid, ReferenceUUID updatedReference, String requestId) { + String url = buildRequestPath(AssetType.getSdcContextPath(contextType), serviceUuid, RESOURCE_INSTANCES_PATH, Normalizers.normalizeComponentInstanceName(vfiName), MONITORING_REFERENCES_PATH, vfcmtUuid); + debugLogger.log(LogLevel.DEBUG, this.getClass().getName(), "Updating external monitoring reference from service id {} vfi name {} to vfcmt {} URL={}", serviceUuid, vfiName, vfcmtUuid, url); + client.put(url, new HttpEntity<>(updatedReference, postResourceHeaders(userId, requestId))); + } + public void deleteExternalMonitoringReference(String userId, String contextType, String serviceUuid, String normalizeVfiName, String vfcmtUuid, String requestId) { String url = buildRequestPath(AssetType.getSdcContextPath(contextType), serviceUuid, RESOURCE_INSTANCES_PATH, normalizeVfiName, MONITORING_REFERENCES_PATH, vfcmtUuid); debugLogger.log(LogLevel.DEBUG, this.getClass().getName(), "Delete external monitoring reference from SDC asset. URL={}", url); |