Class: Fog::Compute::Cloudstack::Zone

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/cloudstack/models/compute/zone.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dns1Object

Returns the value of attribute dns1



15
16
17
# File 'lib/fog/cloudstack/models/compute/zone.rb', line 15

def dns1
  @dns1
end

#dns2Object

Returns the value of attribute dns2



15
16
17
# File 'lib/fog/cloudstack/models/compute/zone.rb', line 15

def dns2
  @dns2
end

#guest_cidr_addressObject

Returns the value of attribute guest_cidr_address



15
16
17
# File 'lib/fog/cloudstack/models/compute/zone.rb', line 15

def guest_cidr_address
  @guest_cidr_address
end

#internaldns1Object

Returns the value of attribute internaldns1



15
16
17
# File 'lib/fog/cloudstack/models/compute/zone.rb', line 15

def internaldns1
  @internaldns1
end

#internaldns2Object

Returns the value of attribute internaldns2



15
16
17
# File 'lib/fog/cloudstack/models/compute/zone.rb', line 15

def internaldns2
  @internaldns2
end

Instance Method Details

#saveObject



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/fog/cloudstack/models/compute/zone.rb', line 17

def save
  options = {
    'dns1'                  => dns1,
    'internaldns1'          => internaldns1,
    'name'                  => name,
    'networktype'           => network_type,
    'allocationstate'       => allocation_state,
    'dns2'                  => dns2,
    'domain'                => domain_name,
    'domainid'              => domain_id,
    'guestcidraddress'      => guest_cidr_address,
    'internaldns2'          => internaldns2,
    'securitygroupenabled'  => security_groups_enabled,
  }
  data = service.create_zone(options)
  merge_attributes(data['createzoneresponse'])
end