hashCode = prime * hashCode + ((getSshKeyName() == null) ? 0 : getSshKeyName().hashCode()); hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getSubnetId() == null) ? 0 : getSubnetId().hashCode()); hashCode = prime * hashCode + ((getTenancy() == null) ? 0 : getTenancy().hashCode());
if (other.getStackId() != null && other.getStackId().equals(this.getStackId()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getSubnetId() == null ^ this.getSubnetId() == null)
protocolMarshaller.marshall(instance.getSshKeyName(), SSHKEYNAME_BINDING); protocolMarshaller.marshall(instance.getStackId(), STACKID_BINDING); protocolMarshaller.marshall(instance.getStatus(), STATUS_BINDING); protocolMarshaller.marshall(instance.getSubnetId(), SUBNETID_BINDING); protocolMarshaller.marshall(instance.getTenancy(), TENANCY_BINDING);
public static void waitForOpsworksInstanceToReachState( AWSOpsWorksClient client, String instanceId, String state) throws InterruptedException { System.out.println("Waiting for instance " + instanceId + " to transition to " + state); int count = 0; while (true) { Thread.sleep(1000 * 30); if (count++ > 100) { throw new RuntimeException("Never reached " + state); } Instance instance = client .describeInstances( new DescribeInstancesRequest() .withInstanceIds(instanceId)) .getInstances().get(0); String status = instance.getStatus(); System.out.println(status); if (status.contains("failed")) { throw new RuntimeException("instance failed to launch"); } if (!status.equalsIgnoreCase(state)) { continue; } return; } } }
hashCode = prime * hashCode + ((getSshKeyName() == null) ? 0 : getSshKeyName().hashCode()); hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getSubnetId() == null) ? 0 : getSubnetId().hashCode()); hashCode = prime * hashCode + ((getTenancy() == null) ? 0 : getTenancy().hashCode());
if (other.getStackId() != null && other.getStackId().equals(this.getStackId()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getSubnetId() == null ^ this.getSubnetId() == null)
protocolMarshaller.marshall(instance.getSshKeyName(), SSHKEYNAME_BINDING); protocolMarshaller.marshall(instance.getStackId(), STACKID_BINDING); protocolMarshaller.marshall(instance.getStatus(), STATUS_BINDING); protocolMarshaller.marshall(instance.getSubnetId(), SUBNETID_BINDING); protocolMarshaller.marshall(instance.getTenancy(), TENANCY_BINDING);