Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions google/cloud/redis_v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

if sys.version_info[:2] == (2, 7):
message = (
"A future version of this library will drop support for Python 2.7."
"More details about Python 2 support for Google Cloud Client Libraries"
"A future version of this library will drop support for Python 2.7. "
"More details about Python 2 support for Google Cloud Client Libraries "
"can be found at https://cloud.google.com/python/docs/python2-sunset/"
)
warnings.warn(message, DeprecationWarning)
Expand Down
370 changes: 185 additions & 185 deletions google/cloud/redis_v1/gapic/cloud_redis_client.py

Large diffs are not rendered by default.

84 changes: 45 additions & 39 deletions google/cloud/redis_v1/gapic/cloud_redis_client_config.py
Original file line number Diff line number Diff line change
@@ -1,61 +1,67 @@
config = {
"interfaces": {
"google.cloud.redis.v1.CloudRedis": {
"retry_codes": {
"idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"],
"non_idempotent": [],
},
"retry_codes": {"no_retry_codes": [], "no_retry_1_codes": []},
"retry_params": {
"default": {
"initial_retry_delay_millis": 100,
"retry_delay_multiplier": 1.3,
"max_retry_delay_millis": 60000,
"initial_rpc_timeout_millis": 20000,
"no_retry_params": {
"initial_retry_delay_millis": 0,
"retry_delay_multiplier": 0.0,
"max_retry_delay_millis": 0,
"initial_rpc_timeout_millis": 0,
"rpc_timeout_multiplier": 1.0,
"max_rpc_timeout_millis": 0,
"total_timeout_millis": 0,
},
"no_retry_1_params": {
"initial_retry_delay_millis": 0,
"retry_delay_multiplier": 0.0,
"max_retry_delay_millis": 0,
"initial_rpc_timeout_millis": 600000,
"rpc_timeout_multiplier": 1.0,
"max_rpc_timeout_millis": 20000,
"max_rpc_timeout_millis": 600000,
"total_timeout_millis": 600000,
}
},
},
"methods": {
"ListInstances": {
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"GetInstance": {
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"CreateInstance": {
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
"timeout_millis": 600000,
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params",
},
"UpdateInstance": {
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
"timeout_millis": 600000,
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params",
},
"ImportInstance": {
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
"timeout_millis": 600000,
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params",
},
"ExportInstance": {
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
"timeout_millis": 600000,
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params",
},
"FailoverInstance": {
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
"timeout_millis": 600000,
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params",
},
"DeleteInstance": {
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
"timeout_millis": 600000,
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params",
},
"ListInstances": {
"timeout_millis": 600000,
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params",
},
"GetInstance": {
"timeout_millis": 600000,
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params",
},
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,40 +113,6 @@ def channel(self):
"""
return self._channel

@property
def list_instances(self):
"""Return the gRPC stub for :meth:`CloudRedisClient.list_instances`.

Lists all Redis instances owned by a project in either the specified
location (region) or all locations.

The location should have the following format:

- ``projects/{project_id}/locations/{location_id}``

If ``location_id`` is specified as ``-`` (wildcard), then all regions
available to the project are queried, and the results are aggregated.

Returns:
Callable: A callable which accepts the appropriate
deserialized request object and returns a
deserialized response object.
"""
return self._stubs["cloud_redis_stub"].ListInstances

@property
def get_instance(self):
"""Return the gRPC stub for :meth:`CloudRedisClient.get_instance`.

Gets the details of a specific Redis instance.

Returns:
Callable: A callable which accepts the appropriate
deserialized request object and returns a
deserialized response object.
"""
return self._stubs["cloud_redis_stub"].GetInstance

@property
def create_instance(self):
"""Return the gRPC stub for :meth:`CloudRedisClient.create_instance`.
Expand All @@ -155,7 +121,7 @@ def create_instance(self):
size.

By default, the instance is accessible from the project's `default
network <https://cloud.google.com/compute/docs/networks-and-firewalls#networks>`__.
network <https://cloud.google.com/vpc/docs/vpc>`__.

The creation is executed asynchronously and callers may check the
returned operation to track its progress. Once the operation is
Expand Down Expand Up @@ -255,3 +221,37 @@ def delete_instance(self):
deserialized response object.
"""
return self._stubs["cloud_redis_stub"].DeleteInstance

@property
def list_instances(self):
"""Return the gRPC stub for :meth:`CloudRedisClient.list_instances`.

Lists all Redis instances owned by a project in either the specified
location (region) or all locations.

The location should have the following format:

- ``projects/{project_id}/locations/{location_id}``

If ``location_id`` is specified as ``-`` (wildcard), then all regions
available to the project are queried, and the results are aggregated.

Returns:
Callable: A callable which accepts the appropriate
deserialized request object and returns a
deserialized response object.
"""
return self._stubs["cloud_redis_stub"].ListInstances

@property
def get_instance(self):
"""Return the gRPC stub for :meth:`CloudRedisClient.get_instance`.

Gets the details of a specific Redis instance.

Returns:
Callable: A callable which accepts the appropriate
deserialized request object and returns a
deserialized response object.
"""
return self._stubs["cloud_redis_stub"].GetInstance
4 changes: 2 additions & 2 deletions google/cloud/redis_v1/proto/cloud_redis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ service CloudRedis {
// Creates a Redis instance based on the specified tier and memory size.
//
// By default, the instance is accessible from the project's
// [default network](/compute/docs/networks-and-firewalls#networks).
// [default network](https://cloud.google.com/vpc/docs/vpc).
//
// The creation is executed asynchronously and callers may check the returned
// operation to track its progress. Once the operation is completed the Redis
Expand Down Expand Up @@ -340,7 +340,7 @@ message Instance {
int32 memory_size_gb = 18 [(google.api.field_behavior) = REQUIRED];

// Optional. The full name of the Google Compute Engine
// [network](/compute/docs/networks-and-firewalls#networks) to which the
// [network](https://cloud.google.com/vpc/docs/vpc) to which the
// instance is connected. If left unspecified, the `default` network
// will be used.
string authorized_network = 20 [(google.api.field_behavior) = OPTIONAL];
Expand Down
Loading