testshift.resources.pv
¶
Module Contents¶
-
class
testshift.resources.pv.
PV
(name)¶ Bases:
testshift.resources.base.Resource
PV class instantiates a single OCP persistent volume resource.
- Parameters
name (str) – PersistentVolume’s name as found in Metadata.
- Raises
ResourceNotFoundException – When OCP API returns resource not found.
Examples
>>> pv = PV("pv001") >>> pv.exists True >>> pv.access_mode ["ReadWriteMany"] >>> pv.volume_mode 'Filesystem'
-
property
exists
(self)¶ bool: Whether the PV exists or not.
-
property
status
(self)¶ str: PV’s phase, e.g. Bound.
-
property
access_mode
(self)¶ list(str): List of the supported modes.
-
property
volume_mode
(self)¶ str: Return volumeMode from PV’s spec.
-
property
capacity
(self)¶ str: Return the PV capacity as found in its spec.
-
property
claim
(self)¶ str: Return claimRef name, None if the PV is not bound.