Sha256: efda29db87ccf9255ca758bf8a907aa7a0b470d67b91d337c78a33435098534c

Contents?: true

Size: 1.24 KB

Versions: 7

Compression:

Stored size: 1.24 KB

Contents

module Fog
  module Compute
    class Google
      class Mock
        def expand_subnetwork_ip_cidr_range(_subnetwork, _region, _ip_cidr_range)
          # :no-coverage:
          Fog::Mock.not_implemented
          # :no-coverage:
        end
      end

      class Real
        ##
        # Expands the IP CIDR range of the subnetwork to a specified value.
        #
        # @param subnetwork [String] the name of the subnetwork
        # @param region [String] the name of the subnetwork's region
        # @param ip_cidr_range [String] The IP of internal addresses that are legal on
        #   this subnetwork
        #
        # @return [Google::Apis::ComputeV1::SubnetworkList] list result
        #
        # @see https://cloud.google.com/compute/docs/reference/latest/subnetworks/expandIpCidrRange
        def expand_subnetwork_ip_cidr_range(subnetwork, region, ip_cidr_range)
          if region.start_with? "http"
            region = region.split("/")[-1]
          end
          @compute.expand_subnetwork_ip_cidr_range(
            @project, region, subnetwork,
            ::Google::Apis::ComputeV1::SubnetworksExpandIpCidrRangeRequest.new(
              :ip_cidr_range => ip_cidr_range
            )
          )
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
gitlab-fog-google-1.14.0 lib/fog/compute/google/requests/expand_subnetwork_ip_cidr_range.rb
fog-google-1.13.0 lib/fog/compute/google/requests/expand_subnetwork_ip_cidr_range.rb
gitlab-fog-google-1.13.0 lib/fog/compute/google/requests/expand_subnetwork_ip_cidr_range.rb
fog-google-1.12.1 lib/fog/compute/google/requests/expand_subnetwork_ip_cidr_range.rb
fog-google-1.12.0 lib/fog/compute/google/requests/expand_subnetwork_ip_cidr_range.rb
fog-google-1.11.0 lib/fog/compute/google/requests/expand_subnetwork_ip_cidr_range.rb
fog-google-1.10.0 lib/fog/compute/google/requests/expand_subnetwork_ip_cidr_range.rb