File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ require 'fog/azurerm'
2+ require 'yaml'
3+
4+ azure_credentials = YAML . load_file ( File . expand_path ( 'credentials/azure.yml' , __dir__ ) )
5+
6+ compute = Fog ::Compute ::AzureRM . new (
7+ tenant_id : azure_credentials [ 'tenant_id' ] ,
8+ client_id : azure_credentials [ 'client_id' ] ,
9+ client_secret : azure_credentials [ 'client_secret' ] ,
10+ subscription_id : azure_credentials [ 'subscription_id' ]
11+ )
12+
13+ ########################################################################################################################
14+ ###################### List virtual machine sizes ######################
15+ ########################################################################################################################
16+
17+ begin
18+ puts 'List of virtual machine sizes:'
19+ virtual_machine_sizes = compute . virtual_machine_sizes ( location : LOCATION )
20+ virtual_machine_sizes . each do |virtual_machine_size |
21+ puts "- #{ virtual_machine_size . name } "
22+ end
23+
24+ puts 'Integration Test for virtual machine size ran successfully!'
25+ rescue
26+ puts 'Integration Test for virtual machine size is failing!'
27+ end
You can’t perform that action at this time.
0 commit comments