org.jenkinsci.plugins.mesos
Class MesosCloud

java.lang.Object
  extended by hudson.model.AbstractModelObject
      extended by hudson.slaves.Cloud
          extended by org.jenkinsci.plugins.mesos.MesosCloud
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.slaves.Cloud>, hudson.model.ModelObject, hudson.search.SearchableModelObject, hudson.search.SearchItem, hudson.security.AccessControlled

public class MesosCloud
extends hudson.slaves.Cloud


Nested Class Summary
static class MesosCloud.DescriptorImpl
           
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.slaves.Cloud
ALL, name, PROVISION
 
Constructor Summary
MesosCloud(String nativeLibraryPath, String master, String description, String frameworkName, String slavesUser, String principal, String secret, List<MesosSlaveInfo> slaveInfos, boolean checkpoint, boolean onDemandRegistration)
           
 
Method Summary
 boolean canProvision(hudson.model.Label label)
           
static MesosCloud get()
           
 String getDescription()
           
 MesosCloud.DescriptorImpl getDescriptor()
           
 String getFrameworkName()
           
 String getMaster()
           
 String getNativeLibraryPath()
           
 String getPrincipal()
           
 String getSecret()
           
 net.sf.json.JSONObject getSlaveAttributeForLabel(String labelName)
          Retrieves the slaveattribute corresponding to label name.
 List<MesosSlaveInfo> getSlaveInfos()
           
 String getSlavesUser()
           
static void init()
          We want to start the Mesos scheduler as part of the initialization of Jenkins and after the cloud class values have been restored from persistence.If this is the very first time, this method will be NOOP as MesosCloud is not registered yet.
 boolean isCheckpoint()
           
 boolean isOnDemandRegistration()
           
 Collection<hudson.slaves.NodeProvisioner.PlannedNode> provision(hudson.model.Label label, int excessWorkload)
           
 void restartMesos()
           
 void setDescription(String description)
           
 void setFrameworkName(String frameworkName)
           
 void setMaster(String master)
           
 void setNativeLibraryPath(String nativeLibraryPath)
           
 void setOnDemandRegistration(boolean onDemandRegistration)
           
 void setPrincipal(String principal)
           
 void setSecret(String secret)
           
 void setSlaveInfos(List<MesosSlaveInfo> slaveInfos)
           
 void setSlavesUser(String slavesUser)
           
 
Methods inherited from class hudson.slaves.Cloud
all, checkPermission, getACL, getDisplayName, getSearchUrl, hasPermission
 
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
 

Constructor Detail

MesosCloud

@DataBoundConstructor
public MesosCloud(String nativeLibraryPath,
                                       String master,
                                       String description,
                                       String frameworkName,
                                       String slavesUser,
                                       String principal,
                                       String secret,
                                       List<MesosSlaveInfo> slaveInfos,
                                       boolean checkpoint,
                                       boolean onDemandRegistration)
           throws NumberFormatException
Throws:
NumberFormatException
Method Detail

init

@Initializer(after=JOB_LOADED)
public static void init()
We want to start the Mesos scheduler as part of the initialization of Jenkins and after the cloud class values have been restored from persistence.If this is the very first time, this method will be NOOP as MesosCloud is not registered yet.


restartMesos

public void restartMesos()

provision

public Collection<hudson.slaves.NodeProvisioner.PlannedNode> provision(hudson.model.Label label,
                                                                       int excessWorkload)
Specified by:
provision in class hudson.slaves.Cloud

getSlaveInfos

public List<MesosSlaveInfo> getSlaveInfos()

setSlaveInfos

public void setSlaveInfos(List<MesosSlaveInfo> slaveInfos)

canProvision

public boolean canProvision(hudson.model.Label label)
Specified by:
canProvision in class hudson.slaves.Cloud

getNativeLibraryPath

public String getNativeLibraryPath()

setNativeLibraryPath

public void setNativeLibraryPath(String nativeLibraryPath)

getMaster

public String getMaster()

setMaster

public void setMaster(String master)

getDescription

public String getDescription()

setDescription

public void setDescription(String description)

getFrameworkName

public String getFrameworkName()

setFrameworkName

public void setFrameworkName(String frameworkName)

getSlavesUser

public String getSlavesUser()

setSlavesUser

public void setSlavesUser(String slavesUser)

getPrincipal

public String getPrincipal()

setPrincipal

public void setPrincipal(String principal)

getSecret

public String getSecret()

setSecret

public void setSecret(String secret)

isOnDemandRegistration

public boolean isOnDemandRegistration()

setOnDemandRegistration

public void setOnDemandRegistration(boolean onDemandRegistration)

getDescriptor

public MesosCloud.DescriptorImpl getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<hudson.slaves.Cloud>
Overrides:
getDescriptor in class hudson.slaves.Cloud

get

public static MesosCloud get()

isCheckpoint

public boolean isCheckpoint()
Returns:
the checkpoint

getSlaveAttributeForLabel

public net.sf.json.JSONObject getSlaveAttributeForLabel(String labelName)
Retrieves the slaveattribute corresponding to label name.

Parameters:
Jenkins - label name.
Returns:
slaveattribute as a JSONObject.


Copyright © 2004-2015. All Rights Reserved.