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 classes/interfaces inherited from class hudson.slaves.Cloud
Cloud.CloudState
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
Nested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType
-
Field Summary
-
Constructor Summary
ConstructorDescriptionComputeEngineCloud
(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 TypeMethodDescriptionvoid
addConfiguration
(InstanceConfiguration configuration) Deprecated.boolean
canProvision
(Label label) org.kohsuke.stapler.HttpResponse
doProvision
(String configuration) com.google.cloud.graphite.platforms.plugin.client.ComputeClient
Returns GCP client for that cloud.getInstanceConfigurationByDescription
(String description) GetsInstanceConfiguration
that has the matching Description.getInstanceConfigurations
(Label label) Gets all instances ofInstanceConfiguration
that has the matchingLabel
.boolean
static void
log
(Logger logger, Level level, TaskListener listener, String message) static void
protected Object
void
setConfigurations
(List<InstanceConfiguration> configurations) Set configurations for this cloud.void
setInstanceId
(String instanceId) Sets unique ID of that cloud instance.void
setNoDelayProvisioning
(boolean noDelayProvisioning) Methods inherited from class hudson.slaves.AbstractCloudImpl
getInstanceCap, getInstanceCapStr, setInstanceCap, setInstanceCapStr
Methods inherited from class hudson.slaves.Cloud
all, canProvision, doConfigSubmit, doDoDelete, getACL, getDescriptor, getIcon, getIconAltText, getIconClassName, getSearchUrl, getUrl, provision, reconfigure, registerPermissions
Methods inherited from class hudson.model.Actionable
addAction, addOrReplaceAction, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, getDynamic, removeAction, removeActions, replaceAction, replaceActions
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
getDisplayName
in interfaceModelObject
- Overrides:
getDisplayName
in 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.
-
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:
canProvision
in classCloud
-
getInstanceConfigurations
public List<InstanceConfiguration> getInstanceConfigurations(Label label) throws NoConfigurationException Gets all instances ofInstanceConfiguration
that has the matchingLabel
.- Throws:
NoConfigurationException
-
getInstanceConfigurationByDescription
GetsInstanceConfiguration
that has the matching Description. -
doProvision
public org.kohsuke.stapler.HttpResponse doProvision(@QueryParameter String configuration) throws javax.servlet.ServletException, IOException - Throws:
javax.servlet.ServletException
IOException
-
getProjectId
-
getCredentialsId
-
getInstanceId
-
getConfigurations
-