@Override public VCPENetworkModel getPhysicalInfrastructureSuggestion() throws VCPENetworkManagerException { VCPENetworkModel generated = MPTemplateModelBuilder.generatePhysicalElements(); VCPENetworkModel suggestion = suggestor.getSuggestionForPhysicalModel(generated); return suggestion; }
private VCPENetworkModel getLogicalInfrastructureSuggestionFromCompletePhysical( VCPENetworkModel physicalInfrastructure) { VCPENetworkModel generatedLogical = MPTemplateModelBuilder.generateLogicalElements(); VCPENetworkModel suggestedLogical = suggestor.getSuggestionForLogicalModel(physicalInfrastructure, generatedLogical); VCPENetworkModel completeSuggestion = MPTemplateModelBuilder.mapLogicalAndPhysical(physicalInfrastructure, suggestedLogical); return completeSuggestion; }
/** * FIXME TO BE REMOVED, part of WORKAROUND * * @param initialModel model with user preferences. Without physicalInfrastructure elements * @return given initialModel merged with suggested physical one. */ private VCPENetworkModel buildModelWithPhyInfrastructureWorkaround( VCPENetworkModel initialModelLogical) { // Merge initialModelLogical with suggested physical VCPENetworkModel phy = MPTemplateModelBuilder.generatePhysicalElements(); phy = suggestor.getSuggestionForPhysicalModel(phy); VCPENetworkModel logical = MPTemplateModelBuilder.generateLogicalElements(); logical = partialCopy(initialModelLogical, logical); VCPENetworkModel logicalWithSuggestedPhysical = MPTemplateModelBuilder.mapLogicalAndPhysical(phy, logical); return logicalWithSuggestedPhysical; }
/** @throws VCPENetworkManagerException */ public MultipleProviderTemplate() throws VCPENetworkManagerException { suggestor = new MPTemplateSuggestor(); suggestor.initialize(); }