libioc.events module¶
ioc events collection.
-
class
libioc.events.
AttachZFSDataset
(jail, dataset, scope=None)[source]¶ Bases:
libioc.events.JailZFSShare
Mount an individual dataset when starting a jail with shared ZFS.
-
class
libioc.events.
BasejailStorageConfig
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
Mount or unmount basejail storage of a jail.
-
class
libioc.events.
BootstrapPkg
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
,libioc.events.PkgEvent
Bootstrap pkg within a jail.
-
class
libioc.events.
BundleBackup
(destination, resource, message=None, scope=None)[source]¶ Bases:
libioc.events.ResourceBackup
Bundle exported data into a backup archive.
-
class
libioc.events.
DevFSEvent
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
Group of events that occor on DevFS operations.
-
class
libioc.events.
ExecuteResourceUpdate
(resource, message=None, scope=None)[source]¶ Bases:
libioc.events.ResourceUpdate
Execute the updater script in a jail.
-
class
libioc.events.
ExportConfig
(resource, message=None, scope=None)[source]¶ Bases:
libioc.events.ResourceBackup
Event that occurs when the config of a resource is exported.
-
class
libioc.events.
ExportFstab
(resource, message=None, scope=None)[source]¶ Bases:
libioc.events.ResourceBackup
Event that occurs when the fstab file of a jail is exported.
-
class
libioc.events.
ExportOtherDataset
(resource, dataset, flags={}, message=None, scope=None)[source]¶ Bases:
libioc.events.ResourceBackup
Export one of a resources datasets.
-
class
libioc.events.
ExportOtherDatasets
(resource, message=None, scope=None)[source]¶ Bases:
libioc.events.ResourceBackup
Event that occurs when other resource datasets get exported.
-
class
libioc.events.
ExportRootDataset
(resource, message=None, scope=None)[source]¶ Bases:
libioc.events.ResourceBackup
Export a resources root dataset.
-
class
libioc.events.
ExtractBundle
(source, destination, resource, message=None, scope=None)[source]¶ Bases:
libioc.events.ResourceBackup
Extract a bundled backup archive.
-
class
libioc.events.
FetchRelease
(release, message=None, scope=None)[source]¶ Bases:
libioc.events.ReleaseEvent
Fetch release assets.
-
class
libioc.events.
FstabEvent
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
Group of events that occor on Fstab operations.
-
class
libioc.events.
ImportConfig
(resource, message=None, scope=None)[source]¶ Bases:
libioc.events.ResourceBackup
Event that occurs when the config of a resource is imported.
-
class
libioc.events.
ImportFstab
(resource, message=None, scope=None)[source]¶ Bases:
libioc.events.ResourceBackup
Event that occurs when the fstab file of a jail is imported.
-
class
libioc.events.
ImportOtherDataset
(resource, dataset_name, message=None, scope=None)[source]¶ Bases:
libioc.events.ResourceBackup
Export one of a resources datasets.
-
property
dataset_name
¶ Map the event identifier to dataset_name.
- Return type
str
-
property
-
class
libioc.events.
ImportOtherDatasets
(resource, message=None, scope=None)[source]¶ Bases:
libioc.events.ResourceBackup
Event that occurs when other resource datasets get exported.
-
class
libioc.events.
ImportRootDataset
(resource, message=None, scope=None)[source]¶ Bases:
libioc.events.ResourceBackup
Import data from an an archived root dataset.
-
class
libioc.events.
IocEvent
(message=None, scope=None)[source]¶ Bases:
object
The base event class of liblibioc.
-
add_rollback_step
(method)[source]¶ Add a rollback step that is executed when the event fails.
- Return type
None
-
child_event
(event)[source]¶ Append the event to the child_events for later notification.
- Return type
-
property
duration
¶ Return the duration of finished events.
- Return type
Optional
[float
]
-
fail_generator
(exception=True, message=None)[source]¶ End an event with a failure via a generator of rollback steps.
- Return type
Generator
[IocEvent
,None
,None
]
-
get_state_string
(error='failed', skipped='skipped', done='done', pending='pending')[source]¶ Get a humanreadable string according to the jail state.
- Return type
str
-
property
pending
¶ Return True if the event is pending.
- Return type
bool
-
rollback
()[source]¶ Rollback all rollback steps in reverse order.
- Return type
Optional
[Generator
[IocEvent
,None
,None
]]
-
property
type
¶ Return the events type.
The event type is obtained from an IocEvent’s class name.
- Return type
str
-
-
class
libioc.events.
JailAttach
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
Remove the jail(2).
-
class
libioc.events.
JailClone
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
Clone a jail.
-
class
libioc.events.
JailCommand
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailHook
Run command in a jail.
-
class
libioc.events.
JailDependantStart
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
Start one dependant jail.
-
class
libioc.events.
JailDependantsStart
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
Start dependant jails.
-
class
libioc.events.
JailEvent
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.IocEvent
Any event related to a jail.
-
class
libioc.events.
JailFstabUpdate
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
Update a jails fstab file.
-
class
libioc.events.
JailHook
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
Run jail hook.
-
class
libioc.events.
JailHookCreated
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailHook
Run jail created hook.
-
class
libioc.events.
JailHookPoststart
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailHook
Run jail poststart hook.
-
class
libioc.events.
JailHookPoststop
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailHook
Run jail poststop hook.
-
class
libioc.events.
JailHookPrestart
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailHook
Run jail prestart hook.
-
class
libioc.events.
JailHookPrestop
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailHook
Run jail prestop hook.
-
class
libioc.events.
JailHookStart
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailHook
Run jail start hook.
-
class
libioc.events.
JailHookStop
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailHook
Run jail stop hook.
-
class
libioc.events.
JailNetworkSetup
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.VnetEvent
Start VNET networks.
-
class
libioc.events.
JailNetworkTeardown
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailStop
Teardown a jails network.
-
class
libioc.events.
JailProvisioning
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
Provision a jail.
-
class
libioc.events.
JailProvisioningAssetDownload
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
Provision a jail.
-
class
libioc.events.
JailRemove
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
Remove the jail(2).
-
class
libioc.events.
JailRename
(jail, current_name, new_name, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
Change the name of a jail.
-
class
libioc.events.
JailResolverConfig
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
Update a jails /etc/resolv.conf file.
-
class
libioc.events.
JailResourceLimitAction
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
Set or unset a jails resource limits.
-
class
libioc.events.
JailRestart
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
Restart a jail.
-
class
libioc.events.
JailSoftShutdown
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
Soft-restart a jail.
-
class
libioc.events.
JailStart
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
Start a jail.
-
class
libioc.events.
JailStop
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
Destroy the jail.
Bases:
libioc.events.JailEvent
Group of events that mounts or unmounts shared ZFS datasets.
-
class
libioc.events.
MountDevFS
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.DevFSEvent
Mount /dev into a jail.
-
class
libioc.events.
MountFdescfs
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.DevFSEvent
Mount /dev/fd into a jail.
-
class
libioc.events.
MountFstab
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.FstabEvent
Mount entries from a jails fstab file.
-
class
libioc.events.
PackageConfiguration
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
,libioc.events.PkgEvent
Install packages in a jail.
-
class
libioc.events.
PackageFetch
(packages, message=None, scope=None)[source]¶ Bases:
libioc.events.PkgEvent
Fetch packages for offline installation.
-
class
libioc.events.
PackageInstall
(packages, jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
,libioc.events.PkgEvent
Install packages in a jail.
-
class
libioc.events.
PackageRemove
(packages, jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
,libioc.events.PkgEvent
Remove packages from a jail.
-
class
libioc.events.
PkgEvent
(message=None, scope=None)[source]¶ Bases:
libioc.events.IocEvent
Collection of events related to Pkg.
-
class
libioc.events.
ReleaseAssetDownload
(release, message=None, scope=None)[source]¶ Bases:
libioc.events.FetchRelease
Download release assets.
-
class
libioc.events.
ReleaseConfiguration
(release, message=None, scope=None)[source]¶ Bases:
libioc.events.FetchRelease
Pre-configure a release with reasonable defaults.
-
class
libioc.events.
ReleaseCopyBase
(release, message=None, scope=None)[source]¶ Bases:
libioc.events.FetchRelease
Copy the basejail folders of a release into individual ZFS datasets.
-
class
libioc.events.
ReleaseDownload
(release, message=None, scope=None)[source]¶ Bases:
libioc.events.FetchRelease
Download release assets.
-
class
libioc.events.
ReleaseEvent
(release, message=None, scope=None)[source]¶ Bases:
libioc.events.IocEvent
Event related to a release.
-
class
libioc.events.
ReleaseExtraction
(release, message=None, scope=None)[source]¶ Bases:
libioc.events.FetchRelease
Extract a release asset.
-
class
libioc.events.
ReleasePrepareStorage
(release, message=None, scope=None)[source]¶ Bases:
libioc.events.FetchRelease
Prepare the storage of a release before fetching it.
-
class
libioc.events.
ReleaseUpdate
(release, message=None, scope=None)[source]¶ Bases:
libioc.events.ReleaseEvent
Update a release.
-
class
libioc.events.
ReleaseUpdateDownload
(release, message=None, scope=None)[source]¶ Bases:
libioc.events.ReleaseUpdate
Download resource updates/patches.
-
class
libioc.events.
ReleaseUpdatePull
(release, message=None, scope=None)[source]¶ Bases:
libioc.events.ReleaseUpdate
Pull resource updater and patches from the remote.
-
class
libioc.events.
ResourceBackup
(resource, message=None, scope=None)[source]¶ Bases:
libioc.events.IocEvent
Events that occur when backing up a resource.
-
class
libioc.events.
ResourceEvent
(resource, message=None, scope=None)[source]¶ Bases:
libioc.events.IocEvent
Event with a resource.
-
class
libioc.events.
ResourceUpdate
(resource, message=None, scope=None)[source]¶ Bases:
libioc.events.ResourceEvent
Update a resource.
-
class
libioc.events.
RunResourceUpdate
(resource, message=None, scope=None)[source]¶ Bases:
libioc.events.ResourceUpdate
Run the update of a resource.
-
class
libioc.events.
TeardownSystemMounts
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailStop
Teardown a jails mountpoints.
-
class
libioc.events.
UnmountFstab
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.FstabEvent
Unmount entries from a jails fstab file.
-
class
libioc.events.
VnetEvent
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailEvent
A group of events around VNET operations.
-
class
libioc.events.
VnetInterfaceConfig
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailNetworkSetup
Configure VNET network interfaces and firewall.
-
class
libioc.events.
VnetSetRoutes
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailNetworkSetup
Set a VNET jails network routes.
-
class
libioc.events.
VnetSetupLocalhost
(jail, message=None, scope=None)[source]¶ Bases:
libioc.events.JailNetworkSetup
Configure a VNET jails localhost.
-
class
libioc.events.
ZFSDatasetDestroy
(dataset, message=None, scope=None)[source]¶ Bases:
libioc.events.ZFSEvent
Rename a ZFS dataset.
-
class
libioc.events.
ZFSDatasetRename
(dataset, message=None, scope=None)[source]¶ Bases:
libioc.events.ZFSEvent
Rename a ZFS dataset.
-
class
libioc.events.
ZFSEvent
(zfs_object, message=None, scope=None)[source]¶ Bases:
libioc.events.IocEvent
Event related to ZFS storage.
-
class
libioc.events.
ZFSSnapshotClone
(snapshot, target, scope=None)[source]¶ Bases:
libioc.events.ZFSEvent
Clone a ZFS snapshot to a target.
-
class
libioc.events.
ZFSSnapshotRename
(snapshot, message=None, scope=None)[source]¶ Bases:
libioc.events.ZFSEvent
Rename a ZFS snapshot.
-
class
libioc.events.
ZFSSnapshotRollback
(snapshot, target, scope=None)[source]¶ Bases:
libioc.events.ZFSEvent
Rollback a ZFS dataset to a snapshot.