public Placement unmarshall(StaxUnmarshallerContext context) throws Exception { Placement placement = new Placement(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; placement.setAvailabilityZone(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; placement.setAffinity(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; placement.setGroupName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; placement.setPartitionNumber(IntegerStaxUnmarshaller.getInstance().unmarshall(context)); continue; placement.setHostId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; placement.setTenancy(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; placement.setSpreadDomain(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue;
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode()); hashCode = prime * hashCode + ((getAffinity() == null) ? 0 : getAffinity().hashCode()); hashCode = prime * hashCode + ((getGroupName() == null) ? 0 : getGroupName().hashCode()); hashCode = prime * hashCode + ((getPartitionNumber() == null) ? 0 : getPartitionNumber().hashCode()); hashCode = prime * hashCode + ((getHostId() == null) ? 0 : getHostId().hashCode()); hashCode = prime * hashCode + ((getTenancy() == null) ? 0 : getTenancy().hashCode()); hashCode = prime * hashCode + ((getSpreadDomain() == null) ? 0 : getSpreadDomain().hashCode()); return hashCode; }
run.withMinCount(launchCount).withMaxCount(launchCount); run.withSecurityGroupIds(securityGroup); Placement placement = new Placement(); placement.setGroupName(USER); run.withPlacement(placement); BlockDeviceMapping map = new BlockDeviceMapping();
runInstancesRequest = runInstancesRequest.withPlacement( new Placement( stack.getDataCenter() ) ); client.setEndpoint( AmazonUtils.getEndpoint( stack.getDataCenter() ) );
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode()); hashCode = prime * hashCode + ((getGroupName() == null) ? 0 : getGroupName().hashCode()); hashCode = prime * hashCode + ((getTenancy() == null) ? 0 : getTenancy().hashCode()); hashCode = prime * hashCode + ((getHostId() == null) ? 0 : getHostId().hashCode()); hashCode = prime * hashCode + ((getAffinity() == null) ? 0 : getAffinity().hashCode()); return hashCode; }
public Placement unmarshall(StaxUnmarshallerContext context) throws Exception { Placement placement = new Placement(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; placement.setAvailabilityZone(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; placement.setGroupName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; placement.setTenancy(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; placement.setHostId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; placement.setAffinity(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue;
Placement placement = new Placement(getZone()); if (getUseDedicatedTenancy()) { placement.setTenancy("dedicated");
Placement placement = new Placement().withAvailabilityZone(zone); request = request.withPlacement(placement);
public static String getLocation(com.amazonaws.services.ec2.model.Instance instance, String role) { String zone = instance.getPlacement().getAvailabilityZone(); String region = zone.substring(0, zone.length() - 1); return Joiner.on('/').join("", "ec2", region, zone, instance.getInstanceId(), role); }
this.lifecycle = instance.getInstanceLifecycle(); this.hypervisor = instance.getHypervisor(); this.az = instance.getPlacement().getAvailabilityZone(); this.group = instance.getPlacement().getGroupName(); this.tenancy = instance.getPlacement().getTenancy(); this.vpc = instance.getVpcId(); this.platform = instance.getPlatform();
/** * <p> * The name of the placement group the instance is in. * </p> * * @param groupName * The name of the placement group the instance is in. * @return Returns a reference to this object so that method calls can be chained together. */ public Placement withGroupName(String groupName) { setGroupName(groupName); return this; }
/** * <p> * The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of * <code>dedicated</code> runs on single-tenant hardware. The <code>host</code> tenancy is not supported for the * <a>ImportInstance</a> command. * </p> * * @param tenancy * The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of * <code>dedicated</code> runs on single-tenant hardware. The <code>host</code> tenancy is not supported for * the <a>ImportInstance</a> command. * @return Returns a reference to this object so that method calls can be chained together. * @see Tenancy */ public Placement withTenancy(String tenancy) { setTenancy(tenancy); return this; }
/** * @see org.apache.airavata.xbaya.ui.widgets.TableRenderable#getValue(int) */ @Override public Object getValue(int index) { switch (index) { case 0: return this.instance.getInstanceId(); case 1: return this.instance.getImageId(); case 2: return this.instance.getRootDeviceType(); case 3: return this.instance.getInstanceType(); case 4: return this.instance.getState().getName(); case 5: return this.instance.getKeyName(); case 6: return this.instance.getMonitoring().getState(); case 7: return this.instance.getVirtualizationType(); case 8: return this.instance.getPlacement().getGroupName(); default: return null; } }
runInstancesRequest = runInstancesRequest.withPlacement( new Placement( stack.getDataCenter() ) ); client.setEndpoint( AmazonUtils.getEndpoint( stack.getDataCenter() ) );
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Placement == false) return false; Placement other = (Placement)obj; if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == null) return false; if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == false) return false; if (other.getGroupName() == null ^ this.getGroupName() == null) return false; if (other.getGroupName() != null && other.getGroupName().equals(this.getGroupName()) == false) return false; if (other.getTenancy() == null ^ this.getTenancy() == null) return false; if (other.getTenancy() != null && other.getTenancy().equals(this.getTenancy()) == false) return false; if (other.getHostId() == null ^ this.getHostId() == null) return false; if (other.getHostId() != null && other.getHostId().equals(this.getHostId()) == false) return false; if (other.getAffinity() == null ^ this.getAffinity() == null) return false; if (other.getAffinity() != null && other.getAffinity().equals(this.getAffinity()) == false) return false; return true; }
Placement placement = new Placement(getZone()); if (getUseDedicatedTenancy()) { placement.setTenancy("dedicated");
public static String getLocation(com.amazonaws.services.ec2.model.Instance instance, String role) { String zone = instance.getPlacement().getAvailabilityZone(); String region = zone.substring(0, zone.length() - 1); return Joiner.on('/').join("", "ec2", region, zone, instance.getInstanceId(), role); }
/** * <p> * The name of the placement group the instance is in. * </p> * * @param groupName * The name of the placement group the instance is in. * @return Returns a reference to this object so that method calls can be chained together. */ public Placement withGroupName(String groupName) { setGroupName(groupName); return this; }
/** * <p> * The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of * <code>dedicated</code> runs on single-tenant hardware. The <code>host</code> tenancy is not supported for the * <a>ImportInstance</a> command. * </p> * * @param tenancy * The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of * <code>dedicated</code> runs on single-tenant hardware. The <code>host</code> tenancy is not supported for * the <a>ImportInstance</a> command. * @return Returns a reference to this object so that method calls can be chained together. * @see Tenancy */ public Placement withTenancy(String tenancy) { setTenancy(tenancy); return this; }
return false; Placement other = (Placement) obj; if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == null) return false; if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == false) return false; if (other.getAffinity() == null ^ this.getAffinity() == null) return false; if (other.getAffinity() != null && other.getAffinity().equals(this.getAffinity()) == false) return false; if (other.getGroupName() == null ^ this.getGroupName() == null) return false; if (other.getGroupName() != null && other.getGroupName().equals(this.getGroupName()) == false) return false; if (other.getPartitionNumber() == null ^ this.getPartitionNumber() == null) return false; if (other.getPartitionNumber() != null && other.getPartitionNumber().equals(this.getPartitionNumber()) == false) return false; if (other.getHostId() == null ^ this.getHostId() == null) return false; if (other.getHostId() != null && other.getHostId().equals(this.getHostId()) == false) return false; if (other.getTenancy() == null ^ this.getTenancy() == null) return false; if (other.getTenancy() != null && other.getTenancy().equals(this.getTenancy()) == false) return false; if (other.getSpreadDomain() == null ^ this.getSpreadDomain() == null) return false; if (other.getSpreadDomain() != null && other.getSpreadDomain().equals(this.getSpreadDomain()) == false)