def get_resource_api(api_client: client.ApiClient = None,
                      **kwargs) -> "client.SchedulingV1Api":
     """
     Returns an instance of the kubernetes API client associated with
     this object.
     """
     if api_client:
         kwargs["apl_client"] = api_client
     return client.SchedulingV1Api(**kwargs)
示例#2
0
def fake_k8s_client_dict():
    k8s_client_dict = {
        'v1': client.CoreV1Api(),
        'apiregistration.k8s.io/v1': client.ApiregistrationV1Api(),
        'apps/v1': client.AppsV1Api(),
        'authentication.k8s.io/v1': client.AuthenticationV1Api(),
        'authorization.k8s.io/v1': client.AuthorizationV1Api(),
        'autoscaling/v1': client.AutoscalingV1Api(),
        'batch/v1': client.BatchV1Api(),
        'coordination.k8s.io/v1': client.CoordinationV1Api(),
        'networking.k8s.io/v1': client.NetworkingV1Api(),
        'rbac.authorization.k8s.io/v1': client.RbacAuthorizationV1Api(),
        'scheduling.k8s.io/v1': client.SchedulingV1Api(),
        'storage.k8s.io/v1': client.StorageV1Api()
    }
    return k8s_client_dict
示例#3
0
 def get_scheduling_v1_api_client(self, auth):
     k8s_client = self.get_k8s_client(auth_plugin=auth)
     return client.SchedulingV1Api(api_client=k8s_client)