Package io.skodjob.testframe.interfaces
Interface NamespacedResourceType<T extends io.fabric8.kubernetes.api.model.HasMetadata>
- Type Parameters:
T- resource type
- All Superinterfaces:
ResourceType<T>
public interface NamespacedResourceType<T extends io.fabric8.kubernetes.api.model.HasMetadata>
extends ResourceType<T>
Class for encapsulating methods related to
NamespacedResourceType resource.-
Method Summary
Modifier and TypeMethodDescriptionvoidcreateInNamespace(String namespaceName, T resource) Creates specificNamespacedResourceTyperesource in Namespace specified by uservoiddeleteFromNamespace(String namespaceName, String resourceName) DeletesNamespacedResourceTyperesource from Namespace specified by userio.fabric8.kubernetes.client.dsl.MixedOperation<?,?, ?> Get specificNamespacedResourceTypeclient for resorucevoidreplaceInNamespace(String namespaceName, String resourceName, Consumer<T> editor) ReplacesNamespacedResourceTyperesource in Namespace specified by user, usingConsumerfrom which is the currentNamespacedResourceTyperesource updatedvoidupdateInNamespace(String namespaceName, T resource) Updates specificNamespacedResourceTyperesource in Namespace specified by userMethods inherited from interface io.skodjob.testframe.interfaces.ResourceType
create, delete, getKind, replace, update, waitForDeletion, waitForReadiness
-
Method Details
-
getClient
io.fabric8.kubernetes.client.dsl.MixedOperation<?,?, getClient()?> Get specificNamespacedResourceTypeclient for resoruce- Specified by:
getClientin interfaceResourceType<T extends io.fabric8.kubernetes.api.model.HasMetadata>- Returns:
- specific client
-
createInNamespace
Creates specificNamespacedResourceTyperesource in Namespace specified by user- Parameters:
namespaceName- Namespace, where the resource should be createdresource-NamespacedResourceTyperesource
-
updateInNamespace
Updates specificNamespacedResourceTyperesource in Namespace specified by user- Parameters:
namespaceName- Namespace, where the resource should be updatedresource-NamespacedResourceTypeupdated resource
-
deleteFromNamespace
DeletesNamespacedResourceTyperesource from Namespace specified by user- Parameters:
namespaceName- Namespace, where the resource should be deletedresourceName- name of theNamespacedResourceTypethat will be deleted
-
replaceInNamespace
ReplacesNamespacedResourceTyperesource in Namespace specified by user, usingConsumerfrom which is the currentNamespacedResourceTyperesource updated- Parameters:
namespaceName- Namespace, where the resource should be replacedresourceName- name of theNamespacedResourceTypethat will be replacededitor-Consumercontaining updates to the resource
-