X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric_robot_suite%2Fric-python-utils%2Fricutils%2FKubernetesEntity.py;h=74bddb3820593f1dcf3936419b78b6e05fb7e283;hb=427c16323bdc11b3ffa338ce51a2d509698ce7db;hp=f4583bcafc0b9fc1b60713ffd2cd09f228df95a5;hpb=cc685917b28444e6e9fc70f1a96b14e073d8cec7;p=it%2Ftest.git diff --git a/ric_robot_suite/ric-python-utils/ricutils/KubernetesEntity.py b/ric_robot_suite/ric-python-utils/ricutils/KubernetesEntity.py index f4583bc..74bddb3 100644 --- a/ric_robot_suite/ric-python-utils/ricutils/KubernetesEntity.py +++ b/ric_robot_suite/ric-python-utils/ricutils/KubernetesEntity.py @@ -48,6 +48,12 @@ class KubernetesEntity(object): return self._k8sApp.read_namespaced_deployment(namespace=namespace or self._ns, name=name) + def StatefulSet(self, name, namespace=None): + # as above, but for statefulsets, and with the assumption + # that the typical check here sfst.replicas == sfst.ready_replicas + return self._k8sApp.read_namespaced_stateful_set(namespace = namespace or self._ns, + name=name) + def Service(self, name, namespace=None): # as above, we'll rely on this to throw if the svc dne. @@ -57,7 +63,7 @@ class KubernetesEntity(object): return self._k8sCore.read_namespaced_service(namespace=namespace or self._ns, name=name) - def Pod(self, name, namepsace=None): + def Pod(self, name, namespace=None): return self._k8sCore.read_namespaced_pod(namespace=namespace or self._ns, name=name)