Class: HammerCLIForemanAzureRM::ComputeResources::AzureRM

Inherits:
HammerCLIForeman::ComputeResources::Base
  • Object
show all
Defined in:
lib/hammer_cli_foreman_azure_rm/compute_resources/azure_rm.rb

Instance Method Summary collapse

Instance Method Details

#compute_attributesObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/hammer_cli_foreman_azure_rm/compute_resources/azure_rm.rb', line 10

def compute_attributes
  [
    ['resource_group', _('Existing Azure Resource Group of user')],
    ['vm_size', _('VM Size, eg. Standard_A0 etc.')],
    ['username', _('The Admin username')],
    ['password', _('The Admin password')],
    ['platform', _('OS type eg. Linux')],
    ['ssh_key_data', _('SSH key for passwordless authentication')],
    ['os_disk_caching', _('OS disk caching')],
    ['premium_os_disk', _('Premium OS Disk, Boolean as 0 or 1')],
    ['script_command', _('Custom Script Command')],
    ['script_uris', _('Comma seperated file URIs')]
  ]
end

#interface_attributesObject



25
26
27
28
29
30
31
# File 'lib/hammer_cli_foreman_azure_rm/compute_resources/azure_rm.rb', line 25

def interface_attributes
  [
    ['compute_network',    _('Select one of available Azure Subnets, must be an ID')],
    ['compute_public_ip',  _('Public IP (None, Static, Dynamic)')],
    ['compute_private_ip', _('Static Private IP (expressed as true or false)')]
  ]
end

#mandatory_resource_optionsObject



42
43
44
# File 'lib/hammer_cli_foreman_azure_rm/compute_resources/azure_rm.rb', line 42

def mandatory_resource_options
  super + %i[tenant app_ident secret_key sub_id region]
end

#nameObject



6
7
8
# File 'lib/hammer_cli_foreman_azure_rm/compute_resources/azure_rm.rb', line 6

def name
  _('AzureRM')
end

#provider_specific_fieldsObject



33
34
35
36
37
38
39
40
# File 'lib/hammer_cli_foreman_azure_rm/compute_resources/azure_rm.rb', line 33

def provider_specific_fields
  [
      Fields::Field.new(:label => _('tenant'), :path => [:tenant]),
      Fields::Field.new(:label => _('app_ident'), :path => [:app_ident]),
      Fields::Field.new(:label => _('sub_id'), :path => [:sub_id]),
      Fields::Field.new(:label => _('region'), :path => [:region])
  ]
end