Sha256: 2a6a68ec9be43e17dc9af892ef25e5e57d30f3f14d43cccc53631fe816ab12c0

Contents?: true

Size: 649 Bytes

Versions: 31

Compression:

Stored size: 649 Bytes

Contents

require 'fog/openstack/models/collection'
require 'fog/compute/openstack/models/os_interface'

module Fog
  module Compute
    class OpenStack
      class OsInterfaces < Fog::OpenStack::Collection
        model Fog::Compute::OpenStack::OsInterface

        attribute :server

        def all
          requires :server

          data = service.list_os_interfaces(server.id)
          load_response(data, 'interfaceAttachments')
        end

        def get(port_id)
          requires :server

          data = service.get_os_interface(server.id,port_id)
          load_response(data, 'interfaceAttachment')
        end
      end
    end
  end
end

Version data entries

31 entries across 29 versions & 3 rubygems

Version Path
fog-openstack-0.1.31 lib/fog/compute/openstack/models/os_interfaces.rb
fog-openstack-0.3.10 lib/fog/compute/openstack/models/os_interfaces.rb
fog-openstack-0.1.30 lib/fog/compute/openstack/models/os_interfaces.rb
fog-openstack-0.1.29 lib/fog/compute/openstack/models/os_interfaces.rb
fog-openstack-0.3.9 lib/fog/compute/openstack/models/os_interfaces.rb
fog-openstack-0.1.28 lib/fog/compute/openstack/models/os_interfaces.rb
fog-openstack-0.3.8 lib/fog/compute/openstack/models/os_interfaces.rb
fog-openstack-0.3.7 lib/fog/compute/openstack/models/os_interfaces.rb
fog-openstack-0.3.6 lib/fog/compute/openstack/models/os_interfaces.rb
fog-openstack-0.3.5 lib/fog/compute/openstack/models/os_interfaces.rb
fog-openstack-0.3.4 lib/fog/compute/openstack/models/os_interfaces.rb
fog-openstack-0.3.3 lib/fog/compute/openstack/models/os_interfaces.rb
fog-openstack-0.3.2 lib/fog/compute/openstack/models/os_interfaces.rb
fog-openstack-0.3.0 lib/fog/compute/openstack/models/os_interfaces.rb
fog-openstack-0.2.4 lib/fog/compute/openstack/models/os_interfaces.rb
fog-openstack-0.2.3 lib/fog/compute/openstack/models/os_interfaces.rb
fog-openstack-0.2.2 lib/fog/compute/openstack/models/os_interfaces.rb
fog-openstack-0.2.1 lib/fog/compute/openstack/models/os_interfaces.rb
fog-openstack-0.2.0 lib/fog/compute/openstack/models/os_interfaces.rb
fog-zj-0.1.28 lib/fog/compute/openstack/models/os_interfaces.rb