Sha256: b52f7d238a6a2ad1b8582e4d66556b10ba07e7a756a8dd837cdd544d7b5e865d

Contents?: true

Size: 939 Bytes

Versions: 20

Compression:

Stored size: 939 Bytes

Contents

require 'fog/core/model'

module Fog
  module Network
    class OpenStack
      class FloatingIp < Fog::Model
        identity :id

        attribute :floating_network_id
        attribute :port_id
        attribute :tenant_id
        attribute :fixed_ip_address







        def initialize(attributes)
          @connection = attributes[:connection]
          super
        end

        def save
          requires :floating_network_id
          identity ? update : create
        end

        def create
          requires :floating_network_id
          merge_attributes(service.create_floating_ip(self.floating_network_id,


                                                    self.attributes).body['floatingip'])
          self
        end

        def update
          self
        end

        def destroy
          requires :id
          service.delete_floating_ip(self.id)
          true
        end

      end
    end
  end
end

Version data entries

20 entries across 20 versions & 5 rubygems

Version Path
gapinc-fog-1.12.1.2.1 lib/fog/openstack/models/network/floating_ip.rb
fog-maestrodev-1.15.0.20130927082724 lib/fog/openstack/models/network/floating_ip.rb
fog-maestrodev-1.15.0.20130829165835 lib/fog/openstack/models/network/floating_ip.rb
fog-1.15.0 lib/fog/openstack/models/network/floating_ip.rb
gapinc-fog-1.14.0 lib/fog/openstack/models/network/floating_ip.rb
fog-maestrodev-1.14.0.20130806165225 lib/fog/openstack/models/network/floating_ip.rb
fog-1.14.0 lib/fog/openstack/models/network/floating_ip.rb
fog-1.13.0 lib/fog/openstack/models/network/floating_ip.rb
gapinc-fog-1.12.1.2 lib/fog/openstack/models/network/floating_ip.rb
gapinc-fog-1.12.1.1 lib/fog/openstack/models/network/floating_ip.rb
gapinc-fog-1.12.1a lib/fog/openstack/models/network/floating_ip.rb
gapinc-fog-1.12.1 lib/fog/openstack/models/network/floating_ip.rb
fog-1.12.1 lib/fog/openstack/models/network/floating_ip.rb
fog-1.12.0 lib/fog/openstack/models/network/floating_ip.rb
vagrant-shell-0.2.6 vendor/bundle/gems/fog-1.10.1/lib/fog/openstack/models/network/floating_ip.rb
vagrant-shell-0.2.5 vendor/bundle/gems/fog-1.10.1/lib/fog/openstack/models/network/floating_ip.rb
fog-1.11.1 lib/fog/openstack/models/network/floating_ip.rb
fog-1.11.0 lib/fog/openstack/models/network/floating_ip.rb
fog-1.10.1 lib/fog/openstack/models/network/floating_ip.rb
fog-test-me-1.10.0 lib/fog/openstack/models/network/floating_ip.rb