Public Member Functions | Public Attributes | Static Public Attributes | Static Private Member Functions | List of all members
framework.infrastructure.k8s.KubernetesNamespace Class Reference

Public Member Functions

def __init__ (self, KubernetesApiManager api, str name)
 
def apply_manifest (self, manifest)
 
def delete (self, grace_period_seconds=DELETE_GRACE_PERIOD_SEC)
 
def delete_deployment (self, name, grace_period_seconds=DELETE_GRACE_PERIOD_SEC)
 
def delete_service (self, name, grace_period_seconds=DELETE_GRACE_PERIOD_SEC)
 
def delete_service_account (self, name, grace_period_seconds=DELETE_GRACE_PERIOD_SEC)
 
V1Namespace get (self)
 
V1Deployment get_deployment (self, name)
 
client.V1Pod get_pod (self, name)
 
V1Service get_service (self, name)
 
V1Service get_service_account (self, name)
 
Tuple[str, List[str]] get_service_neg (self, str service_name, int service_port)
 
List[V1Podlist_deployment_pods (self, V1Deployment deployment)
 
List[V1Podlist_pods_with_labels (self, dict labels)
 
PortForwarder port_forward_pod (self, V1Pod pod, int remote_port, Optional[int] local_port=None, Optional[str] local_address=None)
 
def wait_for_deployment_available_replicas (self, name, count=1, timeout_sec=WAIT_MEDIUM_TIMEOUT_SEC, wait_sec=WAIT_MEDIUM_SLEEP_SEC)
 
def wait_for_deployment_deleted (self, str deployment_name, timeout_sec=WAIT_MEDIUM_TIMEOUT_SEC, wait_sec=WAIT_MEDIUM_SLEEP_SEC)
 
def wait_for_namespace_deleted (self, timeout_sec=WAIT_LONG_TIMEOUT_SEC, wait_sec=WAIT_LONG_SLEEP_SEC)
 
def wait_for_pod_started (self, pod_name, timeout_sec=WAIT_SHORT_TIMEOUT_SEC, wait_sec=WAIT_SHORT_SLEEP_SEC)
 
def wait_for_service_account_deleted (self, str name, timeout_sec=WAIT_SHORT_TIMEOUT_SEC, wait_sec=WAIT_SHORT_SLEEP_SEC)
 
def wait_for_service_deleted (self, str name, timeout_sec=WAIT_SHORT_TIMEOUT_SEC, wait_sec=WAIT_SHORT_SLEEP_SEC)
 
def wait_for_service_neg (self, str name, timeout_sec=WAIT_SHORT_TIMEOUT_SEC, wait_sec=WAIT_SHORT_SLEEP_SEC)
 

Public Attributes

 api
 
 name
 

Static Public Attributes

 int
 
string NEG_STATUS_META = 'cloud.google.com/neg-status'
 

Static Private Member Functions

def _pod_started (V1Pod pod)
 
def _replicas_available (deployment, count)
 

Detailed Description

Definition at line 173 of file k8s.py.

Constructor & Destructor Documentation

◆ __init__()

def framework.infrastructure.k8s.KubernetesNamespace.__init__ (   self,
KubernetesApiManager  api,
str  name 
)

Definition at line 183 of file k8s.py.

Member Function Documentation

◆ _pod_started()

def framework.infrastructure.k8s.KubernetesNamespace._pod_started ( V1Pod  pod)
staticprivate

Definition at line 404 of file k8s.py.

◆ _replicas_available()

def framework.infrastructure.k8s.KubernetesNamespace._replicas_available (   deployment,
  count 
)
staticprivate

Definition at line 408 of file k8s.py.

◆ apply_manifest()

def framework.infrastructure.k8s.KubernetesNamespace.apply_manifest (   self,
  manifest 
)

Definition at line 187 of file k8s.py.

◆ delete()

def framework.infrastructure.k8s.KubernetesNamespace.delete (   self,
  grace_period_seconds = DELETE_GRACE_PERIOD_SEC 
)

Definition at line 224 of file k8s.py.

◆ delete_deployment()

def framework.infrastructure.k8s.KubernetesNamespace.delete_deployment (   self,
  name,
  grace_period_seconds = DELETE_GRACE_PERIOD_SEC 
)

Definition at line 312 of file k8s.py.

◆ delete_service()

def framework.infrastructure.k8s.KubernetesNamespace.delete_service (   self,
  name,
  grace_period_seconds = DELETE_GRACE_PERIOD_SEC 
)

Definition at line 200 of file k8s.py.

◆ delete_service_account()

def framework.infrastructure.k8s.KubernetesNamespace.delete_service_account (   self,
  name,
  grace_period_seconds = DELETE_GRACE_PERIOD_SEC 
)

Definition at line 210 of file k8s.py.

◆ get()

V1Namespace framework.infrastructure.k8s.KubernetesNamespace.get (   self)

Definition at line 221 of file k8s.py.

◆ get_deployment()

V1Deployment framework.infrastructure.k8s.KubernetesNamespace.get_deployment (   self,
  name 
)

Definition at line 309 of file k8s.py.

◆ get_pod()

client.V1Pod framework.infrastructure.k8s.KubernetesNamespace.get_pod (   self,
  name 
)

Definition at line 371 of file k8s.py.

◆ get_service()

V1Service framework.infrastructure.k8s.KubernetesNamespace.get_service (   self,
  name 
)

Definition at line 193 of file k8s.py.

◆ get_service_account()

V1Service framework.infrastructure.k8s.KubernetesNamespace.get_service_account (   self,
  name 
)

Definition at line 197 of file k8s.py.

◆ get_service_neg()

Tuple[str, List[str]] framework.infrastructure.k8s.KubernetesNamespace.get_service_neg (   self,
str  service_name,
int  service_port 
)

Definition at line 299 of file k8s.py.

◆ list_deployment_pods()

List[V1Pod] framework.infrastructure.k8s.KubernetesNamespace.list_deployment_pods (   self,
V1Deployment  deployment 
)

Definition at line 322 of file k8s.py.

◆ list_pods_with_labels()

List[V1Pod] framework.infrastructure.k8s.KubernetesNamespace.list_pods_with_labels (   self,
dict  labels 
)

Definition at line 366 of file k8s.py.

◆ port_forward_pod()

PortForwarder framework.infrastructure.k8s.KubernetesNamespace.port_forward_pod (   self,
V1Pod  pod,
int  remote_port,
Optional[int]   local_port = None,
Optional[str]   local_address = None 
)

Definition at line 390 of file k8s.py.

◆ wait_for_deployment_available_replicas()

def framework.infrastructure.k8s.KubernetesNamespace.wait_for_deployment_available_replicas (   self,
  name,
  count = 1,
  timeout_sec = WAIT_MEDIUM_TIMEOUT_SEC,
  wait_sec = WAIT_MEDIUM_SLEEP_SEC 
)

Definition at line 326 of file k8s.py.

◆ wait_for_deployment_deleted()

def framework.infrastructure.k8s.KubernetesNamespace.wait_for_deployment_deleted (   self,
str  deployment_name,
  timeout_sec = WAIT_MEDIUM_TIMEOUT_SEC,
  wait_sec = WAIT_MEDIUM_SLEEP_SEC 
)

Definition at line 347 of file k8s.py.

◆ wait_for_namespace_deleted()

def framework.infrastructure.k8s.KubernetesNamespace.wait_for_namespace_deleted (   self,
  timeout_sec = WAIT_LONG_TIMEOUT_SEC,
  wait_sec = WAIT_LONG_SLEEP_SEC 
)

Definition at line 265 of file k8s.py.

◆ wait_for_pod_started()

def framework.infrastructure.k8s.KubernetesNamespace.wait_for_pod_started (   self,
  pod_name,
  timeout_sec = WAIT_SHORT_TIMEOUT_SEC,
  wait_sec = WAIT_SHORT_SLEEP_SEC 
)

Definition at line 374 of file k8s.py.

◆ wait_for_service_account_deleted()

def framework.infrastructure.k8s.KubernetesNamespace.wait_for_service_account_deleted (   self,
str  name,
  timeout_sec = WAIT_SHORT_TIMEOUT_SEC,
  wait_sec = WAIT_SHORT_SLEEP_SEC 
)

Definition at line 248 of file k8s.py.

◆ wait_for_service_deleted()

def framework.infrastructure.k8s.KubernetesNamespace.wait_for_service_deleted (   self,
str  name,
  timeout_sec = WAIT_SHORT_TIMEOUT_SEC,
  wait_sec = WAIT_SHORT_SLEEP_SEC 
)

Definition at line 231 of file k8s.py.

◆ wait_for_service_neg()

def framework.infrastructure.k8s.KubernetesNamespace.wait_for_service_neg (   self,
str  name,
  timeout_sec = WAIT_SHORT_TIMEOUT_SEC,
  wait_sec = WAIT_SHORT_SLEEP_SEC 
)

Definition at line 281 of file k8s.py.

Member Data Documentation

◆ api

framework.infrastructure.k8s.KubernetesNamespace.api

Definition at line 185 of file k8s.py.

◆ int

framework.infrastructure.k8s.KubernetesNamespace.int
static

Definition at line 175 of file k8s.py.

◆ name

framework.infrastructure.k8s.KubernetesNamespace.name

Definition at line 184 of file k8s.py.

◆ NEG_STATUS_META

string framework.infrastructure.k8s.KubernetesNamespace.NEG_STATUS_META = 'cloud.google.com/neg-status'
static

Definition at line 174 of file k8s.py.


The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:10