1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
module Fog
module Compute
class Google
class Mock
def list_subnetworks(_region_name, _filter: nil, _max_results: nil,
_order_by: nil, _page_token: nil)
# :no-coverage:
Fog::Mock.not_implemented
# :no-coverage:
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
|