public class CDOModelHelper extends Object
| Constructor and Description |
|---|
CDOModelHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addInitialPlacementActionToOptimisationPlan(eu.cactosfp7.optimisationplan.OptimisationPlan plan,
eu.cactosfp7.infrastructuremodels.logicaldc.core.VirtualMachine vmToPlace,
eu.cactosfp7.infrastructuremodels.logicaldc.core.Hypervisor hToPlace) |
static void |
addMigrationActionToOptimisationPlan(eu.cactosfp7.optimisationplan.OptimisationPlan plan,
eu.cactosfp7.infrastructuremodels.logicaldc.core.VirtualMachine vmToMigrate,
eu.cactosfp7.infrastructuremodels.logicaldc.core.Hypervisor sourceHypervisor,
eu.cactosfp7.infrastructuremodels.logicaldc.core.Hypervisor destinationHypervisor) |
static eu.cactosfp7.optimisationplan.OptimisationPlan |
createOptimisationPlan()
Creates optimisation plan object, adds the root step (SequentialSteps), sets execution status
to READY and sets creation date to current time.
|
static eu.cactosfp7.infrastructuremodels.physicaldc.core.ComputeNode |
getComputeNode(String measurementId,
eu.cactosfp7.infrastructuremodels.logicaldc.core.LogicalDCModel ldcm)
Gets physical machine object where measurement was taken from provided LogicalDCModel
|
static eu.cactosfp7.infrastructuremodels.physicaldc.core.ComputeNode |
getComputeNodeById(String nodeId,
eu.cactosfp7.infrastructuremodels.physicaldc.core.PhysicalDCModel pdcm)
Gets physical machine object from provided PhysicalDCModel based on its id
|
static List<eu.cactosfp7.cactoopt.framework.model.PhysicalMachine> |
getFrameworkPhysicalMachinesFromCdoModel(eu.cactosfp7.infrastructuremodels.physicaldc.core.PhysicalDCModel pdcm,
eu.cactosfp7.infrastructuremodels.logicaldc.core.LogicalDCModel ldcm) |
static List<PhysicalMachine> |
getPhysicalMachinesFromCdoModel(eu.cactosfp7.infrastructuremodels.physicaldc.core.PhysicalDCModel pdcm,
eu.cactosfp7.infrastructuremodels.logicaldc.core.LogicalDCModel ldcm)
Transforms Infrastructure Models into list of physical machines with assigned virtual machines
|
static eu.cactosfp7.infrastructuremodels.logicaldc.core.VirtualMachine |
getVirtualMachine(String measurementId,
eu.cactosfp7.infrastructuremodels.logicaldc.core.LogicalDCModel ldcm)
Gets virtual machine where measurement was taken from provided LogicalDCModel
|
static eu.cactosfp7.infrastructuremodels.logicaldc.core.VirtualMachine |
getVirtualMachineById(String vmId,
List<eu.cactosfp7.infrastructuremodels.logicaldc.core.VirtualMachine> vms)
Finds virtual machine object on the list of virtual machines based on its id
|
static eu.cactosfp7.infrastructuremodels.logicaldc.core.VirtualMachine |
getVirtualMachineById(String vmId,
eu.cactosfp7.infrastructuremodels.logicaldc.core.LogicalDCModel ldcm) |
static eu.cactosfp7.optimisationplan.OptimisationPlan |
tranformListOfMigrationMovesToOptimisationPlan(eu.cactosfp7.infrastructuremodels.physicaldc.core.PhysicalDCModel pdcm,
eu.cactosfp7.infrastructuremodels.logicaldc.core.LogicalDCModel ldcm,
List<eu.cactosfp7.cactoopt.framework.model.MigrationMove> moves) |
static List<VirtualMachine> |
transformVirtualMachineToSimpleModel(List<eu.cactosfp7.infrastructuremodels.logicaldc.core.VirtualMachine> vms)
Transforms list of virtual machine objects from Infrastructure Models into
a list of virtual machines in simplified model
|
public static eu.cactosfp7.infrastructuremodels.logicaldc.core.VirtualMachine getVirtualMachineById(String vmId, eu.cactosfp7.infrastructuremodels.logicaldc.core.LogicalDCModel ldcm)
public static eu.cactosfp7.infrastructuremodels.logicaldc.core.VirtualMachine getVirtualMachineById(String vmId, List<eu.cactosfp7.infrastructuremodels.logicaldc.core.VirtualMachine> vms)
vmId - Id of virtual machinevms - List of virtual machinespublic static eu.cactosfp7.infrastructuremodels.physicaldc.core.ComputeNode getComputeNodeById(String nodeId, eu.cactosfp7.infrastructuremodels.physicaldc.core.PhysicalDCModel pdcm)
nodeId - Id of physical machinepdcm - Physical Data Center Modelpublic static eu.cactosfp7.infrastructuremodels.physicaldc.core.ComputeNode getComputeNode(String measurementId, eu.cactosfp7.infrastructuremodels.logicaldc.core.LogicalDCModel ldcm)
measurementId - Id of measurement takenldcm - Logical Data Center Model containing the measurementpublic static eu.cactosfp7.infrastructuremodels.logicaldc.core.VirtualMachine getVirtualMachine(String measurementId, eu.cactosfp7.infrastructuremodels.logicaldc.core.LogicalDCModel ldcm)
measurementId - ldcm - Logical Data Center Model containing the measurementpublic static List<PhysicalMachine> getPhysicalMachinesFromCdoModel(eu.cactosfp7.infrastructuremodels.physicaldc.core.PhysicalDCModel pdcm, eu.cactosfp7.infrastructuremodels.logicaldc.core.LogicalDCModel ldcm)
pdcm - Physical Data Center Modelldcm - Logical Data Center Modelpublic static List<eu.cactosfp7.cactoopt.framework.model.PhysicalMachine> getFrameworkPhysicalMachinesFromCdoModel(eu.cactosfp7.infrastructuremodels.physicaldc.core.PhysicalDCModel pdcm, eu.cactosfp7.infrastructuremodels.logicaldc.core.LogicalDCModel ldcm)
pdcm - Physical Data Center Modelldcm - Logical Data Center Modelpublic static List<VirtualMachine> transformVirtualMachineToSimpleModel(List<eu.cactosfp7.infrastructuremodels.logicaldc.core.VirtualMachine> vms)
vms - List of virtual machine objects from Infrastructure Modelspublic static eu.cactosfp7.optimisationplan.OptimisationPlan tranformListOfMigrationMovesToOptimisationPlan(eu.cactosfp7.infrastructuremodels.physicaldc.core.PhysicalDCModel pdcm,
eu.cactosfp7.infrastructuremodels.logicaldc.core.LogicalDCModel ldcm,
List<eu.cactosfp7.cactoopt.framework.model.MigrationMove> moves)
public static eu.cactosfp7.optimisationplan.OptimisationPlan createOptimisationPlan()
public static void addInitialPlacementActionToOptimisationPlan(eu.cactosfp7.optimisationplan.OptimisationPlan plan,
eu.cactosfp7.infrastructuremodels.logicaldc.core.VirtualMachine vmToPlace,
eu.cactosfp7.infrastructuremodels.logicaldc.core.Hypervisor hToPlace)
plan - vmToPlace - hToPlace - public static void addMigrationActionToOptimisationPlan(eu.cactosfp7.optimisationplan.OptimisationPlan plan,
eu.cactosfp7.infrastructuremodels.logicaldc.core.VirtualMachine vmToMigrate,
eu.cactosfp7.infrastructuremodels.logicaldc.core.Hypervisor sourceHypervisor,
eu.cactosfp7.infrastructuremodels.logicaldc.core.Hypervisor destinationHypervisor)
plan - vmToMigrate - sourceHypervisor - destinationHypervisor -