Sha256: cffa1720d0b3bcbdd0f6121bb7e8275c8fb89b3d651881ac792ce082814b0df3

Contents?: true

Size: 536 Bytes

Versions: 23

Compression:

Stored size: 536 Bytes

Contents

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

        def all
          data = service.list_networks.to_h[:items]
          load(data || [])
        end

        def get(identity)
          if identity
            network = service.get_network(identity).to_h
            return new(network)
          end
        rescue ::Google::Apis::ClientError => e
          raise e unless e.status_code == 404
          nil
        end
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
fog-google-1.22.0 lib/fog/compute/google/models/networks.rb
fog-google-1.21.1 lib/fog/compute/google/models/networks.rb
fog-google-1.21.0 lib/fog/compute/google/models/networks.rb
fog-google-1.20.0 lib/fog/compute/google/models/networks.rb
fog-google-1.19.0 lib/fog/compute/google/models/networks.rb
fog-google-1.18.0 lib/fog/compute/google/models/networks.rb
fog-google-1.17.0 lib/fog/compute/google/models/networks.rb
fog-google-1.16.1 lib/fog/compute/google/models/networks.rb
fog-google-1.16.0 lib/fog/compute/google/models/networks.rb
fog-google-1.15.0 lib/fog/compute/google/models/networks.rb
fog-google-1.14.0 lib/fog/compute/google/models/networks.rb
gitlab-fog-google-1.14.0 lib/fog/compute/google/models/networks.rb
fog-google-1.13.0 lib/fog/compute/google/models/networks.rb
gitlab-fog-google-1.13.0 lib/fog/compute/google/models/networks.rb
fog-google-1.12.1 lib/fog/compute/google/models/networks.rb
fog-google-1.12.0 lib/fog/compute/google/models/networks.rb
fog-google-1.11.0 lib/fog/compute/google/models/networks.rb
fog-google-1.10.0 lib/fog/compute/google/models/networks.rb
fog-google-1.9.1 lib/fog/compute/google/models/networks.rb
fog-google-1.9.0 lib/fog/compute/google/models/networks.rb