C# Class BLL.DynamicClientPartition.ClientPartitionHelper

Calculates the minimum sizes required for various hard drives / partitions for the client imaging process
Datei anzeigen Open project: cdadmin/clonedeploy Class Usage Examples

Public Methods

Method Description
CheckForLvm ( int schemaHdNumber ) : string
ClientPartitionHelper ( Models imageProfile ) : System
ExtendedPartition ( int hdNumberToGet, long newHdSize ) : ExtendedPartitionHelper

Calculates the minimum block size for an extended partition by determining the minimum size of all logical partitions that fall under the extended. Does not assume that any extended partitions actually exist.

GetActivePartitionCount ( int schemaHdNumber ) : int
GetActivePartitions ( int schemaHdNumber, Models imageProfile ) : List
GetImageSchema ( ) : Models.ImageSchema.ImageSchema
GetPartitionNumbers ( int schemaHdNumber ) : List
HardDrive ( int hdNumberToGet, long newHdSize ) : long

Calculates the smallest size hard drive in Bytes that can be used to deploy the image to, based off the data usage. The newHdSize parameter is arbitrary but is used to determine if the hard being deployed to is the same size that the image was created from.

LogicalVolume ( Models lv, int lbsByte, long newHdSize, int hdNumberToGet ) : PartitionHelper

Calculates the minimum block size required for a single logical volume, assuming the logical volume cannot have any children.

NextActiveHardDrive ( List schemaImagedDrives, int clientHdNumber ) : int
Partition ( int hdNumberToGet, int partNumberToGet, long newHdSize ) : PartitionHelper

Calculates the minimum block size required for a single partition, taking into account any children partitions.

VolumeGroup ( int hdNumberToGet, int partNumberToGet, long newHdSize ) : ClientVolumeGroupHelper

Calculates the minimum block size required for a volume group by determine the size of each logical volume within the volume group. Does not assume that any volume group actually exists. Volume Groups don't really have a size, so this ends up being the size of the physical partition. I just separated it for clarity.

Method Details

CheckForLvm() public method

public CheckForLvm ( int schemaHdNumber ) : string
schemaHdNumber int
return string

ClientPartitionHelper() public method

public ClientPartitionHelper ( Models imageProfile ) : System
imageProfile Models
return System

ExtendedPartition() public method

Calculates the minimum block size for an extended partition by determining the minimum size of all logical partitions that fall under the extended. Does not assume that any extended partitions actually exist.
public ExtendedPartition ( int hdNumberToGet, long newHdSize ) : ExtendedPartitionHelper
hdNumberToGet int
newHdSize long
return Models.ExtendedPartitionHelper

GetActivePartitionCount() public method

public GetActivePartitionCount ( int schemaHdNumber ) : int
schemaHdNumber int
return int

GetActivePartitions() public method

public GetActivePartitions ( int schemaHdNumber, Models imageProfile ) : List
schemaHdNumber int
imageProfile Models
return List

GetImageSchema() public method

public GetImageSchema ( ) : Models.ImageSchema.ImageSchema
return Models.ImageSchema.ImageSchema

GetPartitionNumbers() public method

public GetPartitionNumbers ( int schemaHdNumber ) : List
schemaHdNumber int
return List

HardDrive() public method

Calculates the smallest size hard drive in Bytes that can be used to deploy the image to, based off the data usage. The newHdSize parameter is arbitrary but is used to determine if the hard being deployed to is the same size that the image was created from.
public HardDrive ( int hdNumberToGet, long newHdSize ) : long
hdNumberToGet int
newHdSize long
return long

LogicalVolume() public method

Calculates the minimum block size required for a single logical volume, assuming the logical volume cannot have any children.
public LogicalVolume ( Models lv, int lbsByte, long newHdSize, int hdNumberToGet ) : PartitionHelper
lv Models
lbsByte int
newHdSize long
hdNumberToGet int
return Models.PartitionHelper

NextActiveHardDrive() public method

public NextActiveHardDrive ( List schemaImagedDrives, int clientHdNumber ) : int
schemaImagedDrives List
clientHdNumber int
return int

Partition() public method

Calculates the minimum block size required for a single partition, taking into account any children partitions.
public Partition ( int hdNumberToGet, int partNumberToGet, long newHdSize ) : PartitionHelper
hdNumberToGet int
partNumberToGet int
newHdSize long
return Models.PartitionHelper

VolumeGroup() public method

Calculates the minimum block size required for a volume group by determine the size of each logical volume within the volume group. Does not assume that any volume group actually exists. Volume Groups don't really have a size, so this ends up being the size of the physical partition. I just separated it for clarity.
public VolumeGroup ( int hdNumberToGet, int partNumberToGet, long newHdSize ) : ClientVolumeGroupHelper
hdNumberToGet int
partNumberToGet int
newHdSize long
return Models.ClientVolumeGroupHelper