Sha256: 6c1ae0e9894609e3ae285f1d02209e1de690aab72e264cabbbd0057d233c63ab

Contents?: true

Size: 1.59 KB

Versions: 24

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

24 entries across 22 versions & 3 rubygems

Version Path
fog-2.1.0 lib/fog/cloudstack/models/compute/zone.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-1.42.1/lib/fog/cloudstack/models/compute/zone.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-1.42.1/lib/fog/cloudstack/models/compute/zone.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-1.42.1/lib/fog/cloudstack/models/compute/zone.rb
fog-1.42.1 lib/fog/cloudstack/models/compute/zone.rb
fog-2.0.0 lib/fog/cloudstack/models/compute/zone.rb
fog-1.42.0 lib/fog/cloudstack/models/compute/zone.rb
fog-1.41.0 lib/fog/cloudstack/models/compute/zone.rb
fog-1.40.0 lib/fog/cloudstack/models/compute/zone.rb
fog-1.39.0 lib/fog/cloudstack/models/compute/zone.rb
fog-1.38.0 lib/fog/cloudstack/models/compute/zone.rb
fog-1.37.0 lib/fog/cloudstack/models/compute/zone.rb
fog-1.36.0 lib/fog/cloudstack/models/compute/zone.rb
fog-1.35.0 lib/fog/cloudstack/models/compute/zone.rb
fog-2.0.0.pre.0 lib/fog/cloudstack/models/compute/zone.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/lib/fog/cloudstack/models/compute/zone.rb
fog-1.34.0 lib/fog/cloudstack/models/compute/zone.rb
fog-1.33.0 lib/fog/cloudstack/models/compute/zone.rb
fog-1.32.0 lib/fog/cloudstack/models/compute/zone.rb
fog-1.31.0 lib/fog/cloudstack/models/compute/zone.rb