Sha256: bc57c1a10f0c089e0164355ce910c6d5e44b2004f742a46ac8bfe037d72379a9

Contents?: true

Size: 513 Bytes

Versions: 5

Compression:

Stored size: 513 Bytes

Contents

require 'fog/core/collection'
require 'fog/vsphere/models/compute/network'

module Fog
  module Compute
    class Vsphere

      class Networks < Fog::Collection

        model Fog::Compute::Vsphere::Network
        attr_accessor :datacenter

        def all(filters = {})
          load connection.list_networks(filters.merge(:datacenter => datacenter))
        end

        def get(id)
          requires :datacenter
          new connection.get_network(id, datacenter)
        end

      end
    end
  end
end

Version data entries

5 entries across 5 versions & 4 rubygems

Version Path
fog-nirvanix-1.8.2 lib/fog/vsphere/models/compute/networks.rb
fog-nirvanix-1.8.1 lib/fog/vsphere/models/compute/networks.rb
ey-vendored-backup-3.0.27 vendor/gems/fog/lib/fog/vsphere/models/compute/networks.rb
fog-sgonyea-1.8.1 lib/fog/vsphere/models/compute/networks.rb
fog-1.8.0 lib/fog/vsphere/models/compute/networks.rb