summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/java
diff options
context:
space:
mode:
authorLiang Ding <liang.ding@intel.com>2019-02-18 18:54:04 -0800
committerOfir Sonsino <ofir.sonsino@intl.att.com>2019-02-24 09:19:43 +0000
commit42160a6a1cb7ff34daffec3564318ee477009c07 (patch)
tree365858755be2f43b12ff177467ad298f291afaa2 /catalog-be/src/main/java
parent154106346785b023a173fff0115bc97434e93891 (diff)
fix a POL500 issue
when creating a VSPfrom a tosca VNF, a POL500 was reported Change-Id: I8d942b81689f35cdeb16aa4b0925371394bb639c Issue-ID: SDC-1983 Signed-off-by: Liang Ding <liang.ding@intel.com>
Diffstat (limited to 'catalog-be/src/main/java')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java
index efbaaa61db..82f7c32524 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java
@@ -5106,11 +5106,15 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
actualVfName = vfResourceName;
actualType = nodeResourceType;
}
-
+ String nameWithouNamespacePrefix;
try {
StringBuilder toscaResourceName = new StringBuilder(Constants.USER_DEFINED_RESOURCE_NAMESPACE_PREFIX);
- String nameWithouNamespacePrefix = nodeTypeFullName
+ if (!nodeTypeFullName.contains(Constants.USER_DEFINED_RESOURCE_NAMESPACE_PREFIX)){
+ nameWithouNamespacePrefix = nodeTypeFullName;
+ } else {
+ nameWithouNamespacePrefix = nodeTypeFullName
.substring(Constants.USER_DEFINED_RESOURCE_NAMESPACE_PREFIX.length());
+ }
String[] findTypes = nameWithouNamespacePrefix.split("\\.");
String resourceType = findTypes[0];
String actualName = nameWithouNamespacePrefix.substring(resourceType.length());
@@ -5181,4 +5185,4 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic {
return super.shouldUpgradeToLatestDerived(clonedComponent);
}
}
-} \ No newline at end of file
+}