Sha256: bfd1ce8a681c94cef85e84d69f8e8dfdb140a216a4eae1d25b9e7f19f1a6bc0d

Contents?: true

Size: 1.59 KB

Versions: 12

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 = connection.create_zone(options)
          merge_attributes(data['createzoneresponse'])
        end
      end # Zone
    end # Cloudstack
  end # Compute
end # Fog

Version data entries

12 entries across 12 versions & 7 rubygems

Version Path
fog-nirvanix-1.8.2 lib/fog/cloudstack/models/compute/zone.rb
fog-nirvanix-1.8.1 lib/fog/cloudstack/models/compute/zone.rb
fog-parser-fix-1.6.1 lib/fog/cloudstack/models/compute/zone.rb
fog-test-again-1.6.0 lib/fog/cloudstack/models/compute/zone.rb
fog-parser-fix-1.6.0 lib/fog/cloudstack/models/compute/zone.rb
ey-vendored-backup-3.0.27 vendor/gems/fog/lib/fog/cloudstack/models/compute/zone.rb
fog-sgonyea-1.8.1 lib/fog/cloudstack/models/compute/zone.rb
fog-1.8.0 lib/fog/cloudstack/models/compute/zone.rb
fog-maestrodev-1.7.0.20121114190951 lib/fog/cloudstack/models/compute/zone.rb
fog-1.7.0 lib/fog/cloudstack/models/compute/zone.rb
fog-1.6.0 lib/fog/cloudstack/models/compute/zone.rb
fog-1.5.0 lib/fog/cloudstack/models/compute/zone.rb