Fixes in LCM
[vfc/nfvo/driver/vnfm/svnfm.git] / nokiav2 / driver / src / main / java / org / onap / vfc / nfvo / driver / vnfm / svnfm / nokia / onap / direct / notification / VnfcManager.java
index bc31f4f..db65d2f 100644 (file)
@@ -27,6 +27,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.stereotype.Component;
 
+import static com.google.common.base.Splitter.on;
+import static com.google.common.collect.Lists.newArrayList;
 import static org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.util.CbamUtils.SEPARATOR;
 
 /**
@@ -46,6 +48,14 @@ public class VnfcManager extends AbstractManager {
         return vnfId + SEPARATOR + cbamVnfcId;
     }
 
+    /**
+     * @param onapVnfcId the identifier of the VNFC in AAI
+     * @return the identifier of the VNFC in CBAM
+     */
+    public static String buildCbamId(String onapVnfcId) {
+        return newArrayList(on(SEPARATOR).split(onapVnfcId)).get(1);
+    }
+
     @Override
     protected Logger getLogger() {
         return logger;