YaST2 Developers Documentation: Auto-installation/Partition

Auto-installation/Partition

modules/AutoinstCommon.ycp
Drive related functions module
  • Sven Schober (sschober@suse.de)

This module has an unstable interface.

Imports

  • AutoinstCommon
  • AutoinstPartition

Includes

  • autoinstall/common.ycp
  • autoinstall/tree.ycp
  • autoinstall/types.ycp

Global Functions

Local Functions

Info:

Structure of a drive, or volume group.

local isValidDiskType (symbol type) -> boolean

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.
Info:

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.
Info:

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.
global isDrive () -> boolean

Convenience wrappers for more general object predicates

global getNodeReference () -> string

Construct reference to drive for use in tree. The references are of the form: "{drive,volgroup}_", e.g. "drive_1", or "volgroup_3"

Return value:
reference
global getNodeName () -> string

Construct node name for display in tree.

Constructed names are of the form: " - {drive,volgroup}

Return value:
the newly created node name
Info:

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.
Info:

Get partition identified by idx from drive.

CAUTION: Indexes may be invalidated by modifications of the partition list on a drive.

Info:

Returns number of partitions on spcified drive.

Parameters:
drive The drive to inspect.
Return value:
Number of partitions on drive.
Info:

Return lowest partition number not already in use.

Parameters:
drive The drive to process.
Return value:
Lowest free partition number.
Info:

Mutators

Info:

TODO: which constraints are on inserting?

Info:

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.
Info:

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.
Info:

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.
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.