if (getNetworkInterfaces() != null) sb.append("NetworkInterfaces: ").append(getNetworkInterfaces()).append(","); if (getRootDeviceName() != null) sb.append("RootDeviceName: ").append(getRootDeviceName()).append(","); if (getRootDeviceType() != null) sb.append("RootDeviceType: ").append(getRootDeviceType()).append(",");
hashCode = prime * hashCode + ((getElasticInferenceAcceleratorAssociations() == null) ? 0 : getElasticInferenceAcceleratorAssociations().hashCode()); hashCode = prime * hashCode + ((getNetworkInterfaces() == null) ? 0 : getNetworkInterfaces().hashCode()); hashCode = prime * hashCode + ((getRootDeviceName() == null) ? 0 : getRootDeviceName().hashCode()); hashCode = prime * hashCode + ((getRootDeviceType() == null) ? 0 : getRootDeviceType().hashCode()); hashCode = prime * hashCode + ((getSecurityGroups() == null) ? 0 : getSecurityGroups().hashCode());
if (other.getNetworkInterfaces() != null && other.getNetworkInterfaces().equals(this.getNetworkInterfaces()) == false) return false; if (other.getRootDeviceName() == null ^ this.getRootDeviceName() == null) return false; if (other.getRootDeviceName() != null && other.getRootDeviceName().equals(this.getRootDeviceName()) == false) return false; if (other.getRootDeviceType() == null ^ this.getRootDeviceType() == null)
if (getArchitecture() != null) sb.append("Architecture: " + getArchitecture() + ","); if (getRootDeviceType() != null) sb.append("RootDeviceType: " + getRootDeviceType() + ","); if (getRootDeviceName() != null) sb.append("RootDeviceName: " + getRootDeviceName() + ","); if (getBlockDeviceMappings() != null) sb.append("BlockDeviceMappings: " + getBlockDeviceMappings() + ","); if (getVirtualizationType() != null) sb.append("VirtualizationType: " + getVirtualizationType() + ",");
hashCode = prime * hashCode + ((getArchitecture() == null) ? 0 : getArchitecture().hashCode()); hashCode = prime * hashCode + ((getRootDeviceType() == null) ? 0 : getRootDeviceType().hashCode()); hashCode = prime * hashCode + ((getRootDeviceName() == null) ? 0 : getRootDeviceName().hashCode()); hashCode = prime * hashCode + ((getBlockDeviceMappings() == null) ? 0 : getBlockDeviceMappings().hashCode()); hashCode = prime * hashCode + ((getVirtualizationType() == null) ? 0 : getVirtualizationType().hashCode());
if (other.getRootDeviceType() == null ^ this.getRootDeviceType() == null) return false; if (other.getRootDeviceType() != null && other.getRootDeviceType().equals(this.getRootDeviceType()) == false) return false; if (other.getRootDeviceName() == null ^ this.getRootDeviceName() == null) return false; if (other.getRootDeviceName() != null && other.getRootDeviceName().equals(this.getRootDeviceName()) == false) return false; if (other.getBlockDeviceMappings() == null ^ this.getBlockDeviceMappings() == null) return false; if (other.getBlockDeviceMappings() != null && other.getBlockDeviceMappings().equals(this.getBlockDeviceMappings()) == false) return false;
protected InstanceBlockDeviceMapping getRootVolumeMapping(Instance instance) { checkNotNull(instance, "instance"); String rootDeviceName = instance.getRootDeviceName(); List<InstanceBlockDeviceMapping> mappings = instance.getBlockDeviceMappings(); for (InstanceBlockDeviceMapping mapping : mappings) { if (rootDeviceName.equals(mapping.getDeviceName())) { return mapping; } } throw illegalState("Unable to locate the root volume mapping for [%s]", instance.getInstanceId()); }
if (getNetworkInterfaces() != null) sb.append("NetworkInterfaces: ").append(getNetworkInterfaces()).append(","); if (getRootDeviceName() != null) sb.append("RootDeviceName: ").append(getRootDeviceName()).append(","); if (getRootDeviceType() != null) sb.append("RootDeviceType: ").append(getRootDeviceType()).append(",");
hashCode = prime * hashCode + ((getElasticInferenceAcceleratorAssociations() == null) ? 0 : getElasticInferenceAcceleratorAssociations().hashCode()); hashCode = prime * hashCode + ((getNetworkInterfaces() == null) ? 0 : getNetworkInterfaces().hashCode()); hashCode = prime * hashCode + ((getRootDeviceName() == null) ? 0 : getRootDeviceName().hashCode()); hashCode = prime * hashCode + ((getRootDeviceType() == null) ? 0 : getRootDeviceType().hashCode()); hashCode = prime * hashCode + ((getSecurityGroups() == null) ? 0 : getSecurityGroups().hashCode());
protected Image createAmi(CreateAMIRequest create, Instance instance, Snapshot snapshot) { BlockDeviceMapping rootVolumeMapping = getRootVolumeMapping(instance, snapshot.getSnapshotId(), create.getRootVolume()); List<BlockDeviceMapping> mappings = newArrayList(); mappings.add(rootVolumeMapping); for (BlockDeviceMapping mapping : create.getAdditionalMappings()) { mappings.add(mapping); } RegisterImageRequest request = new RegisterImageRequest(); request.setName(create.getName().getValue()); request.setDescription(create.getDescription()); request.setArchitecture(instance.getArchitecture()); request.setRootDeviceName(instance.getRootDeviceName()); request.setKernelId(instance.getKernelId()); request.setBlockDeviceMappings(mappings); RegisterImageResult result = client.registerImage(request); String imageId = result.getImageId(); waitForAmiState(imageId, AMI_AVAILABLE_STATE, create.getTimeoutMillis()); tag(imageId, create.getName()); return getImage(imageId); }
this.ramdisk = instance.getRamdiskId(); this.subnet = instance.getSubnetId(); this.rootDeviceName = instance.getRootDeviceName(); this.rootDeviceType = instance.getRootDeviceType(); this.stateTransitionReason = instance.getStateTransitionReason();
if (other.getNetworkInterfaces() != null && other.getNetworkInterfaces().equals(this.getNetworkInterfaces()) == false) return false; if (other.getRootDeviceName() == null ^ this.getRootDeviceName() == null) return false; if (other.getRootDeviceName() != null && other.getRootDeviceName().equals(this.getRootDeviceName()) == false) return false; if (other.getRootDeviceType() == null ^ this.getRootDeviceType() == null)