blivet.tasks package¶
Submodules¶
blivet.tasks.availability module¶
-
class
blivet.tasks.availability.ExternalResource(method, name)¶ Bases:
objectAn external resource.
Initializes an instance of an external resource.
Parameters: -
availability_errors¶ Whether the resource has any availability errors.
Returns: [] if the resource is available Return type: list of str
-
-
class
blivet.tasks.availability.Method¶ Bases:
objectMethod for determining if external resource is available.
-
availability_errors(resource)¶ Returns [] if the resource is available.
Parameters: resource ( ExternalResource) – any external resourceReturns: [] if the external resource is available Return type: list of str
-
-
class
blivet.tasks.availability.PackageInfo(package_name, required_version=None)¶ Bases:
objectInitializer.
Parameters: - package_name (str) – the name of the package
- required_version (
distutils.LooseVersionor NoneType) – the required version for this package
-
class
blivet.tasks.availability.PackageMethod(package=None)¶ Bases:
blivet.tasks.availability.MethodMethods for checking the package version of the external resource.
Initializer.
:param
PackageInfopackage:-
availability_errors(resource)¶
-
package_version¶ Returns the version of the installed package.
Returns: the package version Return type: LooseVersion Raises AvailabilityError: on failure to obtain package version
-
-
blivet.tasks.availability.application(name)¶ Construct an external resource that is an application.
This application will be available if its name can be found in $PATH.
-
blivet.tasks.availability.application_by_package(name, package_method)¶ Construct an external resource that is an application.
This application will be available if its name can be found in $PATH AND its package version is at least the required version.
:param
PackageMethodpackage_method: the package method
-
blivet.tasks.availability.available_resource(name)¶ Construct an external resource that is always available.
-
blivet.tasks.availability.blockdev_plugin(name)¶ Construct an external resource that is a libblockdev plugin.
Construct an external resource that is always unavailable.
blivet.tasks.dfresize module¶
-
class
blivet.tasks.dfresize.DFResizeTask¶ Bases:
blivet.tasks.task.TaskThe abstract properties that any resize task must have.
-
unit¶ A decorator indicating abstract properties.
Requires that the metaclass is ABCMeta or derived from it. A class that has a metaclass derived from ABCMeta cannot be instantiated unless all of its abstract properties are overridden. The abstract properties can be called using any of the normal ‘super’ call mechanisms.
Usage:
- class C(metaclass=ABCMeta):
@abstractproperty def my_abstract_property(self):
...
This defines a read-only property; you can also define a read-write abstract property using the ‘long’ form of property declaration:
- class C(metaclass=ABCMeta):
- def getx(self): ... def setx(self, value): ... x = abstractproperty(getx, setx)
‘abstractproperty’ is deprecated. Use ‘property’ with ‘abstractmethod’ instead.
-
-
class
blivet.tasks.dfresize.UnimplementedDFResize(a_df)¶ Bases:
blivet.tasks.task.UnimplementedTask,blivet.tasks.dfresize.DFResizeTaskInitializer.
Parameters: a_df (DeviceFormat) – a device format object -
unit¶
-
blivet.tasks.fsck module¶
-
class
blivet.tasks.fsck.DosFSCK(an_fs)¶ Bases:
blivet.tasks.fsck.FSCKInitializer.
Parameters: an_fs (FS) – a filesystem object -
ext= <blivet.tasks.availability.ExternalResource object>¶
-
options= ['-n']¶
-
-
class
blivet.tasks.fsck.Ext2FSCK(an_fs)¶ Bases:
blivet.tasks.fsck.FSCKInitializer.
Parameters: an_fs (FS) – a filesystem object -
ext= <blivet.tasks.availability.ExternalResource object>¶
-
options= ['-f', '-p', '-C', '0']¶
-
-
class
blivet.tasks.fsck.FSCK(an_fs)¶ Bases:
blivet.tasks.task.BasicApplication,blivet.tasks.fstask.FSTaskAn abstract class that represents actions associated with checking consistency of a filesystem.
Initializer.
Parameters: an_fs (FS) – a filesystem object -
description= 'fsck'¶
-
do_task()¶ Check the filesystem.
Raises FSError: on failure
-
options¶ A decorator indicating abstract properties.
Requires that the metaclass is ABCMeta or derived from it. A class that has a metaclass derived from ABCMeta cannot be instantiated unless all of its abstract properties are overridden. The abstract properties can be called using any of the normal ‘super’ call mechanisms.
Usage:
- class C(metaclass=ABCMeta):
@abstractproperty def my_abstract_property(self):
...
This defines a read-only property; you can also define a read-write abstract property using the ‘long’ form of property declaration:
- class C(metaclass=ABCMeta):
- def getx(self): ... def setx(self, value): ... x = abstractproperty(getx, setx)
‘abstractproperty’ is deprecated. Use ‘property’ with ‘abstractmethod’ instead.
-
-
class
blivet.tasks.fsck.HFSPlusFSCK(an_fs)¶ Bases:
blivet.tasks.fsck.FSCKInitializer.
Parameters: an_fs (FS) – a filesystem object -
ext= <blivet.tasks.availability.ExternalResource object>¶
-
options= []¶
-
-
class
blivet.tasks.fsck.NTFSFSCK(an_fs)¶ Bases:
blivet.tasks.fsck.FSCKInitializer.
Parameters: an_fs (FS) – a filesystem object -
ext= <blivet.tasks.availability.ExternalResource object>¶
-
options= ['-c']¶
-
-
class
blivet.tasks.fsck.UnimplementedFSCK(an_fs)¶ Bases:
blivet.tasks.fstask.UnimplementedFSTaskInitializer.
Parameters: an_fs (FS) – a filesystem object
blivet.tasks.fsinfo module¶
-
class
blivet.tasks.fsinfo.Ext2FSInfo(an_fs)¶ Bases:
blivet.tasks.fsinfo.FSInfoInitializer.
Parameters: an_fs (FS) – a filesystem object -
ext= <blivet.tasks.availability.ExternalResource object>¶
-
options= ['-h']¶
-
-
class
blivet.tasks.fsinfo.FSInfo(an_fs)¶ Bases:
blivet.tasks.task.BasicApplication,blivet.tasks.fstask.FSTaskAn abstract class that represents an information gathering app.
Initializer.
Parameters: an_fs (FS) – a filesystem object -
description= 'filesystem info'¶
-
do_task()¶ Returns information from the command.
Returns: a string representing the output of the command Return type: str Raises FSError: if info cannot be obtained
-
options¶ A decorator indicating abstract properties.
Requires that the metaclass is ABCMeta or derived from it. A class that has a metaclass derived from ABCMeta cannot be instantiated unless all of its abstract properties are overridden. The abstract properties can be called using any of the normal ‘super’ call mechanisms.
Usage:
- class C(metaclass=ABCMeta):
@abstractproperty def my_abstract_property(self):
...
This defines a read-only property; you can also define a read-write abstract property using the ‘long’ form of property declaration:
- class C(metaclass=ABCMeta):
- def getx(self): ... def setx(self, value): ... x = abstractproperty(getx, setx)
‘abstractproperty’ is deprecated. Use ‘property’ with ‘abstractmethod’ instead.
-
-
class
blivet.tasks.fsinfo.JFSInfo(an_fs)¶ Bases:
blivet.tasks.fsinfo.FSInfoInitializer.
Parameters: an_fs (FS) – a filesystem object -
ext= <blivet.tasks.availability.ExternalResource object>¶
-
options= ['-l']¶
-
-
class
blivet.tasks.fsinfo.NTFSInfo(an_fs)¶ Bases:
blivet.tasks.fsinfo.FSInfoInitializer.
Parameters: an_fs (FS) – a filesystem object -
ext= <blivet.tasks.availability.ExternalResource object>¶
-
options= ['-m']¶
-
-
class
blivet.tasks.fsinfo.ReiserFSInfo(an_fs)¶ Bases:
blivet.tasks.fsinfo.FSInfoInitializer.
Parameters: an_fs (FS) – a filesystem object -
ext= <blivet.tasks.availability.ExternalResource object>¶
-
options= []¶
-
-
class
blivet.tasks.fsinfo.UnimplementedFSInfo(an_fs)¶ Bases:
blivet.tasks.fstask.UnimplementedFSTaskInitializer.
Parameters: an_fs (FS) – a filesystem object
-
class
blivet.tasks.fsinfo.XFSInfo(an_fs)¶ Bases:
blivet.tasks.fsinfo.FSInfoInitializer.
Parameters: an_fs (FS) – a filesystem object -
ext= <blivet.tasks.availability.ExternalResource object>¶
-
options= ['-c', 'sb 0', '-c', 'p dblocks', '-c', 'p blocksize']¶
-
blivet.tasks.fslabeling module¶
-
class
blivet.tasks.fslabeling.Ext2FSLabeling¶ Bases:
blivet.tasks.fslabeling.FSLabeling-
default_label= ''¶
-
classmethod
label_format_ok(label)¶
-
-
class
blivet.tasks.fslabeling.FATFSLabeling¶ Bases:
blivet.tasks.fslabeling.FSLabeling-
default_label= 'NO NAME'¶
-
classmethod
label_format_ok(label)¶
-
-
class
blivet.tasks.fslabeling.FSLabeling¶ Bases:
objectAn abstract class that represents filesystem labeling actions.
-
default_label¶ A decorator indicating abstract properties.
Requires that the metaclass is ABCMeta or derived from it. A class that has a metaclass derived from ABCMeta cannot be instantiated unless all of its abstract properties are overridden. The abstract properties can be called using any of the normal ‘super’ call mechanisms.
Usage:
- class C(metaclass=ABCMeta):
@abstractproperty def my_abstract_property(self):
...
This defines a read-only property; you can also define a read-write abstract property using the ‘long’ form of property declaration:
- class C(metaclass=ABCMeta):
- def getx(self): ... def setx(self, value): ... x = abstractproperty(getx, setx)
‘abstractproperty’ is deprecated. Use ‘property’ with ‘abstractmethod’ instead.
-
-
class
blivet.tasks.fslabeling.HFSLabeling¶ Bases:
blivet.tasks.fslabeling.FSLabeling-
default_label= 'Untitled'¶
-
classmethod
label_format_ok(label)¶
-
-
class
blivet.tasks.fslabeling.HFSPlusLabeling¶ Bases:
blivet.tasks.fslabeling.FSLabeling-
default_label= 'Untitled'¶
-
classmethod
label_format_ok(label)¶
-
-
class
blivet.tasks.fslabeling.JFSLabeling¶ Bases:
blivet.tasks.fslabeling.FSLabeling-
default_label= ''¶
-
classmethod
label_format_ok(label)¶
-
-
class
blivet.tasks.fslabeling.NTFSLabeling¶ Bases:
blivet.tasks.fslabeling.FSLabeling-
default_label= ''¶
-
classmethod
label_format_ok(label)¶
-
-
class
blivet.tasks.fslabeling.ReiserFSLabeling¶ Bases:
blivet.tasks.fslabeling.FSLabeling-
default_label= ''¶
-
classmethod
label_format_ok(label)¶
-
-
class
blivet.tasks.fslabeling.XFSLabeling¶ Bases:
blivet.tasks.fslabeling.FSLabeling-
default_label= ''¶
-
classmethod
label_format_ok(label)¶
-
blivet.tasks.fsminsize module¶
-
class
blivet.tasks.fsminsize.Ext2FSMinSize(an_fs)¶ Bases:
blivet.tasks.fsminsize.FSMinSizeInitializer.
Parameters: an_fs (FS) – a filesystem object -
depends_on¶
-
do_task()¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
options= ['-P']¶
-
-
class
blivet.tasks.fsminsize.FSMinSize(an_fs)¶ Bases:
blivet.tasks.task.BasicApplication,blivet.tasks.fstask.FSTaskAn abstract class that represents min size information extraction.
Initializer.
Parameters: an_fs (FS) – a filesystem object -
description= 'minimum filesystem size'¶
-
do_task()¶ Returns the minimum size for this filesystem object.
Return type: SizeReturns: the minimum size Raises FSError: if filesystem can not be obtained
-
options¶ A decorator indicating abstract properties.
Requires that the metaclass is ABCMeta or derived from it. A class that has a metaclass derived from ABCMeta cannot be instantiated unless all of its abstract properties are overridden. The abstract properties can be called using any of the normal ‘super’ call mechanisms.
Usage:
- class C(metaclass=ABCMeta):
@abstractproperty def my_abstract_property(self):
...
This defines a read-only property; you can also define a read-write abstract property using the ‘long’ form of property declaration:
- class C(metaclass=ABCMeta):
- def getx(self): ... def setx(self, value): ... x = abstractproperty(getx, setx)
‘abstractproperty’ is deprecated. Use ‘property’ with ‘abstractmethod’ instead.
-
-
class
blivet.tasks.fsminsize.NTFSMinSize(an_fs)¶ Bases:
blivet.tasks.fsminsize.FSMinSizeInitializer.
Parameters: an_fs (FS) – a filesystem object -
do_task()¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
options= ['-m']¶
-
-
class
blivet.tasks.fsminsize.UnimplementedFSMinSize(an_fs)¶ Bases:
blivet.tasks.fstask.UnimplementedFSTaskInitializer.
Parameters: an_fs (FS) – a filesystem object
blivet.tasks.fsmkfs module¶
-
class
blivet.tasks.fsmkfs.BTRFSMkfs(an_fs)¶ Bases:
blivet.tasks.fsmkfs.FSMkfsInitializer.
Parameters: an_fs (FS) – a filesystem object -
args¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
label_option= None¶
-
-
class
blivet.tasks.fsmkfs.Ext2FSMkfs(an_fs)¶ Bases:
blivet.tasks.fsmkfs.FSMkfsInitializer.
Parameters: an_fs (FS) – a filesystem object -
args¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
label_option= '-L'¶
-
-
class
blivet.tasks.fsmkfs.Ext3FSMkfs(an_fs)¶ Bases:
blivet.tasks.fsmkfs.Ext2FSMkfsInitializer.
Parameters: an_fs (FS) – a filesystem object
-
class
blivet.tasks.fsmkfs.Ext4FSMkfs(an_fs)¶ Bases:
blivet.tasks.fsmkfs.Ext3FSMkfsInitializer.
Parameters: an_fs (FS) – a filesystem object
-
class
blivet.tasks.fsmkfs.FATFSMkfs(an_fs)¶ Bases:
blivet.tasks.fsmkfs.FSMkfsInitializer.
Parameters: an_fs (FS) – a filesystem object -
args¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
label_option= '-n'¶
-
-
class
blivet.tasks.fsmkfs.FSMkfs(an_fs)¶ Bases:
blivet.tasks.task.BasicApplication,blivet.tasks.fsmkfs.FSMkfsTaskAn abstract class that represents filesystem creation actions.
Initializer.
Parameters: an_fs (FS) – a filesystem object -
args¶ A decorator indicating abstract properties.
Requires that the metaclass is ABCMeta or derived from it. A class that has a metaclass derived from ABCMeta cannot be instantiated unless all of its abstract properties are overridden. The abstract properties can be called using any of the normal ‘super’ call mechanisms.
Usage:
- class C(metaclass=ABCMeta):
@abstractproperty def my_abstract_property(self):
...
This defines a read-only property; you can also define a read-write abstract property using the ‘long’ form of property declaration:
- class C(metaclass=ABCMeta):
- def getx(self): ... def setx(self, value): ... x = abstractproperty(getx, setx)
‘abstractproperty’ is deprecated. Use ‘property’ with ‘abstractmethod’ instead.
-
can_label¶ Whether this task can label the filesystem.
Returns: True if this task can label the filesystem Return type: bool
-
description= 'mkfs'¶
-
do_task(options=None, label=False)¶ Create the format on the device and label if possible and desired.
Parameters: - options (list of str or NoneType) – any special options, may be None
- label (bool) – whether to label while creating, default is False
-
label_option¶ A decorator indicating abstract properties.
Requires that the metaclass is ABCMeta or derived from it. A class that has a metaclass derived from ABCMeta cannot be instantiated unless all of its abstract properties are overridden. The abstract properties can be called using any of the normal ‘super’ call mechanisms.
Usage:
- class C(metaclass=ABCMeta):
@abstractproperty def my_abstract_property(self):
...
This defines a read-only property; you can also define a read-write abstract property using the ‘long’ form of property declaration:
- class C(metaclass=ABCMeta):
- def getx(self): ... def setx(self, value): ... x = abstractproperty(getx, setx)
‘abstractproperty’ is deprecated. Use ‘property’ with ‘abstractmethod’ instead.
-
-
class
blivet.tasks.fsmkfs.FSMkfsTask(an_fs)¶ Bases:
blivet.tasks.fstask.FSTaskInitializer.
Parameters: an_fs (FS) – a filesystem object -
can_label¶ A decorator indicating abstract properties.
Requires that the metaclass is ABCMeta or derived from it. A class that has a metaclass derived from ABCMeta cannot be instantiated unless all of its abstract properties are overridden. The abstract properties can be called using any of the normal ‘super’ call mechanisms.
Usage:
- class C(metaclass=ABCMeta):
@abstractproperty def my_abstract_property(self):
...
This defines a read-only property; you can also define a read-write abstract property using the ‘long’ form of property declaration:
- class C(metaclass=ABCMeta):
- def getx(self): ... def setx(self, value): ... x = abstractproperty(getx, setx)
‘abstractproperty’ is deprecated. Use ‘property’ with ‘abstractmethod’ instead.
-
-
class
blivet.tasks.fsmkfs.GFS2Mkfs(an_fs)¶ Bases:
blivet.tasks.fsmkfs.FSMkfsInitializer.
Parameters: an_fs (FS) – a filesystem object -
args¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
label_option= None¶
-
-
class
blivet.tasks.fsmkfs.HFSMkfs(an_fs)¶ Bases:
blivet.tasks.fsmkfs.FSMkfsInitializer.
Parameters: an_fs (FS) – a filesystem object -
args¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
label_option= '-l'¶
-
-
class
blivet.tasks.fsmkfs.HFSPlusMkfs(an_fs)¶ Bases:
blivet.tasks.fsmkfs.FSMkfsInitializer.
Parameters: an_fs (FS) – a filesystem object -
args¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
label_option= '-v'¶
-
-
class
blivet.tasks.fsmkfs.JFSMkfs(an_fs)¶ Bases:
blivet.tasks.fsmkfs.FSMkfsInitializer.
Parameters: an_fs (FS) – a filesystem object -
args¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
label_option= '-L'¶
-
-
class
blivet.tasks.fsmkfs.NTFSMkfs(an_fs)¶ Bases:
blivet.tasks.fsmkfs.FSMkfsInitializer.
Parameters: an_fs (FS) – a filesystem object -
args¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
label_option= '-L'¶
-
-
class
blivet.tasks.fsmkfs.ReiserFSMkfs(an_fs)¶ Bases:
blivet.tasks.fsmkfs.FSMkfsInitializer.
Parameters: an_fs (FS) – a filesystem object -
args¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
label_option= '-l'¶
-
-
class
blivet.tasks.fsmkfs.UnimplementedFSMkfs(an_fs)¶ Bases:
blivet.tasks.task.UnimplementedTask,blivet.tasks.fsmkfs.FSMkfsTaskInitializer.
Parameters: an_fs (FS) – a filesystem object -
can_label¶
-
blivet.tasks.fsmount module¶
-
class
blivet.tasks.fsmount.AppleBootstrapFSMount(an_fs)¶ Bases:
blivet.tasks.fsmount.FSMountInitializer.
Parameters: an_fs (FS) – a filesystem object -
fstype= 'hfs'¶
-
-
class
blivet.tasks.fsmount.BindFSMount(an_fs)¶ Bases:
blivet.tasks.fsmount.FSMountInitializer.
Parameters: an_fs (FS) – a filesystem object
-
class
blivet.tasks.fsmount.DevPtsFSMount(an_fs)¶ Bases:
blivet.tasks.fsmount.FSMountInitializer.
Parameters: an_fs (FS) – a filesystem object -
options= ['gid=5', 'mode=620']¶
-
-
class
blivet.tasks.fsmount.EFIFSMount(an_fs)¶ Bases:
blivet.tasks.fsmount.FATFSMountInitializer.
Parameters: an_fs (FS) – a filesystem object -
fstype= 'vfat'¶
-
-
class
blivet.tasks.fsmount.FATFSMount(an_fs)¶ Bases:
blivet.tasks.fsmount.FSMountInitializer.
Parameters: an_fs (FS) – a filesystem object -
options= ['umask=0077', 'shortname=winnt']¶
-
-
class
blivet.tasks.fsmount.FSMount(an_fs)¶ Bases:
blivet.tasks.task.BasicApplication,blivet.tasks.fstask.FSTaskAn abstract class that represents filesystem mounting actions.
Initializer.
Parameters: an_fs (FS) – a filesystem object -
description= 'mount a filesystem'¶
-
do_task(mountpoint, options=None)¶ Create the format on the device and label if possible and desired.
Parameters: - mountpoint (str) – mountpoint that overrides self.mountpoint
- options (str or None) – mount options
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
fstype= None¶
-
mount_options(options)¶ The options used for mounting.
Parameters: options (str or NoneType) – mount options Returns: the options used by the task Return type: str
-
options= ['defaults']¶
-
-
class
blivet.tasks.fsmount.HFSPlusMount(an_fs)¶ Bases:
blivet.tasks.fsmount.FSMountInitializer.
Parameters: an_fs (FS) – a filesystem object -
fstype= 'hfsplus'¶
-
-
class
blivet.tasks.fsmount.Iso9660FSMount(an_fs)¶ Bases:
blivet.tasks.fsmount.FSMountInitializer.
Parameters: an_fs (FS) – a filesystem object -
options= ['ro']¶
-
-
class
blivet.tasks.fsmount.NFSMount(an_fs)¶ Bases:
blivet.tasks.fsmount.FSMountInitializer.
Parameters: an_fs (FS) – a filesystem object
-
class
blivet.tasks.fsmount.NTFSMount(an_fs)¶ Bases:
blivet.tasks.fsmount.FSMountInitializer.
Parameters: an_fs (FS) – a filesystem object -
options= ['default', 'ro']¶
-
-
class
blivet.tasks.fsmount.NoDevFSMount(an_fs)¶ Bases:
blivet.tasks.fsmount.FSMountInitializer.
Parameters: an_fs (FS) – a filesystem object -
mount_type¶
-
-
class
blivet.tasks.fsmount.SELinuxFSMount(an_fs)¶ Bases:
blivet.tasks.fsmount.NoDevFSMountInitializer.
Parameters: an_fs (FS) – a filesystem object
-
class
blivet.tasks.fsmount.TmpFSMount(an_fs)¶ Bases:
blivet.tasks.fsmount.NoDevFSMountInitializer.
Parameters: an_fs (FS) – a filesystem object
blivet.tasks.fsreadlabel module¶
-
class
blivet.tasks.fsreadlabel.DosFSReadLabel(an_fs)¶ Bases:
blivet.tasks.fsreadlabel.FSReadLabelInitializer.
Parameters: an_fs (FS) – a filesystem object -
args¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
label_regex= '(?P<label>.*)'¶
-
-
class
blivet.tasks.fsreadlabel.Ext2FSReadLabel(an_fs)¶ Bases:
blivet.tasks.fsreadlabel.FSReadLabelInitializer.
Parameters: an_fs (FS) – a filesystem object -
args¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
label_regex= '(?P<label>.*)'¶
-
-
class
blivet.tasks.fsreadlabel.FSReadLabel(an_fs)¶ Bases:
blivet.tasks.task.BasicApplication,blivet.tasks.fstask.FSTaskAn abstract class that represents reading a filesystem’s label.
Initializer.
Parameters: an_fs (FS) – a filesystem object -
args¶ A decorator indicating abstract properties.
Requires that the metaclass is ABCMeta or derived from it. A class that has a metaclass derived from ABCMeta cannot be instantiated unless all of its abstract properties are overridden. The abstract properties can be called using any of the normal ‘super’ call mechanisms.
Usage:
- class C(metaclass=ABCMeta):
@abstractproperty def my_abstract_property(self):
...
This defines a read-only property; you can also define a read-write abstract property using the ‘long’ form of property declaration:
- class C(metaclass=ABCMeta):
- def getx(self): ... def setx(self, value): ... x = abstractproperty(getx, setx)
‘abstractproperty’ is deprecated. Use ‘property’ with ‘abstractmethod’ instead.
-
description= 'read filesystem label'¶
-
label_regex¶ A decorator indicating abstract properties.
Requires that the metaclass is ABCMeta or derived from it. A class that has a metaclass derived from ABCMeta cannot be instantiated unless all of its abstract properties are overridden. The abstract properties can be called using any of the normal ‘super’ call mechanisms.
Usage:
- class C(metaclass=ABCMeta):
@abstractproperty def my_abstract_property(self):
...
This defines a read-only property; you can also define a read-write abstract property using the ‘long’ form of property declaration:
- class C(metaclass=ABCMeta):
- def getx(self): ... def setx(self, value): ... x = abstractproperty(getx, setx)
‘abstractproperty’ is deprecated. Use ‘property’ with ‘abstractmethod’ instead.
-
-
class
blivet.tasks.fsreadlabel.NTFSReadLabel(an_fs)¶ Bases:
blivet.tasks.fsreadlabel.FSReadLabelInitializer.
Parameters: an_fs (FS) – a filesystem object -
args¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
label_regex= '(?P<label>.*)'¶
-
-
class
blivet.tasks.fsreadlabel.UnimplementedFSReadLabel(an_fs)¶ Bases:
blivet.tasks.fstask.UnimplementedFSTaskInitializer.
Parameters: an_fs (FS) – a filesystem object
blivet.tasks.fsresize module¶
-
class
blivet.tasks.fsresize.Ext2FSResize(an_fs)¶ Bases:
blivet.tasks.fsresize.FSResizeInitializer.
Parameters: an_fs (FS) – a filesystem object -
args¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
size_fmt= '%dM'¶
-
size_spec()¶
-
unit= Prefix(factor=1048576, prefix='mebi', abbr='Mi')¶
-
-
class
blivet.tasks.fsresize.FSResize(an_fs)¶ Bases:
blivet.tasks.task.BasicApplication,blivet.tasks.fsresize.FSResizeTaskAn abstract class for resizing a filesystem.
Initializer.
Parameters: an_fs (FS) – a filesystem object -
args¶ A decorator indicating abstract properties.
Requires that the metaclass is ABCMeta or derived from it. A class that has a metaclass derived from ABCMeta cannot be instantiated unless all of its abstract properties are overridden. The abstract properties can be called using any of the normal ‘super’ call mechanisms.
Usage:
- class C(metaclass=ABCMeta):
@abstractproperty def my_abstract_property(self):
...
This defines a read-only property; you can also define a read-write abstract property using the ‘long’ form of property declaration:
- class C(metaclass=ABCMeta):
- def getx(self): ... def setx(self, value): ... x = abstractproperty(getx, setx)
‘abstractproperty’ is deprecated. Use ‘property’ with ‘abstractmethod’ instead.
-
description= 'resize filesystem'¶
-
do_task()¶ Resize the device.
Raises FSError: on failure
-
size_spec()¶ Returns a string specification for the target size of the command. :returns: size specification :rtype: str
-
-
class
blivet.tasks.fsresize.FSResizeTask(an_fs)¶ Bases:
blivet.tasks.fstask.FSTaskThe abstract properties that any resize task must have.
Initializer.
Parameters: an_fs (FS) – a filesystem object -
size_fmt¶ A decorator indicating abstract properties.
Requires that the metaclass is ABCMeta or derived from it. A class that has a metaclass derived from ABCMeta cannot be instantiated unless all of its abstract properties are overridden. The abstract properties can be called using any of the normal ‘super’ call mechanisms.
Usage:
- class C(metaclass=ABCMeta):
@abstractproperty def my_abstract_property(self):
...
This defines a read-only property; you can also define a read-write abstract property using the ‘long’ form of property declaration:
- class C(metaclass=ABCMeta):
- def getx(self): ... def setx(self, value): ... x = abstractproperty(getx, setx)
‘abstractproperty’ is deprecated. Use ‘property’ with ‘abstractmethod’ instead.
-
-
class
blivet.tasks.fsresize.NTFSResize(an_fs)¶ Bases:
blivet.tasks.fsresize.FSResizeInitializer.
Parameters: an_fs (FS) – a filesystem object -
args¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
size_fmt= '%d'¶
-
size_spec()¶
-
unit= Prefix(factor=1, prefix='', abbr='')¶
-
-
class
blivet.tasks.fsresize.TmpFSResize(an_fs)¶ Bases:
blivet.tasks.fsresize.FSResizeInitializer.
Parameters: an_fs (FS) – a filesystem object -
args¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
size_fmt= '%dm'¶
-
size_spec()¶
-
unit= Prefix(factor=1048576, prefix='mebi', abbr='Mi')¶
-
-
class
blivet.tasks.fsresize.UnimplementedFSResize(a_df)¶ Bases:
blivet.tasks.dfresize.UnimplementedDFResize,blivet.tasks.fsresize.FSResizeTaskInitializer.
Parameters: a_df (DeviceFormat) – a device format object -
size_fmt¶
-
blivet.tasks.fssize module¶
-
class
blivet.tasks.fssize.Ext2FSSize(an_fs)¶ Bases:
blivet.tasks.fssize.FSSizeInitializer.
Parameters: an_fs (FS) – a filesystem object
-
class
blivet.tasks.fssize.FSSize(an_fs)¶ Bases:
blivet.tasks.fstask.FSTaskAn abstract class that represents size information extraction.
Initializer.
Parameters: an_fs (FS) – a filesystem object -
depends_on¶
-
description= 'current filesystem size'¶
-
do_task()¶ Returns the size of the filesystem.
Returns: the size of the filesystem Return type: SizeRaises FSError: on failure
A decorator indicating abstract properties.
Requires that the metaclass is ABCMeta or derived from it. A class that has a metaclass derived from ABCMeta cannot be instantiated unless all of its abstract properties are overridden. The abstract properties can be called using any of the normal ‘super’ call mechanisms.
Usage:
- class C(metaclass=ABCMeta):
@abstractproperty def my_abstract_property(self):
...
This defines a read-only property; you can also define a read-write abstract property using the ‘long’ form of property declaration:
- class C(metaclass=ABCMeta):
- def getx(self): ... def setx(self, value): ... x = abstractproperty(getx, setx)
‘abstractproperty’ is deprecated. Use ‘property’ with ‘abstractmethod’ instead.
-
-
class
blivet.tasks.fssize.JFSSize(an_fs)¶ Bases:
blivet.tasks.fssize.FSSizeInitializer.
Parameters: an_fs (FS) – a filesystem object
-
class
blivet.tasks.fssize.NTFSSize(an_fs)¶ Bases:
blivet.tasks.fssize.FSSizeInitializer.
Parameters: an_fs (FS) – a filesystem object
-
class
blivet.tasks.fssize.ReiserFSSize(an_fs)¶ Bases:
blivet.tasks.fssize.FSSizeInitializer.
Parameters: an_fs (FS) – a filesystem object
-
class
blivet.tasks.fssize.TmpFSSize(an_fs)¶ Bases:
blivet.tasks.task.BasicApplication,blivet.tasks.fstask.FSTaskInitializer.
Parameters: an_fs (FS) – a filesystem object -
description= 'current filesystem size'¶
-
do_task()¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
-
class
blivet.tasks.fssize.UnimplementedFSSize(an_fs)¶ Bases:
blivet.tasks.fstask.UnimplementedFSTaskInitializer.
Parameters: an_fs (FS) – a filesystem object
-
class
blivet.tasks.fssize.XFSSize(an_fs)¶ Bases:
blivet.tasks.fssize.FSSizeInitializer.
Parameters: an_fs (FS) – a filesystem object
blivet.tasks.fssync module¶
-
class
blivet.tasks.fssync.FSSync(an_fs)¶ Bases:
blivet.tasks.task.BasicApplication,blivet.tasks.fstask.FSTaskAn abstract class that represents syncing a filesystem.
Initializer.
Parameters: an_fs (FS) – a filesystem object -
description= 'filesystem syncing'¶
-
do_task()¶
-
-
class
blivet.tasks.fssync.UnimplementedFSSync(an_fs)¶ Bases:
blivet.tasks.fstask.UnimplementedFSTaskInitializer.
Parameters: an_fs (FS) – a filesystem object
-
class
blivet.tasks.fssync.XFSSync(an_fs)¶ Bases:
blivet.tasks.fssync.FSSyncSync application for XFS.
Initializer.
Parameters: an_fs (FS) – a filesystem object -
do_task(root='/')¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
blivet.tasks.fstask module¶
-
class
blivet.tasks.fstask.FSTask(an_fs)¶ Bases:
blivet.tasks.task.TaskAn abstract class that encapsulates the fact that all FSTasks have a single master object: the filesystem that they belong to.
Initializer.
Parameters: an_fs (FS) – a filesystem object -
description= 'parent of all filesystem tasks'¶
-
-
class
blivet.tasks.fstask.UnimplementedFSTask(an_fs)¶ Bases:
blivet.tasks.fstask.FSTask,blivet.tasks.task.UnimplementedTaskA convenience class for unimplemented filesystem tasks. Useful in the usual case where an Unimplemented task has no special methods that it is required to implement.
Initializer.
Parameters: an_fs (FS) – a filesystem object
blivet.tasks.fswritelabel module¶
-
class
blivet.tasks.fswritelabel.DosFSWriteLabel(an_fs)¶ Bases:
blivet.tasks.fswritelabel.FSWriteLabelInitializer.
Parameters: an_fs (FS) – a filesystem object -
args¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
-
class
blivet.tasks.fswritelabel.Ext2FSWriteLabel(an_fs)¶ Bases:
blivet.tasks.fswritelabel.FSWriteLabelInitializer.
Parameters: an_fs (FS) – a filesystem object -
args¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
-
class
blivet.tasks.fswritelabel.FSWriteLabel(an_fs)¶ Bases:
blivet.tasks.task.BasicApplication,blivet.tasks.fstask.FSTaskAn abstract class that represents writing a label for a filesystem.
Initializer.
Parameters: an_fs (FS) – a filesystem object -
args¶ A decorator indicating abstract properties.
Requires that the metaclass is ABCMeta or derived from it. A class that has a metaclass derived from ABCMeta cannot be instantiated unless all of its abstract properties are overridden. The abstract properties can be called using any of the normal ‘super’ call mechanisms.
Usage:
- class C(metaclass=ABCMeta):
@abstractproperty def my_abstract_property(self):
...
This defines a read-only property; you can also define a read-write abstract property using the ‘long’ form of property declaration:
- class C(metaclass=ABCMeta):
- def getx(self): ... def setx(self, value): ... x = abstractproperty(getx, setx)
‘abstractproperty’ is deprecated. Use ‘property’ with ‘abstractmethod’ instead.
-
description= 'write filesystem label'¶
-
do_task()¶
-
-
class
blivet.tasks.fswritelabel.JFSWriteLabel(an_fs)¶ Bases:
blivet.tasks.fswritelabel.FSWriteLabelInitializer.
Parameters: an_fs (FS) – a filesystem object -
args¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
-
class
blivet.tasks.fswritelabel.NTFSWriteLabel(an_fs)¶ Bases:
blivet.tasks.fswritelabel.FSWriteLabelInitializer.
Parameters: an_fs (FS) – a filesystem object -
args¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
-
class
blivet.tasks.fswritelabel.ReiserFSWriteLabel(an_fs)¶ Bases:
blivet.tasks.fswritelabel.FSWriteLabelInitializer.
Parameters: an_fs (FS) – a filesystem object -
args¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
-
class
blivet.tasks.fswritelabel.UnimplementedFSWriteLabel(an_fs)¶ Bases:
blivet.tasks.fstask.UnimplementedFSTaskInitializer.
Parameters: an_fs (FS) – a filesystem object
-
class
blivet.tasks.fswritelabel.XFSWriteLabel(an_fs)¶ Bases:
blivet.tasks.fswritelabel.FSWriteLabelInitializer.
Parameters: an_fs (FS) – a filesystem object -
args¶
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
blivet.tasks.lukstasks module¶
-
class
blivet.tasks.lukstasks.LUKSResize(a_luks)¶ Bases:
blivet.tasks.task.BasicApplication,blivet.tasks.dfresize.DFResizeTaskHandle resize of LUKS device.
Initializer.
:param
LUKSa_luks: a LUKS format object-
description= 'resize luks device'¶
-
do_task()¶ Resizes the LUKS format.
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
unit= Size('512 B')¶
-
-
class
blivet.tasks.lukstasks.LUKSSize(a_luks)¶ Bases:
blivet.tasks.task.BasicApplicationObtain information about the size of a LUKS format.
Initializer.
:param
LUKSa_luks: a LUKS format object-
description= 'size of a luks device'¶
-
do_task()¶ Returns the size of the luks format.
Returns: the size of the luks format Return type: Size:raises
LUKSError: if size cannot be obtained
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
blivet.tasks.pvtask module¶
-
class
blivet.tasks.pvtask.PVSize(a_pv)¶ Bases:
blivet.tasks.task.BasicApplicationObtain information about the size of a LVMPV format.
Initializer.
:param
LVMPhysicalVolumea_pv: a LVMPV format object-
description= 'size of a LVMPV format'¶
-
do_task()¶ Returns the size of the LVMPV format.
Returns: the size of the LVMPV format Return type: Size:raises
PhysicalVolumeError: if size cannot be obtained
-
ext= <blivet.tasks.availability.ExternalResource object>¶
-
blivet.tasks.task module¶
-
class
blivet.tasks.task.BasicApplication¶ Bases:
blivet.tasks.task.TaskA task representing an application.
-
depends_on¶
-
ext¶ A decorator indicating abstract properties.
Requires that the metaclass is ABCMeta or derived from it. A class that has a metaclass derived from ABCMeta cannot be instantiated unless all of its abstract properties are overridden. The abstract properties can be called using any of the normal ‘super’ call mechanisms.
Usage:
- class C(metaclass=ABCMeta):
@abstractproperty def my_abstract_property(self):
...
This defines a read-only property; you can also define a read-write abstract property using the ‘long’ form of property declaration:
- class C(metaclass=ABCMeta):
- def getx(self): ... def setx(self, value): ... x = abstractproperty(getx, setx)
‘abstractproperty’ is deprecated. Use ‘property’ with ‘abstractmethod’ instead.
-
-
class
blivet.tasks.task.Task¶ Bases:
objectAn abstract class that represents some task.
-
availability_errors¶ Reasons if this task or the tasks it depends on are unavailable.
-
available¶ True if the task is available, otherwise False.
Returns: True if the task is available Return type: bool
-
depends_on¶ A decorator indicating abstract properties.
Requires that the metaclass is ABCMeta or derived from it. A class that has a metaclass derived from ABCMeta cannot be instantiated unless all of its abstract properties are overridden. The abstract properties can be called using any of the normal ‘super’ call mechanisms.
Usage:
- class C(metaclass=ABCMeta):
@abstractproperty def my_abstract_property(self):
...
This defines a read-only property; you can also define a read-write abstract property using the ‘long’ form of property declaration:
- class C(metaclass=ABCMeta):
- def getx(self): ... def setx(self, value): ... x = abstractproperty(getx, setx)
‘abstractproperty’ is deprecated. Use ‘property’ with ‘abstractmethod’ instead.
-
description¶ A decorator indicating abstract properties.
Requires that the metaclass is ABCMeta or derived from it. A class that has a metaclass derived from ABCMeta cannot be instantiated unless all of its abstract properties are overridden. The abstract properties can be called using any of the normal ‘super’ call mechanisms.
Usage:
- class C(metaclass=ABCMeta):
@abstractproperty def my_abstract_property(self):
...
This defines a read-only property; you can also define a read-write abstract property using the ‘long’ form of property declaration:
- class C(metaclass=ABCMeta):
- def getx(self): ... def setx(self, value): ... x = abstractproperty(getx, setx)
‘abstractproperty’ is deprecated. Use ‘property’ with ‘abstractmethod’ instead.
-
do_task(*args, **kwargs)¶ Do the task for this class.
-
implemented= True¶
-