Class: Chef::Knife::AzurermServerShow

Inherits:
Chef::Knife show all
Includes:
AzurermBase
Defined in:
lib/chef/knife/azurerm_server_show.rb

Instance Method Summary collapse

Methods included from AzurermBase

#authentication_details, #azure_authentication, #check_token_validity, #find_file, #get_azure_cli_version, included, #is_token_valid?, #msg_server_summary, #parse_publish_settings_file, #refresh_token, #service, #token_details_for_linux, #token_details_for_windows, #token_details_from_accessToken_file, #validate_arm_keys!, #validate_azure_login, #validate_params!

Instance Method Details

#runObject



33
34
35
36
37
38
39
40
41
42
43
# File 'lib/chef/knife/azurerm_server_show.rb', line 33

def run
  $stdout.sync = true
  # check azure cli version due to azure changed `azure` to `az` in azure-cli2.0
  get_azure_cli_version
  validate_arm_keys!(:azure_resource_group_name)
  begin
    service.show_server(@name_args[0], config[:azure_resource_group_name])
  rescue => error
    service.common_arm_rescue_block(error)
  end
end