summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2018-04-19 16:09:44 +0000
committerGerrit Code Review <gerrit@onap.org>2018-04-19 16:09:44 +0000
commitc48052c5351b3e7982ca2d82032b693b3e9f663d (patch)
treee4f6a47b22299823e3f1bfbce9b42c3a85215c21
parent822fbb46ec0dc47b58e7d50619115abb4bdc51c5 (diff)
parent42b6d9d7e21791acb0c1f33d159109dc44b2d905 (diff)
Merge "Add logic for defautl network resource receipe"
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java18
1 files changed, 14 insertions, 4 deletions
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java
index 27c94f0770..4fb5ebc1f8 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java
@@ -93,8 +93,8 @@ public class CatalogDatabase implements Closeable {
private static final String MODEL_TYPE = "modelType";
private static final String MODEL_VERSION_ID = "modelVersionId";
private static final String MODEL_CUSTOMIZATION_UUID = "modelCustomizationUuid";
- private static final String VF_MODULE_MODEL_UUID = "vfModuleModelUUId";
- private static final String NETWORK_SERVICE = "network service";
+ private static final String VF_MODULE_MODEL_UUID = "vfModuleModelUUId";
+ private static final String NETWORK_SERVICE = "network service";
protected static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.GENERAL);
@@ -4469,7 +4469,7 @@ public class CatalogDatabase implements Closeable {
/**
* Return a Network recipe that matches a given MODEL_UUID and ACTION
*
- * @param modelName
+ * @param networkModelUuid
* @param action
* @return NetworkRecipe object or null if none found
*/
@@ -4484,7 +4484,17 @@ public class CatalogDatabase implements Closeable {
}
NetworkRecipe recipe = getNetworkRecipeByNameVersion(networkResource.getModelName(), networkResource.getModelVersion(), action);
- return recipe;
+
+ if (recipe == null) {
+ recipe = getDefaultNetworkReceipe(action);
+ }
+
+ return recipe;
+ }
+
+ private NetworkRecipe getDefaultNetworkReceipe(String action) {
+ String modelName = "SDNC_DEFAULT";
+ return getNetworkRecipe(modelName, action);
}
/**