Sha256: d112e60cb9d147dd6c5dcc87a4711a345d76ba8db5a8cb2d733f308f8206222e

Contents?: true

Size: 1005 Bytes

Versions: 3

Compression:

Stored size: 1005 Bytes

Contents

module Fog
  module Vcloud
    module Terremark
      module Ecloud

        module Mock
          def networks(options = {})
            @networks ||= Fog::Vcloud::Terremark::Ecloud::Networks.new(options.merge(:connection => self))
          end
        end

        module Real
          def networks(options = {})
            @networks ||= Fog::Vcloud::Terremark::Ecloud::Networks.new(options.merge(:connection => self))
          end
        end

        class Networks < Fog::Vcloud::Collection

          undef_method :create

          model Fog::Vcloud::Terremark::Ecloud::Network

          get_request :get_network
          vcloud_type "application/vnd.vmware.vcloud.network+xml"
          all_request lambda { |networks| networks.connection.get_vdc(networks.href).body.networks }

          #def all
          #  pp connection.get_vdc(href).body.networks
          #  load(connection.get_vdc(href).body.networks.map { |network| { } } )
          #end

        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fog-0.2.0 lib/fog/vcloud/terremark/ecloud/models/networks.rb
fog-0.1.10 lib/fog/vcloud/terremark/ecloud/models/networks.rb
fog-0.1.9 lib/fog/vcloud/terremark/ecloud/models/networks.rb