Sha256: ba0e5329b2813225f2b49fe2ae1f55fa4198faff088892d768d15e8590e1371a

Contents?: true

Size: 485 Bytes

Versions: 5

Compression:

Stored size: 485 Bytes

Contents

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

module Fog
  module Compute
    class OpenNebula
      class Networks < Fog::Collection
        model Fog::Compute::OpenNebula::Network

        def all(filter={})
          self.get_by_filter(filter)
        end

        def get(id)
          self.all({:id => id}).first
        end

        def get_by_filter(filter)
          load(service.list_networks(filter))
        end

      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fog-1.29.0 lib/fog/opennebula/models/compute/networks.rb
fog-1.28.0 lib/fog/opennebula/models/compute/networks.rb
fog-1.27.0 lib/fog/opennebula/models/compute/networks.rb
fog-1.26.0 lib/fog/opennebula/models/compute/networks.rb
fog-1.25.0 lib/fog/opennebula/models/compute/networks.rb