Class VmDefinitionStub


A stub for namespaced custom objects.

It uses a dynamic model (see K8sDynamicModel) for representing the object’s state and can therefore be used for any kind of object, especially custom objects.

  • Constructor Details

    • VmDefinitionStub

      public VmDefinitionStub(K8sClient client, io.kubernetes.client.Discovery.APIResource context, String namespace, String name)
      Instantiates a new stub for VM defintions.
      Parameters:
      client - the client
      context - the context
      namespace - the namespace
      name - the name
  • Method Details

    • get

      public static VmDefinitionStub get(K8sClient client, io.kubernetes.client.apimachinery.GroupVersionKind gvk, String namespace, String name) throws io.kubernetes.client.openapi.ApiException
      Get a dynamic object stub.

      If the version in parameter gvk is an empty string, the stub refers to the first object with matching group and kind.

      Parameters:
      client - the client
      gvk - the group, version and kind
      namespace - the namespace
      name - the name
      Returns:
      the stub if the object exists
      Throws:
      io.kubernetes.client.openapi.ApiException - the api exception
    • get

      public static VmDefinitionStub get(K8sClient client, io.kubernetes.client.Discovery.APIResource context, String namespace, String name)
      Get a dynamic object stub.
      Parameters:
      client - the client
      context - the context
      namespace - the namespace
      name - the name
      Returns:
      the stub if the object exists
      Throws:
      io.kubernetes.client.openapi.ApiException - the api exception
    • createFromYaml

      public static VmDefinitionStub createFromYaml(K8sClient client, io.kubernetes.client.Discovery.APIResource context, Reader yaml) throws io.kubernetes.client.openapi.ApiException
      Creates a stub from yaml.
      Parameters:
      client - the client
      context - the context
      yaml - the yaml
      Returns:
      the k 8 s dynamic stub
      Throws:
      io.kubernetes.client.openapi.ApiException - the api exception
    • list

      public static Collection<VmDefinitionStub> list(K8sClient client, io.kubernetes.client.Discovery.APIResource context, String namespace, io.kubernetes.client.util.generic.options.ListOptions options) throws io.kubernetes.client.openapi.ApiException
      Get the stubs for the objects in the given namespace that match the criteria from the given options.
      Parameters:
      client - the client
      namespace - the namespace
      options - the options
      Returns:
      the collection
      Throws:
      io.kubernetes.client.openapi.ApiException - the api exception
    • list

      public static Collection<VmDefinitionStub> list(K8sClient client, io.kubernetes.client.Discovery.APIResource context, String namespace) throws io.kubernetes.client.openapi.ApiException
      Get the stubs for the objects in the given namespace.
      Parameters:
      client - the client
      namespace - the namespace
      Returns:
      the collection
      Throws:
      io.kubernetes.client.openapi.ApiException - the api exception