public async Task GetAllSystemImagesAU1() { IReadOnlyList<DeployedImageWithSoftwareLabelsType> images; using (ComputeApiClient apiClient = new ComputeApiClient("AU")) { await apiClient.LoginAsync( accountCredentials: GetIntegrationTestCredentials() ); images = await apiClient.GetImages("AU1"); } foreach (var image in images) { TestContext.WriteLine( "Image '{0}' (Id = '{1}') - '{2}' ({3})", image.name, image.id, image .machineSpecification .operatingSystem .displayName, image .machineSpecification .operatingSystem .type ); } }
public async Task GetAllSystemImagesAllLocations() { using (ComputeApiClient apiClient = new ComputeApiClient("AU")) { await apiClient.LoginAsync( accountCredentials: GetIntegrationTestCredentials() ); foreach (DatacenterWithMaintenanceStatusType datacenter in await apiClient.GetDataCentersWithMaintenanceStatuses()) { TestContext.WriteLine("DataCenter '{0}' ({1}):", datacenter.location, datacenter.displayName); foreach (var image in await apiClient.GetImages(null,null,datacenter.location,null,null)) { TestContext.WriteLine( "\tImage '{0}' (Id = '{1}') - '{2}' ({3})", image.name, image.id, image.operatingSystem[0].type, image.operatingSystem[0].displayName ); } } } }