testshift.resources.service
¶
Module Contents¶
-
class
testshift.resources.service.
Service
(name, namespace=None)¶ Bases:
testshift.resources.base.Resource
Service class instantiates a single OCP service resource.
- Parameters
name (str) – Pod’s name as found in pod.metadata
namespace (str) – Namespace where the pod is running
- Raises
ResourceNotFoundException – When OCP API returns resource not found.
Examples
>>> svc = Service("virt-api", "openshift-cnv") >>> svc.exists True >>> svc.ports [443]
-
property
exists
(self)¶ bool: Whether services were found or not.
-
property
service_type
(self)¶ str: Service type.
-
property
ports
(self)¶ list(int): all exposed ports.