Sha256: d76e976edf7d29e9a605bad8cddde67c55255f0b51c9125dfceccc8b0c48e665

Contents?: true

Size: 618 Bytes

Versions: 7

Compression:

Stored size: 618 Bytes

Contents

require 'fog/compute/models/ecloud/network'

module Fog
  module Compute
    class Ecloud

      class Networks < Fog::Ecloud::Collection

        undef_method :create

        model Fog::Compute::Ecloud::Network

        attribute :href

        def all
          check_href!("Vdc")
          if data = connection.get_vdc(href).body[:AvailableNetworks][:Network]
            load(data)
          end
        end

        def get(uri)
          if data = connection.get_network(uri)
            new(data.body)
          end
          rescue Fog::Errors::NotFound
          nil
        end

      end
    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
brightbox-cli-0.13.1 lib/brightbox-cli/vendor/fog/lib/fog/compute/models/ecloud/networks.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/fog/lib/fog/compute/models/ecloud/networks.rb
fog-0.11.0 lib/fog/compute/models/ecloud/networks.rb
fog-0.10.0 lib/fog/compute/models/ecloud/networks.rb
fog4encbs-0.9.0.1 lib/fog/compute/models/ecloud/networks.rb
fog4encbs-0.9.0 lib/fog/compute/models/ecloud/networks.rb
fog-0.9.0 lib/fog/compute/models/ecloud/networks.rb