Sha256: 69c5d983da4283e6cf0b9f9f17fbdbca5c3433ca776b7a86e39d7b9fa095f88b

Contents?: true

Size: 1.46 KB

Versions: 20

Compression:

Stored size: 1.46 KB

Contents

module Fog
  module Compute
    class Google
      class Mock
        def list_subnetworks(_region_name, _filter: nil, _max_results: nil,
                             _order_by: nil, _page_token: nil)
          Fog::Mock.not_implemented
        end
      end

      class Real
        ##
        # Retrieves a list of subnetworks specific to a region and project.
        #
        # @param region_name [String] the name of the subnetwork's region
        # @param filter [String] A filter expression for filtering listed resources.
        # @param max_results [Fixnum] Max number of results to return
        # @param order_by [String] Sorts list results by a certain order
        # @param page_token [String] specifies a page token to use
        # @return [Google::Apis::ComputeV1::SubnetworkList] list result
        #
        # @see https://cloud.google.com/compute/docs/reference/latest/subnetworks/list
        def list_subnetworks(region_name, filter: nil, max_results: nil,
                             order_by: nil, page_token: nil)
          if region_name.start_with? "http"
            region_name = region_name.split("/")[-1]
          end
          @compute.list_subnetworks(@project, region_name,
                                    :filter => filter,
                                    :max_results => max_results,
                                    :order_by => order_by,
                                    :page_token => page_token)
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
fog-google-1.9.1 lib/fog/compute/google/requests/list_subnetworks.rb
fog-google-1.9.0 lib/fog/compute/google/requests/list_subnetworks.rb
fog-google-1.8.2 lib/fog/compute/google/requests/list_subnetworks.rb
fog-google-1.8.1 lib/fog/compute/google/requests/list_subnetworks.rb
fog-google-1.8.0 lib/fog/compute/google/requests/list_subnetworks.rb
fog-google-1.7.1 lib/fog/compute/google/requests/list_subnetworks.rb
fog-google-1.7.0 lib/fog/compute/google/requests/list_subnetworks.rb
fog-google-1.6.0 lib/fog/compute/google/requests/list_subnetworks.rb
fog-google-1.5.0 lib/fog/compute/google/requests/list_subnetworks.rb
fog-google-1.4.0 lib/fog/compute/google/requests/list_subnetworks.rb
fog-google-1.3.3 lib/fog/compute/google/requests/list_subnetworks.rb
fog-google-1.3.2 lib/fog/compute/google/requests/list_subnetworks.rb
fog-google-1.3.1 lib/fog/compute/google/requests/list_subnetworks.rb
fog-google-1.3.0 lib/fog/compute/google/requests/list_subnetworks.rb
fog-google-1.2.2 lib/fog/compute/google/requests/list_subnetworks.rb
fog-google-1.2.1 lib/fog/compute/google/requests/list_subnetworks.rb
fog-google-1.2.0 lib/fog/compute/google/requests/list_subnetworks.rb
fog-google-1.1.0 lib/fog/compute/google/requests/list_subnetworks.rb
fog-google-1.0.1 lib/fog/compute/google/requests/list_subnetworks.rb
fog-google-1.0.0 lib/fog/compute/google/requests/list_subnetworks.rb