@Override public VMImage apply(Image input) { return VMImage.customImage().resourceGroup(extractResourceGroup(input.id())).customImageId(input.id()).location(input.location()).name(input.name()) .offer(input.properties().storageProfile().osDisk().osType()).build(); } }
@Override public boolean apply(NetworkSecurityRule input) { return Direction.Inbound.equals(input.properties().direction()) && Access.Allow.equals(input.properties().access()); } };
public String encodeFieldsToUniqueIdCustom(String location) { return VMImage.customImage().resourceGroup(extractResourceGroup(customImageId())).location(location) .name(extractName(customImageId())).build().encodeFieldsToUniqueIdCustom(); } }
private Image newVirtualMachineImage() { return Image .builder() .name(imageName) .location(location) .properties( ImageProperties .builder() .sourceVirtualMachine(IdReference.create("vmId")) .storageProfile( StorageProfile.create(null, OSDisk.builder().osType("Linux").name("Ubuntu").build(), ImmutableList.<DataDisk> of())).provisioningState("Succeeded").build()).build(); } }
private OSDisk createOSDisk(Image image) { OsFamily osFamily = image.getOperatingSystem().getFamily(); String osType = osFamily == OsFamily.WINDOWS ? "Windows" : "Linux"; return OSDisk.builder() .osType(osType) .caching(DataDisk.CachingTypes.READ_WRITE.toString()) .createOption(CreationData.CreateOptions.FROM_IMAGE.toString()) .managedDiskParameters(ManagedDiskParameters.create(null, StorageAccountType.STANDARD_LRS.toString())) .build(); }
public String encodeFieldsToUniqueId(String location) { return VMImage.azureImage().location(location).publisher(publisher()).offer(offer()).sku(sku()).build() .encodeFieldsToUniqueId(); }
@Override public IdReference apply(NetworkInterfaceCard input) { return IdReference.create(input.properties().ipConfigurations().get(0).id()); } };
@Override public boolean apply(String name) { return !api().get(name).properties().provisioningState().equals(VirtualMachineProperties.ProvisioningState.CREATING); } }, 60 * 20 * 1000).apply(vmName);
@Override public int compare(NetworkSecurityRule left, NetworkSecurityRule right) { return left.properties().priority() - right.properties().priority(); } };
@Override public IdReference apply(IpConfiguration input) { return input.properties().publicIPAddress(); } }), notNull());
public static Builder builder() { return new AutoValue_VirtualMachineScaleSetIpConfigurationProperties.Builder() .lbBackendAddressPools(null) .lbInboundNatPools(null); }
private VirtualMachineScaleSetOSProfile getOSProfile() { VirtualMachineScaleSetOSProfile.LinuxConfiguration linuxConfiguration = VirtualMachineScaleSetOSProfile.LinuxConfiguration.create(false, null); VirtualMachineScaleSetOSProfile.WindowsConfiguration windowsConfiguration = null; return VirtualMachineScaleSetOSProfile.create(vmssName, "jclouds", "jClouds1!", linuxConfiguration, windowsConfiguration, null); }
@Override public VMImage apply(Image input) { return VMImage.customImage().resourceGroup(extractResourceGroup(input.id())).customImageId(input.id()).location(input.location()).name(input.name()) .offer(input.properties().storageProfile().osDisk().osType()).build(); } }
private OSDisk createOSDisk(Image image) { OsFamily osFamily = image.getOperatingSystem().getFamily(); String osType = osFamily == OsFamily.WINDOWS ? "Windows" : "Linux"; return OSDisk.builder() .osType(osType) .caching(DataDisk.CachingTypes.READ_WRITE.toString()) .createOption(CreationData.CreateOptions.FROM_IMAGE.toString()) .managedDiskParameters(ManagedDiskParameters.create(null, StorageAccountType.STANDARD_LRS.toString())) .build(); }
public String encodeFieldsToUniqueIdCustom(String location) { return VMImage.customImage().resourceGroup(extractResourceGroup(customImageId())).location(location) .name(extractName(customImageId())).build().encodeFieldsToUniqueIdCustom(); } }
public String encodeFieldsToUniqueId(String location) { return VMImage.azureImage().location(location).publisher(publisher()).offer(offer()).sku(sku()).build() .encodeFieldsToUniqueId(); }
@Override public boolean apply(NetworkSecurityRule input) { return Direction.Inbound.equals(input.properties().direction()) && Access.Allow.equals(input.properties().access()); } };
@Override public int compare(NetworkSecurityRule left, NetworkSecurityRule right) { return left.properties().priority() - right.properties().priority(); } };
@Override public IdReference apply(IpConfiguration input) { return input.properties().publicIPAddress(); } }), notNull());