Sha256: aef5c793b99da1dbfa6196245f58b98e68d27745daadb1e0c2079de97d0dce69

Contents?: true

Size: 1.59 KB

Versions: 65

Compression:

Stored size: 1.59 KB

Contents

module Fog
  module Compute
    class Cloudstack
      class Zone < Fog::Model
        identity  :id,                          :aliases => 'id'
        attribute :name
        attribute :domain_id,                   :aliases => 'domainid'
        attribute :domain_name,                 :aliases => ['domainname', 'domain']
        attribute :network_type,                :aliases => 'networktype'
        attribute :security_groups_enabled,     :aliases => ['securitygroupsenabled', 'securitygroupenabled']
        attribute :allocation_state,            :aliases => 'allocationstate'
        attribute :zone_token,                  :aliases => 'zonetoken'
        attribute :dhcp_provider,               :aliases => 'dhcpprovider'

        attr_accessor :dns1, :dns2, :internaldns1, :internaldns2, :guest_cidr_address

        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
      end # Zone
    end # Cloudstack
  end # Compute
end # Fog

Version data entries

65 entries across 65 versions & 6 rubygems

Version Path
fog-1.22.0 lib/fog/cloudstack/models/compute/zone.rb
fog-1.21.0 lib/fog/cloudstack/models/compute/zone.rb
fog-maestrodev-1.20.0.20140305101839 lib/fog/cloudstack/models/compute/zone.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/cloudstack/models/compute/zone.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/cloudstack/models/compute/zone.rb
fog-1.20.0 lib/fog/cloudstack/models/compute/zone.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/cloudstack/models/compute/zone.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/cloudstack/models/compute/zone.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/cloudstack/models/compute/zone.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/cloudstack/models/compute/zone.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/cloudstack/models/compute/zone.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/cloudstack/models/compute/zone.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/cloudstack/models/compute/zone.rb
fog-1.19.0 lib/fog/cloudstack/models/compute/zone.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/cloudstack/models/compute/zone.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/cloudstack/models/compute/zone.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/cloudstack/models/compute/zone.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/cloudstack/models/compute/zone.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/cloudstack/models/compute/zone.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/cloudstack/models/compute/zone.rb