Class ComputeEngineCloud
java.lang.Object
hudson.model.AbstractModelObject
hudson.model.Actionable
hudson.slaves.Cloud
hudson.slaves.AbstractCloudImpl
com.google.jenkins.plugins.computeengine.ComputeEngineCloud
- All Implemented Interfaces:
ExtensionPoint,Describable<Cloud>,ModelObject,SearchableModelObject,SearchItem,AccessControlled,ModelObjectWithContextMenu
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class hudson.slaves.Cloud
Cloud.CloudStateNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionComputeEngineCloud(String cloudName, String projectId, String credentialsId, String instanceCapStr) ComputeEngineCloud(String cloudName, String projectId, String credentialsId, String instanceCapStr, List<InstanceConfiguration> configurations) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConfiguration(InstanceConfiguration configuration) Deprecated.booleancanProvision(Label label) org.kohsuke.stapler.HttpResponsedoProvision(String configuration) com.google.cloud.graphite.platforms.plugin.client.ComputeClientReturns GCP client for that cloud.getInstanceConfigurationByDescription(String description) GetsInstanceConfigurationthat has the matching Description.getInstanceConfigurations(Label label) Gets all instances ofInstanceConfigurationthat has the matchingLabel.booleanstatic voidlog(Logger logger, Level level, TaskListener listener, String message) static voidprotected ObjectvoidsetConfigurations(List<InstanceConfiguration> configurations) Set configurations for this cloud.voidsetInstanceId(String instanceId) Sets unique ID of that cloud instance.voidsetNoDelayProvisioning(boolean noDelayProvisioning) Methods inherited from class hudson.slaves.AbstractCloudImpl
getInstanceCap, getInstanceCapStr, setInstanceCap, setInstanceCapStrMethods inherited from class hudson.slaves.Cloud
all, canProvision, doConfigSubmit, doDoDelete, getACL, getDescriptor, getIcon, getIconAltText, getIconClassName, getSearchUrl, getUrl, provision, reconfigure, reconfigure, registerPermissionsMethods inherited from class hudson.model.Actionable
addAction, addOrReplaceAction, doContextMenu, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, getDynamic, getDynamic, removeAction, removeActions, replaceAction, replaceActionsMethods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendErrorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
-
Field Details
-
CLOUD_PREFIX
- See Also:
-
CONFIG_LABEL_KEY
- See Also:
-
CLOUD_ID_LABEL_KEY
- See Also:
-
-
Constructor Details
-
ComputeEngineCloud
-
ComputeEngineCloud
@Deprecated public ComputeEngineCloud(String cloudName, String projectId, String credentialsId, String instanceCapStr, List<InstanceConfiguration> configurations) Deprecated.
-
-
Method Details
-
log
-
log
public static void log(Logger logger, Level level, TaskListener listener, String message, Throwable exception) -
getCloudName
-
getDisplayName
- Specified by:
getDisplayNamein interfaceModelObject- Overrides:
getDisplayNamein classCloud
-
isNoDelayProvisioning
public boolean isNoDelayProvisioning() -
setNoDelayProvisioning
@DataBoundSetter public void setNoDelayProvisioning(boolean noDelayProvisioning) -
readResolve
-
setInstanceId
Sets unique ID of that cloud instance.This ID allows us to find machines from our cloud in GCP. This value should not change between config reload, or nodes may be lost in GCP side
-
getClient
public com.google.cloud.graphite.platforms.plugin.client.ComputeClient getClient()Returns GCP client for that cloud.- Returns:
- GCP client object.
-
getClientV2
- Throws:
IOExceptionGeneralSecurityException
-
setConfigurations
Set configurations for this cloud.- Parameters:
configurations- configurations to be used
-
addConfiguration
Deprecated.Adds one configuration.- Parameters:
configuration- configuration to add
-
provision
-
canProvision
- Overrides:
canProvisionin classCloud
-
getInstanceConfigurations
public List<InstanceConfiguration> getInstanceConfigurations(Label label) throws NoConfigurationException Gets all instances ofInstanceConfigurationthat has the matchingLabel.- Throws:
NoConfigurationException
-
getInstanceConfigurationByDescription
GetsInstanceConfigurationthat has the matching Description. -
doProvision
public org.kohsuke.stapler.HttpResponse doProvision(@QueryParameter String configuration) throws jakarta.servlet.ServletException, IOException - Throws:
jakarta.servlet.ServletExceptionIOException
-
getProjectId
-
getCredentialsId
-
getInstanceId
-
getConfigurations
-