testshift.resources.pvc
¶
Module Contents¶
-
class
testshift.resources.pvc.
PVC
(name, namespace=None)¶ Bases:
testshift.resources.base.Resource
PVC class instantiates a single OCP persistent volume claim resource.
- Parameters
name (str) – PersistentVolumeClaim’s name as found in Metadata.
namespace (str) – PersistentVolumeClaim’s namespace.
- Raises
ResourceNotFoundException – When OCP API returns resource not found.
Examples
>>> pvc = PVC("myclaim") >>> pvc.exists True >>> pvc.access_mode ["ReadWriteMany"] >>> pvc.volume_mode 'Filesystem'
-
property
exists
(self)¶ bool: Whether the PVC were found or not.
-
property
access_mode
(self)¶ list(str): List of actual access modes the volume backing the PVC has.
-
property
storage_class
(self)¶ str: The storage class this PVC belongs to.
-
property
volume_mode
(self)¶ str: The type of volume the claim requires.
-
property
volume_name
(self)¶ str: The binding reference to the PersistentVolume backing this PVC.
-
property
bound
(self)¶ bool: Whether the PVC is bound.