Import refactored library. See MIGRATING.MD for details
This commit is contained in:
1 parent
9b7809174d
commit
f584a2cec8
373 files changed
+255715
-474
No files matched your search
@@ -0,0 +1,466 @@
|
||||
# Copyright 2015 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
require 'date'
|
||||
require 'google/apis/core/base_service'
|
||||
require 'google/apis/core/json_representation'
|
||||
require 'google/apis/core/hashable'
|
||||
require 'google/apis/errors'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
module ContainerV1beta1
|
||||
|
||||
#
|
||||
class Cluster
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The API version of the Kubernetes master and kubelets running in this cluster.
|
||||
# Leave blank to pick up the latest stable release, or specify a version of the
|
||||
# form "x.y.z". The Google Container Engine release notes lists the currently
|
||||
# supported versions. If an incorrect version is specified, the server returns
|
||||
# an error listing the currently supported versions.
|
||||
# Corresponds to the JSON property `clusterApiVersion`
|
||||
# @return [String]
|
||||
attr_accessor :cluster_api_version
|
||||
|
||||
# The IP address range of the container pods in this cluster, in CIDR notation (
|
||||
# e.g. 10.96.0.0/14). Leave blank to have one automatically chosen or specify a /
|
||||
# 14 block in 10.0.0.0/8 or 172.16.0.0/12.
|
||||
# Corresponds to the JSON property `containerIpv4Cidr`
|
||||
# @return [String]
|
||||
attr_accessor :container_ipv4_cidr
|
||||
|
||||
# [Output only] The time the cluster was created, in RFC3339 text format.
|
||||
# Corresponds to the JSON property `creationTimestamp`
|
||||
# @return [String]
|
||||
attr_accessor :creation_timestamp
|
||||
|
||||
# An optional description of this cluster.
|
||||
# Corresponds to the JSON property `description`
|
||||
# @return [String]
|
||||
attr_accessor :description
|
||||
|
||||
# Whether logs from the cluster should be made available via the Google Cloud
|
||||
# Logging service. This includes both logs from your applications running in the
|
||||
# cluster as well as logs from the Kubernetes components themselves.
|
||||
# Corresponds to the JSON property `enableCloudLogging`
|
||||
# @return [Boolean]
|
||||
attr_accessor :enable_cloud_logging
|
||||
alias_method :enable_cloud_logging?, :enable_cloud_logging
|
||||
|
||||
# Whether metrics from the cluster should be made available via the Google Cloud
|
||||
# Monitoring service.
|
||||
# Corresponds to the JSON property `enableCloudMonitoring`
|
||||
# @return [Boolean]
|
||||
attr_accessor :enable_cloud_monitoring
|
||||
alias_method :enable_cloud_monitoring?, :enable_cloud_monitoring
|
||||
|
||||
# [Output only] The IP address of this cluster's Kubernetes master. The endpoint
|
||||
# can be accessed from the internet at https://username:password@endpoint/.
|
||||
# See the masterAuth property of this resource for username and password
|
||||
# information.
|
||||
# Corresponds to the JSON property `endpoint`
|
||||
# @return [String]
|
||||
attr_accessor :endpoint
|
||||
|
||||
# [Output only] The resource URLs of [instance groups](/compute/docs/instance-
|
||||
# groups/) associated with this cluster.
|
||||
# Corresponds to the JSON property `instanceGroupUrls`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :instance_group_urls
|
||||
|
||||
# The authentication information for accessing the master. Authentication is
|
||||
# either done using HTTP basic authentication or using a bearer token.
|
||||
# Corresponds to the JSON property `masterAuth`
|
||||
# @return [Google::Apis::ContainerV1beta1::MasterAuth]
|
||||
attr_accessor :master_auth
|
||||
|
||||
# The name of this cluster. The name must be unique within this project and zone,
|
||||
# and can be up to 40 characters with the following restrictions:
|
||||
# - Lowercase letters, numbers, and hyphens only.
|
||||
# - Must start with a letter.
|
||||
# - Must end with a number or a letter.
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# The name of the Google Compute Engine network to which the cluster is
|
||||
# connected.
|
||||
# Corresponds to the JSON property `network`
|
||||
# @return [String]
|
||||
attr_accessor :network
|
||||
|
||||
# The machine type and image to use for all nodes in this cluster. See the
|
||||
# descriptions of the child properties of nodeConfig.
|
||||
# Corresponds to the JSON property `nodeConfig`
|
||||
# @return [Google::Apis::ContainerV1beta1::NodeConfig]
|
||||
attr_accessor :node_config
|
||||
|
||||
# [Output only] The size of the address space on each node for hosting
|
||||
# containers.
|
||||
# Corresponds to the JSON property `nodeRoutingPrefixSize`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :node_routing_prefix_size
|
||||
|
||||
# The number of nodes to create in this cluster. You must ensure that your
|
||||
# Compute Engine resource quota is sufficient for this number of instances plus
|
||||
# one (to include the master). You must also have available firewall and routes
|
||||
# quota.
|
||||
# Corresponds to the JSON property `numNodes`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :num_nodes
|
||||
|
||||
# [Output only] Server-defined URL for the resource.
|
||||
# Corresponds to the JSON property `selfLink`
|
||||
# @return [String]
|
||||
attr_accessor :self_link
|
||||
|
||||
# [Output only] The IP address range of the Kubernetes services in this cluster,
|
||||
# in CIDR notation (e.g. 1.2.3.4/29). Service addresses are typically put in
|
||||
# the last /16 from the container CIDR.
|
||||
# Corresponds to the JSON property `servicesIpv4Cidr`
|
||||
# @return [String]
|
||||
attr_accessor :services_ipv4_cidr
|
||||
|
||||
# [Output only] The current status of this cluster.
|
||||
# Corresponds to the JSON property `status`
|
||||
# @return [String]
|
||||
attr_accessor :status
|
||||
|
||||
# [Output only] Additional information about the current status of this cluster,
|
||||
# if available.
|
||||
# Corresponds to the JSON property `statusMessage`
|
||||
# @return [String]
|
||||
attr_accessor :status_message
|
||||
|
||||
# [Output only] The name of the Google Compute Engine zone in which the cluster
|
||||
# resides.
|
||||
# Corresponds to the JSON property `zone`
|
||||
# @return [String]
|
||||
attr_accessor :zone
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@cluster_api_version = args[:cluster_api_version] unless args[:cluster_api_version].nil?
|
||||
@container_ipv4_cidr = args[:container_ipv4_cidr] unless args[:container_ipv4_cidr].nil?
|
||||
@creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil?
|
||||
@description = args[:description] unless args[:description].nil?
|
||||
@enable_cloud_logging = args[:enable_cloud_logging] unless args[:enable_cloud_logging].nil?
|
||||
@enable_cloud_monitoring = args[:enable_cloud_monitoring] unless args[:enable_cloud_monitoring].nil?
|
||||
@endpoint = args[:endpoint] unless args[:endpoint].nil?
|
||||
@instance_group_urls = args[:instance_group_urls] unless args[:instance_group_urls].nil?
|
||||
@master_auth = args[:master_auth] unless args[:master_auth].nil?
|
||||
@name = args[:name] unless args[:name].nil?
|
||||
@network = args[:network] unless args[:network].nil?
|
||||
@node_config = args[:node_config] unless args[:node_config].nil?
|
||||
@node_routing_prefix_size = args[:node_routing_prefix_size] unless args[:node_routing_prefix_size].nil?
|
||||
@num_nodes = args[:num_nodes] unless args[:num_nodes].nil?
|
||||
@self_link = args[:self_link] unless args[:self_link].nil?
|
||||
@services_ipv4_cidr = args[:services_ipv4_cidr] unless args[:services_ipv4_cidr].nil?
|
||||
@status = args[:status] unless args[:status].nil?
|
||||
@status_message = args[:status_message] unless args[:status_message].nil?
|
||||
@zone = args[:zone] unless args[:zone].nil?
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class CreateClusterRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A cluster resource.
|
||||
# Corresponds to the JSON property `cluster`
|
||||
# @return [Google::Apis::ContainerV1beta1::Cluster]
|
||||
attr_accessor :cluster
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@cluster = args[:cluster] unless args[:cluster].nil?
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class ListAggregatedClustersResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A list of clusters in the project, across all zones.
|
||||
# Corresponds to the JSON property `clusters`
|
||||
# @return [Array<Google::Apis::ContainerV1beta1::Cluster>]
|
||||
attr_accessor :clusters
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@clusters = args[:clusters] unless args[:clusters].nil?
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class ListAggregatedOperationsResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A list of operations in the project, across all zones.
|
||||
# Corresponds to the JSON property `operations`
|
||||
# @return [Array<Google::Apis::ContainerV1beta1::Operation>]
|
||||
attr_accessor :operations
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@operations = args[:operations] unless args[:operations].nil?
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class ListClustersResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A list of clusters in the project in the specified zone.
|
||||
# Corresponds to the JSON property `clusters`
|
||||
# @return [Array<Google::Apis::ContainerV1beta1::Cluster>]
|
||||
attr_accessor :clusters
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@clusters = args[:clusters] unless args[:clusters].nil?
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class ListOperationsResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A list of operations in the project in the specified zone.
|
||||
# Corresponds to the JSON property `operations`
|
||||
# @return [Array<Google::Apis::ContainerV1beta1::Operation>]
|
||||
attr_accessor :operations
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@operations = args[:operations] unless args[:operations].nil?
|
||||
end
|
||||
end
|
||||
|
||||
# The authentication information for accessing the master. Authentication is
|
||||
# either done using HTTP basic authentication or using a bearer token.
|
||||
class MasterAuth
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The token used to authenticate API requests to the master. The token is to be
|
||||
# included in an HTTP Authorization Header in all requests to the master
|
||||
# endpoint. The format of the header is: "Authorization: Bearer ".
|
||||
# Corresponds to the JSON property `bearerToken`
|
||||
# @return [String]
|
||||
attr_accessor :bearer_token
|
||||
|
||||
# [Output only] Base64 encoded public certificate used by clients to
|
||||
# authenticate to the cluster endpoint.
|
||||
# Corresponds to the JSON property `clientCertificate`
|
||||
# @return [String]
|
||||
attr_accessor :client_certificate
|
||||
|
||||
# [Output only] Base64 encoded private key used by clients to authenticate to
|
||||
# the cluster endpoint.
|
||||
# Corresponds to the JSON property `clientKey`
|
||||
# @return [String]
|
||||
attr_accessor :client_key
|
||||
|
||||
# [Output only] Base64 encoded public certificate that is the root of trust for
|
||||
# the cluster.
|
||||
# Corresponds to the JSON property `clusterCaCertificate`
|
||||
# @return [String]
|
||||
attr_accessor :cluster_ca_certificate
|
||||
|
||||
# The password to use for HTTP basic authentication when accessing the
|
||||
# Kubernetes master endpoint. Because the master endpoint is open to the
|
||||
# internet, you should create a strong password.
|
||||
# Corresponds to the JSON property `password`
|
||||
# @return [String]
|
||||
attr_accessor :password
|
||||
|
||||
# The username to use for HTTP basic authentication when accessing the
|
||||
# Kubernetes master endpoint.
|
||||
# Corresponds to the JSON property `user`
|
||||
# @return [String]
|
||||
attr_accessor :user
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@bearer_token = args[:bearer_token] unless args[:bearer_token].nil?
|
||||
@client_certificate = args[:client_certificate] unless args[:client_certificate].nil?
|
||||
@client_key = args[:client_key] unless args[:client_key].nil?
|
||||
@cluster_ca_certificate = args[:cluster_ca_certificate] unless args[:cluster_ca_certificate].nil?
|
||||
@password = args[:password] unless args[:password].nil?
|
||||
@user = args[:user] unless args[:user].nil?
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
class NodeConfig
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The name of a Google Compute Engine machine type (e.g. n1-standard-1).
|
||||
# If unspecified, the default machine type is n1-standard-1.
|
||||
# Corresponds to the JSON property `machineType`
|
||||
# @return [String]
|
||||
attr_accessor :machine_type
|
||||
|
||||
# The optional list of ServiceAccounts, each with their specified scopes, to be
|
||||
# made available on all of the node VMs. In addition to the service accounts and
|
||||
# scopes specified, the "default" account will always be created with the
|
||||
# following scopes to ensure the correct functioning of the cluster:
|
||||
# - https://www.googleapis.com/auth/compute,
|
||||
# - https://www.googleapis.com/auth/devstorage.read_only
|
||||
# Corresponds to the JSON property `serviceAccounts`
|
||||
# @return [Array<Google::Apis::ContainerV1beta1::ServiceAccount>]
|
||||
attr_accessor :service_accounts
|
||||
|
||||
# The fully-specified name of a Google Compute Engine image. For example: https:/
|
||||
# /www.googleapis.com/compute/v1/projects/debian-cloud/global/images/backports-
|
||||
# debian-7-wheezy-vYYYYMMDD (where YYYMMDD is the version date).
|
||||
# If specifying an image, you are responsible for ensuring its compatibility
|
||||
# with the Debian 7 backports image. We recommend leaving this field blank to
|
||||
# accept the default backports-debian-7-wheezy value.
|
||||
# Corresponds to the JSON property `sourceImage`
|
||||
# @return [String]
|
||||
attr_accessor :source_image
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@machine_type = args[:machine_type] unless args[:machine_type].nil?
|
||||
@service_accounts = args[:service_accounts] unless args[:service_accounts].nil?
|
||||
@source_image = args[:source_image] unless args[:source_image].nil?
|
||||
end
|
||||
end
|
||||
|
||||
# Defines the operation resource. All fields are output only.
|
||||
class Operation
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# If an error has occurred, a textual description of the error.
|
||||
# Corresponds to the JSON property `errorMessage`
|
||||
# @return [String]
|
||||
attr_accessor :error_message
|
||||
|
||||
# The server-assigned ID for the operation.
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# The operation type.
|
||||
# Corresponds to the JSON property `operationType`
|
||||
# @return [String]
|
||||
attr_accessor :operation_type
|
||||
|
||||
# Server-defined URL for the resource.
|
||||
# Corresponds to the JSON property `selfLink`
|
||||
# @return [String]
|
||||
attr_accessor :self_link
|
||||
|
||||
# The current status of the operation.
|
||||
# Corresponds to the JSON property `status`
|
||||
# @return [String]
|
||||
attr_accessor :status
|
||||
|
||||
# [Optional] The URL of the cluster resource that this operation is associated
|
||||
# with.
|
||||
# Corresponds to the JSON property `target`
|
||||
# @return [String]
|
||||
attr_accessor :target
|
||||
|
||||
# Server-defined URL for the target of the operation.
|
||||
# Corresponds to the JSON property `targetLink`
|
||||
# @return [String]
|
||||
attr_accessor :target_link
|
||||
|
||||
# The name of the Google Compute Engine zone in which the operation is taking
|
||||
# place.
|
||||
# Corresponds to the JSON property `zone`
|
||||
# @return [String]
|
||||
attr_accessor :zone
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@error_message = args[:error_message] unless args[:error_message].nil?
|
||||
@name = args[:name] unless args[:name].nil?
|
||||
@operation_type = args[:operation_type] unless args[:operation_type].nil?
|
||||
@self_link = args[:self_link] unless args[:self_link].nil?
|
||||
@status = args[:status] unless args[:status].nil?
|
||||
@target = args[:target] unless args[:target].nil?
|
||||
@target_link = args[:target_link] unless args[:target_link].nil?
|
||||
@zone = args[:zone] unless args[:zone].nil?
|
||||
end
|
||||
end
|
||||
|
||||
# A Compute Engine service account.
|
||||
class ServiceAccount
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Email address of the service account.
|
||||
# Corresponds to the JSON property `email`
|
||||
# @return [String]
|
||||
attr_accessor :email
|
||||
|
||||
# The list of scopes to be made available for this service account.
|
||||
# Corresponds to the JSON property `scopes`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :scopes
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@email = args[:email] unless args[:email].nil?
|
||||
@scopes = args[:scopes] unless args[:scopes].nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,177 @@
|
||||
# Copyright 2015 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
require 'date'
|
||||
require 'google/apis/core/base_service'
|
||||
require 'google/apis/core/json_representation'
|
||||
require 'google/apis/core/hashable'
|
||||
require 'google/apis/errors'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
module ContainerV1beta1
|
||||
|
||||
class Cluster
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
end
|
||||
|
||||
class CreateClusterRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
end
|
||||
|
||||
class ListAggregatedClustersResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
end
|
||||
|
||||
class ListAggregatedOperationsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
end
|
||||
|
||||
class ListClustersResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
end
|
||||
|
||||
class ListOperationsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
end
|
||||
|
||||
class MasterAuth
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
end
|
||||
|
||||
class NodeConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
end
|
||||
|
||||
class Operation
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
end
|
||||
|
||||
class ServiceAccount
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
end
|
||||
|
||||
# @private
|
||||
class Cluster
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cluster_api_version, as: 'clusterApiVersion'
|
||||
property :container_ipv4_cidr, as: 'containerIpv4Cidr'
|
||||
property :creation_timestamp, as: 'creationTimestamp'
|
||||
property :description, as: 'description'
|
||||
property :enable_cloud_logging, as: 'enableCloudLogging'
|
||||
property :enable_cloud_monitoring, as: 'enableCloudMonitoring'
|
||||
property :endpoint, as: 'endpoint'
|
||||
collection :instance_group_urls, as: 'instanceGroupUrls'
|
||||
property :master_auth, as: 'masterAuth', class: Google::Apis::ContainerV1beta1::MasterAuth, decorator: Google::Apis::ContainerV1beta1::MasterAuth::Representation
|
||||
|
||||
property :name, as: 'name'
|
||||
property :network, as: 'network'
|
||||
property :node_config, as: 'nodeConfig', class: Google::Apis::ContainerV1beta1::NodeConfig, decorator: Google::Apis::ContainerV1beta1::NodeConfig::Representation
|
||||
|
||||
property :node_routing_prefix_size, as: 'nodeRoutingPrefixSize'
|
||||
property :num_nodes, as: 'numNodes'
|
||||
property :self_link, as: 'selfLink'
|
||||
property :services_ipv4_cidr, as: 'servicesIpv4Cidr'
|
||||
property :status, as: 'status'
|
||||
property :status_message, as: 'statusMessage'
|
||||
property :zone, as: 'zone'
|
||||
end
|
||||
end
|
||||
|
||||
# @private
|
||||
class CreateClusterRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cluster, as: 'cluster', class: Google::Apis::ContainerV1beta1::Cluster, decorator: Google::Apis::ContainerV1beta1::Cluster::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
# @private
|
||||
class ListAggregatedClustersResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :clusters, as: 'clusters', class: Google::Apis::ContainerV1beta1::Cluster, decorator: Google::Apis::ContainerV1beta1::Cluster::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
# @private
|
||||
class ListAggregatedOperationsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :operations, as: 'operations', class: Google::Apis::ContainerV1beta1::Operation, decorator: Google::Apis::ContainerV1beta1::Operation::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
# @private
|
||||
class ListClustersResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :clusters, as: 'clusters', class: Google::Apis::ContainerV1beta1::Cluster, decorator: Google::Apis::ContainerV1beta1::Cluster::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
# @private
|
||||
class ListOperationsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :operations, as: 'operations', class: Google::Apis::ContainerV1beta1::Operation, decorator: Google::Apis::ContainerV1beta1::Operation::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
# @private
|
||||
class MasterAuth
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :bearer_token, as: 'bearerToken'
|
||||
property :client_certificate, as: 'clientCertificate'
|
||||
property :client_key, as: 'clientKey'
|
||||
property :cluster_ca_certificate, as: 'clusterCaCertificate'
|
||||
property :password, as: 'password'
|
||||
property :user, as: 'user'
|
||||
end
|
||||
end
|
||||
|
||||
# @private
|
||||
class NodeConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :machine_type, as: 'machineType'
|
||||
collection :service_accounts, as: 'serviceAccounts', class: Google::Apis::ContainerV1beta1::ServiceAccount, decorator: Google::Apis::ContainerV1beta1::ServiceAccount::Representation
|
||||
|
||||
property :source_image, as: 'sourceImage'
|
||||
end
|
||||
end
|
||||
|
||||
# @private
|
||||
class Operation
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :error_message, as: 'errorMessage'
|
||||
property :name, as: 'name'
|
||||
property :operation_type, as: 'operationType'
|
||||
property :self_link, as: 'selfLink'
|
||||
property :status, as: 'status'
|
||||
property :target, as: 'target'
|
||||
property :target_link, as: 'targetLink'
|
||||
property :zone, as: 'zone'
|
||||
end
|
||||
end
|
||||
|
||||
# @private
|
||||
class ServiceAccount
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :email, as: 'email'
|
||||
collection :scopes, as: 'scopes'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,394 @@
|
||||
# Copyright 2015 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
require 'google/apis/core/base_service'
|
||||
require 'google/apis/core/json_representation'
|
||||
require 'google/apis/core/hashable'
|
||||
require 'google/apis/errors'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
module ContainerV1beta1
|
||||
# Google Container Engine API
|
||||
#
|
||||
# The Google Container Engine API is used for building and managing container
|
||||
# based applications, powered by the open source Kubernetes technology.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/container_v1beta1'
|
||||
#
|
||||
# Container = Google::Apis::ContainerV1beta1 # Alias the module
|
||||
# service = Container::ContainerService.new
|
||||
#
|
||||
# @see https://cloud.google.com/container-engine/docs/v1beta1/
|
||||
class ContainerService < Google::Apis::Core::BaseService
|
||||
# @return [String]
|
||||
# API key. Your API key identifies your project and provides you with API access,
|
||||
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
||||
attr_accessor :key
|
||||
|
||||
# @return [String]
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
attr_accessor :quota_user
|
||||
|
||||
# @return [String]
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
attr_accessor :user_ip
|
||||
|
||||
def initialize
|
||||
super('https://www.googleapis.com/', 'container/v1beta1/projects/')
|
||||
end
|
||||
|
||||
# Lists all clusters owned by a project across all zones.
|
||||
# @param [String] project_id
|
||||
# The Google Developers Console project ID or project number.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
# @param [String] user_ip
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::ContainerV1beta1::ListAggregatedClustersResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ContainerV1beta1::ListAggregatedClustersResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_clusters(project_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
path = '{projectId}/clusters'
|
||||
command = make_simple_command(:get, path, options)
|
||||
command.response_representation = Google::Apis::ContainerV1beta1::ListAggregatedClustersResponse::Representation
|
||||
command.response_class = Google::Apis::ContainerV1beta1::ListAggregatedClustersResponse
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists all operations in a project, across all zones.
|
||||
# @param [String] project_id
|
||||
# The Google Developers Console project ID or project number.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
# @param [String] user_ip
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::ContainerV1beta1::ListAggregatedOperationsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ContainerV1beta1::ListAggregatedOperationsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_operations(project_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
path = '{projectId}/operations'
|
||||
command = make_simple_command(:get, path, options)
|
||||
command.response_representation = Google::Apis::ContainerV1beta1::ListAggregatedOperationsResponse::Representation
|
||||
command.response_class = Google::Apis::ContainerV1beta1::ListAggregatedOperationsResponse
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Creates a cluster, consisting of the specified number and type of Google
|
||||
# Compute Engine instances, plus a Kubernetes master instance.
|
||||
# The cluster is created in the project's default network.
|
||||
# A firewall is added that allows traffic into port 443 on the master, which
|
||||
# enables HTTPS. A firewall and a route is added for each node to allow the
|
||||
# containers on that node to communicate with all other instances in the cluster.
|
||||
# Finally, an entry is added to the project's global metadata indicating which
|
||||
# CIDR range is being used by the cluster.
|
||||
# @param [String] project_id
|
||||
# The Google Developers Console project ID or project number.
|
||||
# @param [String] zone_id
|
||||
# The name of the Google Compute Engine zone in which the cluster resides.
|
||||
# @param [Google::Apis::ContainerV1beta1::CreateClusterRequest] create_cluster_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
# @param [String] user_ip
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::ContainerV1beta1::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ContainerV1beta1::Operation]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def create_cluster(project_id, zone_id, create_cluster_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
path = '{projectId}/zones/{zoneId}/clusters'
|
||||
command = make_simple_command(:post, path, options)
|
||||
command.request_representation = Google::Apis::ContainerV1beta1::CreateClusterRequest::Representation
|
||||
command.request_object = create_cluster_request_object
|
||||
command.response_representation = Google::Apis::ContainerV1beta1::Operation::Representation
|
||||
command.response_class = Google::Apis::ContainerV1beta1::Operation
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.params['zoneId'] = zone_id unless zone_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Deletes the cluster, including the Kubernetes master and all worker nodes.
|
||||
# Firewalls and routes that were configured at cluster creation are also deleted.
|
||||
# @param [String] project_id
|
||||
# The Google Developers Console project ID or project number.
|
||||
# @param [String] zone_id
|
||||
# The name of the Google Compute Engine zone in which the cluster resides.
|
||||
# @param [String] cluster_id
|
||||
# The name of the cluster to delete.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
# @param [String] user_ip
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::ContainerV1beta1::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ContainerV1beta1::Operation]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def delete_zone_cluster(project_id, zone_id, cluster_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
path = '{projectId}/zones/{zoneId}/clusters/{clusterId}'
|
||||
command = make_simple_command(:delete, path, options)
|
||||
command.response_representation = Google::Apis::ContainerV1beta1::Operation::Representation
|
||||
command.response_class = Google::Apis::ContainerV1beta1::Operation
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.params['zoneId'] = zone_id unless zone_id.nil?
|
||||
command.params['clusterId'] = cluster_id unless cluster_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets a specific cluster.
|
||||
# @param [String] project_id
|
||||
# The Google Developers Console project ID or project number.
|
||||
# @param [String] zone_id
|
||||
# The name of the Google Compute Engine zone in which the cluster resides.
|
||||
# @param [String] cluster_id
|
||||
# The name of the cluster to retrieve.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
# @param [String] user_ip
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::ContainerV1beta1::Cluster] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ContainerV1beta1::Cluster]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def get_zone_cluster(project_id, zone_id, cluster_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
path = '{projectId}/zones/{zoneId}/clusters/{clusterId}'
|
||||
command = make_simple_command(:get, path, options)
|
||||
command.response_representation = Google::Apis::ContainerV1beta1::Cluster::Representation
|
||||
command.response_class = Google::Apis::ContainerV1beta1::Cluster
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.params['zoneId'] = zone_id unless zone_id.nil?
|
||||
command.params['clusterId'] = cluster_id unless cluster_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists all clusters owned by a project in the specified zone.
|
||||
# @param [String] project_id
|
||||
# The Google Developers Console project ID or project number.
|
||||
# @param [String] zone_id
|
||||
# The name of the Google Compute Engine zone in which the cluster resides.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
# @param [String] user_ip
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::ContainerV1beta1::ListClustersResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ContainerV1beta1::ListClustersResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_zone_clusters(project_id, zone_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
path = '{projectId}/zones/{zoneId}/clusters'
|
||||
command = make_simple_command(:get, path, options)
|
||||
command.response_representation = Google::Apis::ContainerV1beta1::ListClustersResponse::Representation
|
||||
command.response_class = Google::Apis::ContainerV1beta1::ListClustersResponse
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.params['zoneId'] = zone_id unless zone_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets the specified operation.
|
||||
# @param [String] project_id
|
||||
# The Google Developers Console project ID or project number.
|
||||
# @param [String] zone_id
|
||||
# The name of the Google Compute Engine zone in which the operation resides.
|
||||
# This is always the same zone as the cluster with which the operation is
|
||||
# associated.
|
||||
# @param [String] operation_id
|
||||
# The server-assigned name of the operation.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
# @param [String] user_ip
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::ContainerV1beta1::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ContainerV1beta1::Operation]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def get_zone_operation(project_id, zone_id, operation_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
path = '{projectId}/zones/{zoneId}/operations/{operationId}'
|
||||
command = make_simple_command(:get, path, options)
|
||||
command.response_representation = Google::Apis::ContainerV1beta1::Operation::Representation
|
||||
command.response_class = Google::Apis::ContainerV1beta1::Operation
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.params['zoneId'] = zone_id unless zone_id.nil?
|
||||
command.params['operationId'] = operation_id unless operation_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists all operations in a project in a specific zone.
|
||||
# @param [String] project_id
|
||||
# The Google Developers Console project ID or project number.
|
||||
# @param [String] zone_id
|
||||
# The name of the Google Compute Engine zone to return operations for.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# Overrides userIp if both are provided.
|
||||
# @param [String] user_ip
|
||||
# IP address of the site where the request originates. Use this if you want to
|
||||
# enforce per-user limits.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::ContainerV1beta1::ListOperationsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::ContainerV1beta1::ListOperationsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_zone_operations(project_id, zone_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
||||
path = '{projectId}/zones/{zoneId}/operations'
|
||||
command = make_simple_command(:get, path, options)
|
||||
command.response_representation = Google::Apis::ContainerV1beta1::ListOperationsResponse::Representation
|
||||
command.response_class = Google::Apis::ContainerV1beta1::ListOperationsResponse
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.params['zoneId'] = zone_id unless zone_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def apply_command_defaults(command)
|
||||
command.query['key'] = key unless key.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
command.query['userIp'] = user_ip unless user_ip.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user