import org.openecomp.vid.asdc.beans.tosca.Group;\r
import org.openecomp.vid.asdc.beans.tosca.ToscaModel;\r
import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.vid.controller.VidController;\r
import org.openecomp.vid.properties.VidProperties;\r
/**\r
* The Class ServiceModel.\r
*/\r
+@SuppressWarnings("ALL")\r
public class ServiceModel {\r
\r
/** The Constant LOG. */\r
\r
return service;\r
}\r
- public void extractGroups (ToscaModel serviceToscaModel) {\r
+ public static void extractGroups (ToscaModel serviceToscaModel,ServiceModel serviceModel) {\r
// Get the groups. The groups may duplicate the groups that are in the VNF model and have\r
// additional data like the VF module customization String>\r
\r
final Map<String, VfModule> vfModules = new HashMap<String, VfModule> ();\r
final Map<String, VolumeGroup> volumeGroups = new HashMap<String, VolumeGroup> ();\r
- String asdcModelNamespaces[] = VidProperties.getAsdcModelNamespace();\r
- String[] vfModuleTags = ModelUtil.getTags(asdcModelNamespaces, ModelConstants.VF_MODULE);\r
- \r
+ \r
+ String asdcModelNamespace = VidProperties.getAsdcModelNamespace();\r
+ String vfModuleTag = asdcModelNamespace + ModelConstants.VF_MODULE;\r
+ \r
for (Entry<String, Group> component : serviceToscaModel.gettopology_template().getGroups().entrySet()) {\r
final Group group = component.getValue();\r
final String type = group.getType();\r
final String customizationName = component.getKey();\r
\r
- if ( ModelUtil.isType (type, vfModuleTags) ) {\r
+ if (type.startsWith(vfModuleTag)) {\r
VfModule vfMod = VfModule.extractVfModule(customizationName, group);\r
vfModules.put(customizationName, vfMod);\r
if ( vfMod.isVolumeGroupAllowed() ) {\r
}\r
}\r
// add this point vfModules and volume groups are disconnected from VNF\r
- this.setVfModules (vfModules);\r
- this.setVolumeGroups (volumeGroups);\r
+ serviceModel.setVfModules (vfModules);\r
+ serviceModel.setVolumeGroups (volumeGroups);\r
\r
}\r
/**\r