org.apache.whirr.service
Class ClusterSpec
java.lang.Object
org.apache.whirr.service.ClusterSpec
public class ClusterSpec
- extends Object
This class represents the specification of a cluster. It is used to describe
the properties of a cluster before it is launched.
ClusterSpec
public ClusterSpec()
throws org.apache.commons.configuration.ConfigurationException
- Throws:
org.apache.commons.configuration.ConfigurationException
ClusterSpec
public ClusterSpec(org.apache.commons.configuration.Configuration config)
throws org.apache.commons.configuration.ConfigurationException
- Throws:
org.apache.commons.configuration.ConfigurationException
- if the public or private key cannot be read.
getInstanceTemplates
public List<ClusterSpec.InstanceTemplate> getInstanceTemplates()
getInstanceTemplate
public ClusterSpec.InstanceTemplate getInstanceTemplate(Set<String> roles)
getInstanceTemplate
public ClusterSpec.InstanceTemplate getInstanceTemplate(String... roles)
getServiceName
public String getServiceName()
getProvider
public String getProvider()
getIdentity
public String getIdentity()
getCredential
public String getCredential()
getClusterName
public String getClusterName()
getPrivateKey
public org.jclouds.io.Payload getPrivateKey()
getPublicKey
public org.jclouds.io.Payload getPublicKey()
readPrivateKey
public String readPrivateKey()
throws IOException
- Throws:
IOException
- if the payload cannot be read- See Also:
getPrivateKey()
readPublicKey
public String readPublicKey()
throws IOException
- Throws:
IOException
- if the payload cannot be read- See Also:
getPublicKey()
getImageId
public String getImageId()
getHardwareId
public String getHardwareId()
getLocationId
public String getLocationId()
getClientCidrs
public List<String> getClientCidrs()
getVersion
public String getVersion()
getRunUrlBase
public String getRunUrlBase()
setInstanceTemplates
public void setInstanceTemplates(List<ClusterSpec.InstanceTemplate> instanceTemplates)
setServiceName
public void setServiceName(String serviceName)
setProvider
public void setProvider(String provider)
setIdentity
public void setIdentity(String identity)
setCredential
public void setCredential(String credential)
setClusterName
public void setClusterName(String clusterName)
setPublicKey
public void setPublicKey(String publicKey)
- The rsa public key which is authorized to login to your on the cloud nodes.
- Parameters:
publicKey
-
setPublicKey
public void setPublicKey(File publicKey)
throws IOException
- Throws:
IOException
- if there is a problem reading the file- See Also:
setPublicKey(String)
setPrivateKey
public void setPrivateKey(String privateKey)
- The rsa private key which is used as the login identity on the cloud
nodes.
- Parameters:
privateKey
-
setPrivateKey
public void setPrivateKey(File privateKey)
throws IOException
- Throws:
IOException
- if there is a problem reading the file- See Also:
setPrivateKey(String)
setImageId
public void setImageId(String imageId)
setHardwareId
public void setHardwareId(String hardwareId)
setLocationId
public void setLocationId(String locationId)
setClientCidrs
public void setClientCidrs(List<String> clientCidrs)
setVersion
public void setVersion(String version)
setRunUrlBase
public void setRunUrlBase(String runUrlBase)
getConfiguration
public org.apache.commons.configuration.Configuration getConfiguration()
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2010 The Apache Software Foundation. All Rights Reserved.