ppe.ec2
Class Ec2InstanceType
java.lang.Object
ppe.ec2.Ec2InstanceType
- All Implemented Interfaces:
- nbl.utilj.TableModelRowable
public class Ec2InstanceType
- extends java.lang.Object
- implements nbl.utilj.TableModelRowable
Some descriptive information about ec2 instance types.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
instanceType
public com.amazonaws.services.ec2.model.InstanceType instanceType
vt
public Ec2InstanceType.VirtualizationType vt
nCores
public int nCores
ramGB
public double ramGB
clusterSupport
public boolean clusterSupport
description
public java.lang.String description
Ec2InstanceType
public Ec2InstanceType(com.amazonaws.services.ec2.model.InstanceType instanceType,
int nCores,
double ramGB,
boolean clusterSupport,
Ec2InstanceType.VirtualizationType vt,
java.lang.String description)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
isPv
public boolean isPv()
isHvm
public boolean isHvm()
getDescription
public java.lang.String getDescription()
getInstanceType
public static com.amazonaws.services.ec2.model.InstanceType getInstanceType(java.lang.String instanceTypeName)
throws java.lang.IllegalArgumentException
- NOTE/WARNING: there is a bug in the aws implementation of
InstanceType
|. InstanceType.valueOf(java.lang.String)
.
It throws an exception on t1.micro even if it obtained from
InstanceType.values()
.toString(). They've added a kluge method
InstanceType.fromValue(java.lang.String)
that solves the problem.
That method is used in this function. All instance type translation should
be done with this method only.
- Parameters:
instanceTypeName
-
- Returns:
-
- Throws:
java.lang.IllegalArgumentException
getInstanceTypes
public static java.util.List<Ec2InstanceType> getInstanceTypes()
throws java.io.FileNotFoundException,
java.io.IOException,
java.lang.NullPointerException
- Gets a list of supported ec2 instance types as specified in
the instance type file supplied by
- Returns:
-
- Throws:
java.io.FileNotFoundException
java.io.IOException
java.lang.NullPointerException
getInstanceTypeFile
public static java.io.File getInstanceTypeFile()
getInstanceInfo
public static Ec2InstanceType getInstanceInfo(com.amazonaws.services.ec2.model.InstanceType instanceType)
throws java.io.FileNotFoundException,
java.io.IOException
- Throws:
java.io.FileNotFoundException
java.io.IOException
getNCores
public static int getNCores(com.amazonaws.services.ec2.model.InstanceType instanceType)
throws java.io.FileNotFoundException,
java.io.IOException
- Throws:
java.io.FileNotFoundException
java.io.IOException
isPv
public static boolean isPv(java.lang.String s)
- There may be an inconsistency in AWS's strings for virtualization
type. It may be that both 'pv' and 'paravitual' are used. So
isHvm
public static boolean isHvm(java.lang.String s)
getColumnClass
public java.lang.Class getColumnClass(int colIndex)
- Specified by:
getColumnClass
in interface nbl.utilj.TableModelRowable
getColumnName
public java.lang.String getColumnName(int colIndex)
- Specified by:
getColumnName
in interface nbl.utilj.TableModelRowable
getColumnValue
public java.lang.Object getColumnValue(int colIndex)
- Specified by:
getColumnValue
in interface nbl.utilj.TableModelRowable
getNColumns
public int getNColumns()
- Specified by:
getNColumns
in interface nbl.utilj.TableModelRowable
setColumnValue
public void setColumnValue(int colIndex,
java.lang.Object value)
- Specified by:
setColumnValue
in interface nbl.utilj.TableModelRowable
isFullySpecified
public boolean isFullySpecified()