summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main
diff options
context:
space:
mode:
authorChuanyu Chen <chenchuanyu@huawei.com>2018-03-07 09:25:57 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-07 09:25:57 +0000
commit5c45d1883426687d9a53dafc8e17f470aa661857 (patch)
tree9cb0a7f927ae88d8e2b3ab082e1d5028318b0594 /bpmn/MSOCommonBPMN/src/main
parent03defefa99d64546063ace83e646a22ce6101aee (diff)
parent79c821a5739100457cb85c57d3089db567bb7ab4 (diff)
Merge "Support get resource recipe groovy common method"
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CatalogDbUtils.groovy21
1 files changed, 21 insertions, 0 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CatalogDbUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CatalogDbUtils.groovy
index dd6e56acc7..921e0ee00d 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CatalogDbUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CatalogDbUtils.groovy
@@ -1203,4 +1203,25 @@ class CatalogDbUtils {
}
}
+
+ /**
+ * get resource recipe by resource model uuid and action
+ */
+ public JSONObject getResourceRecipe(Execution execution, String resourceModelUuid, String action) {
+ String endPoint = "/resourceRecipe?resourceModelUuid=" + UriUtils.encode(resourceModelUuid, "UTF-8")+ "&action=" + UriUtils.encode(action, "UTF-8")
+ JSONObject responseJson = null
+ try {
+ msoLogger.debug("ENDPOINT: " + endPoint)
+ String catalogDbResponse = getResponseFromCatalogDb(execution, endPoint)
+
+ if (catalogDbResponse != null) {
+ responseJson = new JSONObject(catalogDbResponse)
+ }
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return responseJson
+ }
} \ No newline at end of file