Sha256: dc6e5d5c3134b52e1db032b8826d5db407966a6cae4a134c6fbd886fb3678a84

Contents?: true

Size: 696 Bytes

Versions: 4

Compression:

Stored size: 696 Bytes

Contents

require File.expand_path("../trusted_network_group", __FILE__)

module Fog
  module Compute
    class Ecloud
      class TrustedNetworkGroups < Fog::Ecloud::Collection
        identity :href

        model Fog::Compute::Ecloud::TrustedNetworkGroup

        def all
          data = service.get_trusted_network_groups(href).body
          data = data[:TrustedNetworkGroup] ? data[:TrustedNetworkGroup] : data
          load(data)
        end

        def get(uri)
          if data = service.get_trusted_network_group(uri)
            new(data.body)
          end
        rescue ServiceError => e
          raise e unless e.status_code == 404
          nil
        end
      end
    end
  end
end

Version data entries

4 entries across 2 versions & 2 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-ecloud-0.3.0/lib/fog/compute/ecloud/models/trusted_network_groups.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-ecloud-0.3.0/lib/fog/compute/ecloud/models/trusted_network_groups.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-ecloud-0.3.0/lib/fog/compute/ecloud/models/trusted_network_groups.rb
fog-ecloud-0.3.0 lib/fog/compute/ecloud/models/trusted_network_groups.rb