Class: VmShepherd::Vcloud::VappConfig
- Inherits:
-
Object
- Object
- VmShepherd::Vcloud::VappConfig
- Includes:
- DataObject
- Defined in:
- lib/vm_shepherd/vcloud/vapp_config.rb
Instance Attribute Summary collapse
-
#catalog ⇒ Object
readonly
Returns the value of attribute catalog.
-
#dns ⇒ Object
readonly
Returns the value of attribute dns.
-
#gateway ⇒ Object
readonly
Returns the value of attribute gateway.
-
#ip ⇒ Object
readonly
Returns the value of attribute ip.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#netmask ⇒ Object
readonly
Returns the value of attribute netmask.
-
#network ⇒ Object
readonly
Returns the value of attribute network.
-
#ntp ⇒ Object
readonly
Returns the value of attribute ntp.
Instance Method Summary collapse
- #build_properties ⇒ Object
-
#initialize(name:, ip:, gateway:, netmask:, dns:, ntp:, catalog:, network:) ⇒ VappConfig
constructor
A new instance of VappConfig.
Methods included from DataObject
Constructor Details
#initialize(name:, ip:, gateway:, netmask:, dns:, ntp:, catalog:, network:) ⇒ VappConfig
Returns a new instance of VappConfig.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/vm_shepherd/vcloud/vapp_config.rb', line 7 def initialize(name:, ip:, gateway:, netmask:, dns:, ntp:, catalog:, network:) @name = name @ip = ip @gateway = gateway @netmask = netmask @dns = dns @ntp = ntp @catalog = catalog @network = network end |
Instance Attribute Details
#catalog ⇒ Object (readonly)
Returns the value of attribute catalog.
5 6 7 |
# File 'lib/vm_shepherd/vcloud/vapp_config.rb', line 5 def catalog @catalog end |
#dns ⇒ Object (readonly)
Returns the value of attribute dns.
5 6 7 |
# File 'lib/vm_shepherd/vcloud/vapp_config.rb', line 5 def dns @dns end |
#gateway ⇒ Object (readonly)
Returns the value of attribute gateway.
5 6 7 |
# File 'lib/vm_shepherd/vcloud/vapp_config.rb', line 5 def gateway @gateway end |
#ip ⇒ Object (readonly)
Returns the value of attribute ip.
5 6 7 |
# File 'lib/vm_shepherd/vcloud/vapp_config.rb', line 5 def ip @ip end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/vm_shepherd/vcloud/vapp_config.rb', line 5 def name @name end |
#netmask ⇒ Object (readonly)
Returns the value of attribute netmask.
5 6 7 |
# File 'lib/vm_shepherd/vcloud/vapp_config.rb', line 5 def netmask @netmask end |
#network ⇒ Object (readonly)
Returns the value of attribute network.
5 6 7 |
# File 'lib/vm_shepherd/vcloud/vapp_config.rb', line 5 def network @network end |
#ntp ⇒ Object (readonly)
Returns the value of attribute ntp.
5 6 7 |
# File 'lib/vm_shepherd/vcloud/vapp_config.rb', line 5 def ntp @ntp end |
Instance Method Details
#build_properties ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/vm_shepherd/vcloud/vapp_config.rb', line 18 def build_properties [ { 'type' => 'string', 'key' => 'gateway', 'value' => gateway, 'password' => 'false', 'userConfigurable' => 'true', 'Label' => 'Default Gateway', 'Description' => 'The default gateway address for the VM network. Leave blank if DHCP is desired.' }, { 'type' => 'string', 'key' => 'DNS', 'value' => dns, 'password' => 'false', 'userConfigurable' => 'true', 'Label' => 'DNS', 'Description' => 'The domain name servers for the VM (comma separated). Leave blank if DHCP is desired.', }, { 'type' => 'string', 'key' => 'ntp_servers', 'value' => ntp, 'password' => 'false', 'userConfigurable' => 'true', 'Label' => 'NTP Servers', 'Description' => 'Comma-delimited list of NTP servers' }, { 'type' => 'string', 'key' => 'admin_password', 'value' => 'tempest', 'password' => 'true', 'userConfigurable' => 'true', 'Label' => 'Admin Password', 'Description' => 'This password is used to SSH into the VM. The username is "tempest".', }, { 'type' => 'string', 'key' => 'ip0', 'value' => ip, 'password' => 'false', 'userConfigurable' => 'true', 'Label' => 'IP Address', 'Description' => 'The IP address for the VM. Leave blank if DHCP is desired.', }, { 'type' => 'string', 'key' => 'netmask0', 'value' => netmask, 'password' => 'false', 'userConfigurable' => 'true', 'Label' => 'Netmask', 'Description' => 'The netmask for the VM network. Leave blank if DHCP is desired.' } ] end |