Package io.jenkins.plugins.kubevirt
Interface VMTemplateGroup
- All Known Implementing Classes:
KubeVirtCloud
public interface VMTemplateGroup
A group of VM templates that can be saved together.
This interface is implemented by KubeVirtCloud to provide template management.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddTemplate(KubeVirtTemplate template) Add the template to the group.default voidChecks whether the currentAuthenticationhas sufficient permissions to manage the templates in this group.default booleanvoidremoveTemplate(KubeVirtTemplate template) Removes the template from the group.voidreplaceTemplate(KubeVirtTemplate oldTemplate, KubeVirtTemplate newTemplate) Replaces the old template with the new template.
-
Method Details
-
addTemplate
Add the template to the group.- Parameters:
template- the template to add
-
replaceTemplate
Replaces the old template with the new template.- Parameters:
oldTemplate- the old template to replacenewTemplate- the new template to replace with
-
removeTemplate
Removes the template from the group.- Parameters:
template- the template to remove
-
getVMTemplateGroupUrl
String getVMTemplateGroupUrl()- Returns:
- the URL to redirect to after the template is saved.
-
getManagePermission
Permission getManagePermission()- Returns:
- The permission required to manage the templates in this group.
-
hasManagePermission
default boolean hasManagePermission()- Returns:
trueif the currentAuthenticationhas permissions to add / replace / remove templates.
-
checkManagePermission
default void checkManagePermission() throws org.springframework.security.access.AccessDeniedExceptionChecks whether the currentAuthenticationhas sufficient permissions to manage the templates in this group.- Throws:
org.springframework.security.access.AccessDeniedException- if access is denied for the currentAuthentication.
-