Пример #1
0
        private async Task <Identifier> GetDefaultImage()
        {
            if (_defaultImage == null)
            {
                var images = await _compute.ListImageSummariesAsync(new ImageListOptions { Name = "cirros" });

                _defaultImage = images.First().Id;
            }
            return(_defaultImage);
        }
Пример #2
0
        public async Task ListImageSummariesTest()
        {
            var results = await _compute.ListImageSummariesAsync(new ImageListOptions { PageSize = 1 });

            while (results.Any())
            {
                var result = results.First();
                Assert.NotNull(result.Name);

                Trace.WriteLine("Getting next page...");
                results = await results.GetNextPageAsync();
            }
            Assert.NotNull(results);
        }