testshift.resources.deployment
¶
Module Contents¶
-
class
testshift.resources.deployment.
Deployment
(name=None, namespace=None)¶ Bases:
testshift.resources.base.Resource
Deployment class instantiates an OCP deployment resource.
- Parameters
name (str) – Deployment’s name as found in deployment.metadata
namespace (str) – Namespace where the deployment was created
Examples
>>> deployment = Deployment( name="performance-operator", namespace="openshift-performance-addon") >>> deployment.exists True >>> deployment = Deployment(name="performance-operator") >>> deployment.replicas 3
-
property
exists
(self)¶ bool: If the deployment is found, self._deployments won’t be False.
-
property
replicas
(self)¶ int: Return the number of non-terminated pods on this deployment.
-
property
name
(self)¶ str: Return name as found in the resource’s metadata.
-
property
namespace
(self)¶ str: Return namespace as found in the resource’s metadata.