Package pyanaconda :: Module partIntfHelpers
[hide private]
[frames] | no frames]

Module partIntfHelpers

source code

Helper functions shared between partitioning interfaces.

Classes [hide private]
  iSCSIWizard
A base class for both the GUI and TUI iSCSI wizards.
Functions [hide private]
 
sanityCheckVolumeGroupName(volname)
Make sure that the volume group name doesn't contain invalid chars.
source code
 
sanityCheckLogicalVolumeName(logvolname)
Make sure that the logical volume name doesn't contain invalid chars.
source code
 
sanityCheckMountPoint(mntpt)
Sanity check that the mountpoint is valid.
source code
 
doDeleteDevice(intf, storage, device, confirm=1, quiet=0)
Delete a partition from the request list.
source code
 
doClearPartitionedDevice(intf, storage, device, confirm=1, quiet=0)
Remove all devices/partitions currently on device.
source code
 
checkForSwapNoMatch(anaconda)
Check for any partitions of type 0x82 which don't have a swap fs.
source code
 
mustHaveSelectedDrive(intf) source code
 
queryNoFormatPreExisting(intf)
Ensure the user wants to use a partition without formatting.
source code
 
partitionSanityErrors(intf, errors)
Errors were found sanity checking.
source code
 
partitionSanityWarnings(intf, warnings)
Sanity check found warnings.
source code
 
partitionPreExistFormatWarnings(intf, warnings)
Double check that preexistings being formatted are fine.
source code
 
getPreExistFormatWarnings(storage)
Return a list of preexisting devices being formatted.
source code
 
confirmDelete(intf, device)
Confirm the deletion of a device.
source code
 
confirmResetPartitionState(intf)
Confirm reset of partitioning to that present on the system.
source code
 
parse_ip(string_ip)
May rise network.IPMissing or network.IPError
source code
 
drive_iscsi_addition(anaconda, wizard)
This method is the UI controller that drives adding of iSCSI drives
source code
Variables [hide private]
  _ = lambda x:
  log = logging.getLogger("anaconda")
  CRED_NONE = 0, _("No authentication")
  CRED_ONE = 1, _("CHAP pair")
  CRED_BOTH = 2, _("CHAP pair and a reverse pair")
  CRED_REUSE = 3, _("Use the credentials from the discovery step")
Function Details [hide private]

sanityCheckMountPoint(mntpt)

source code 
Sanity check that the mountpoint is valid.

mntpt is the mountpoint being used.

The Rules
    Start with one /
    Don't end with /
    No spaces
    No /../
    No /./
    No //
    Don't end with /..
    Don't end with /.

doDeleteDevice(intf, storage, device, confirm=1, quiet=0)

source code 

Delete a partition from the request list.

intf is the interface storage is the storage instance device is the device to delete

doClearPartitionedDevice(intf, storage, device, confirm=1, quiet=0)

source code 

Remove all devices/partitions currently on device.

device -- a partitioned device such as a disk

partitionSanityErrors(intf, errors)

source code 

Errors were found sanity checking. Tell the user they must fix.

partitionSanityWarnings(intf, warnings)

source code 

Sanity check found warnings. Make sure the user wants to continue.

parse_ip(string_ip)

source code 

May rise network.IPMissing or network.IPError

Returns (ip, port) tuple.

drive_iscsi_addition(anaconda, wizard)

source code 

This method is the UI controller that drives adding of iSCSI drives

wizard is the UI wizard object of class derived from iSCSIWizard.

Returns a list of all newly added iSCSI nodes (or empty list on error etc.)