Auto-installation/Partition |
modules/AutoinstCommon.ycp |
Drive related functions module | |
|
|
This module has an unstable interface. |
Imports
Includes
Global FunctionsLocal Functions |
Structure of a drive, or volume group.
Determine if type is a valid drive type.
- Parameters:
-
type symbol supposedly identifying a drive type.
- Return value:
-
true of type is valid false otherwise.
Set field on drive to value. Convenience wrapper for generic setter.
- Parameters:
-
drive drive to be updated. field field to be set. value value to be stored.
Constructor Constructs a new drive of type type with "device" set to name.
- Parameters:
-
name device name of new drive. type type of new drive.
Convenience wrappers for more general object predicates
Construct reference to drive for use in tree. The references
are of the form:
"{drive,volgroup}_
- Return value:
-
reference
Construct node name for display in tree.
Constructed names are of the form:
"
- Return value:
-
the newly created node name
Create tree representation of drive for the tree widget.
- Parameters:
-
drive Drive to process.
- Return value:
-
A term representing an `Item with the current drive as top node and all partitions as children.
Get partition identified by idx from drive.
CAUTION: Indexes may be invalidated by modifications of the partition list on a drive.
Returns number of partitions on spcified drive.
- Parameters:
-
drive The drive to inspect.
- Return value:
-
Number of partitions on drive.
Return lowest partition number not already in use.
- Parameters:
-
drive The drive to process.
- Return value:
-
Lowest free partition number.
Mutators
TODO: which constraints are on inserting?
Update partition on drive.
- Parameters:
-
drive Drive containing parition to be updated. idx Integer identifying the partition to be updated (list index). partition New/Updated partition.
- Return value:
-
Drive containing updated partition.
Remove partition from drive.
- Parameters:
-
drive Drive containing the partition to be deleted. idx Integer identifying partition to be deleted (list index).
- Return value:
-
Drive missing the deleted partition.
Import a generic drive map and create DriveT from it. Called by AutoinstPartPlan::Import().
- Parameters:
-
drive A map containing the drive information.
- Return value:
-
DriveT containing the same info.
Export the DriveT to the generic map representation used by autoyast. Filters out our surrogate id.
- Parameters:
-
drive Drive to export
- Return value:
-
Exported generic map representation of DriveT.