Exemplo n.º 1
0
        public async Task GetAllSystemImagesAllLocations()
        {
            using (ComputeApiClient apiClient = new ComputeApiClient("AU"))
            {
                await apiClient.LoginAsync(
                    accountCredentials : GetIntegrationTestCredentials()
                    );

                foreach (DatacenterSummary datacenter in await apiClient.GetAvailableDataCentersAsync())
                {
                    TestContext.WriteLine("DataCenter '{0}' ({1}):", datacenter.LocationCode, datacenter.DisplayName);

                    foreach (var image in await apiClient.GetImagesAsync(datacenter.LocationCode))
                    {
                        TestContext.WriteLine(
                            "\tImage '{0}' (Id = '{1}') - '{2}' ({3})",
                            image.name,
                            image.id,
                            image
                            .machineSpecification
                            .operatingSystem
                            .displayName,
                            image
                            .machineSpecification
                            .operatingSystem
                            .type
                            );
                    }
                }
            }
        }
Exemplo n.º 2
0
        public async Task GetAllSystemImagesAU1()
        {
            IReadOnlyList <DeployedImageWithSoftwareLabelsType> images;

            using (ComputeApiClient apiClient = new ComputeApiClient("AU"))
            {
                await apiClient.LoginAsync(
                    accountCredentials : GetIntegrationTestCredentials()
                    );

                images = await apiClient.GetImagesAsync("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
                    );
            }
        }