Skip to content

Commit c95d4e7

Browse files
feat: [google-cloud-vmwareengine] Adding autoscaling settings (#12913)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 653054299 Source-Link: googleapis/googleapis@db2ac7a Source-Link: googleapis/googleapis-gen@cc98715 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZtd2FyZWVuZ2luZS8uT3dsQm90LnlhbWwiLCJoIjoiY2M5ODcxNWU2ZTQ1NTZiNDNmYjQzNzU4ODU4MzA5ZGVjZGIzODdhMSJ9 --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Victor Chudnovsky <vchudnov@google.com>
1 parent 40a5c2a commit c95d4e7

18 files changed

+206
-19
lines changed

packages/google-cloud-vmwareengine/google/cloud/vmwareengine/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
UpdateVmwareEngineNetworkRequest,
120120
)
121121
from google.cloud.vmwareengine_v1.types.vmwareengine_resources import (
122+
AutoscalingSettings,
122123
Cluster,
123124
Credentials,
124125
DnsBindPermission,
@@ -242,6 +243,7 @@
242243
"UpdatePrivateConnectionRequest",
243244
"UpdateSubnetRequest",
244245
"UpdateVmwareEngineNetworkRequest",
246+
"AutoscalingSettings",
245247
"Cluster",
246248
"Credentials",
247249
"DnsBindPermission",

packages/google-cloud-vmwareengine/google/cloud/vmwareengine/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.4.4" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-vmwareengine/google/cloud/vmwareengine_v1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
UpdateVmwareEngineNetworkRequest,
115115
)
116116
from .types.vmwareengine_resources import (
117+
AutoscalingSettings,
117118
Cluster,
118119
Credentials,
119120
DnsBindPermission,
@@ -144,6 +145,7 @@
144145

145146
__all__ = (
146147
"VmwareEngineAsyncClient",
148+
"AutoscalingSettings",
147149
"Cluster",
148150
"CreateClusterRequest",
149151
"CreateExternalAccessRuleRequest",

packages/google-cloud-vmwareengine/google/cloud/vmwareengine_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.4.4" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-vmwareengine/google/cloud/vmwareengine_v1/services/vmware_engine/async_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4167,7 +4167,7 @@ async def sample_create_logging_server():
41674167
logging_server = vmwareengine_v1.LoggingServer()
41684168
logging_server.hostname = "hostname_value"
41694169
logging_server.port = 453
4170-
logging_server.protocol = "TCP"
4170+
logging_server.protocol = "RELP"
41714171
logging_server.source_type = "VCSA"
41724172
41734173
request = vmwareengine_v1.CreateLoggingServerRequest(
@@ -4332,7 +4332,7 @@ async def sample_update_logging_server():
43324332
logging_server = vmwareengine_v1.LoggingServer()
43334333
logging_server.hostname = "hostname_value"
43344334
logging_server.port = 453
4335-
logging_server.protocol = "TCP"
4335+
logging_server.protocol = "RELP"
43364336
logging_server.source_type = "VCSA"
43374337
43384338
request = vmwareengine_v1.UpdateLoggingServerRequest(
@@ -5811,7 +5811,7 @@ async def sample_create_network_peering():
58115811
# Initialize request argument(s)
58125812
network_peering = vmwareengine_v1.NetworkPeering()
58135813
network_peering.peer_network = "peer_network_value"
5814-
network_peering.peer_network_type = "DELL_POWERSCALE"
5814+
network_peering.peer_network_type = "GOOGLE_CLOUD_NETAPP_VOLUMES"
58155815
network_peering.vmware_engine_network = "vmware_engine_network_value"
58165816
58175817
request = vmwareengine_v1.CreateNetworkPeeringRequest(
@@ -6113,7 +6113,7 @@ async def sample_update_network_peering():
61136113
# Initialize request argument(s)
61146114
network_peering = vmwareengine_v1.NetworkPeering()
61156115
network_peering.peer_network = "peer_network_value"
6116-
network_peering.peer_network_type = "DELL_POWERSCALE"
6116+
network_peering.peer_network_type = "GOOGLE_CLOUD_NETAPP_VOLUMES"
61176117
network_peering.vmware_engine_network = "vmware_engine_network_value"
61186118
61196119
request = vmwareengine_v1.UpdateNetworkPeeringRequest(

packages/google-cloud-vmwareengine/google/cloud/vmwareengine_v1/services/vmware_engine/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4816,7 +4816,7 @@ def sample_create_logging_server():
48164816
logging_server = vmwareengine_v1.LoggingServer()
48174817
logging_server.hostname = "hostname_value"
48184818
logging_server.port = 453
4819-
logging_server.protocol = "TCP"
4819+
logging_server.protocol = "RELP"
48204820
logging_server.source_type = "VCSA"
48214821
48224822
request = vmwareengine_v1.CreateLoggingServerRequest(
@@ -4978,7 +4978,7 @@ def sample_update_logging_server():
49784978
logging_server = vmwareengine_v1.LoggingServer()
49794979
logging_server.hostname = "hostname_value"
49804980
logging_server.port = 453
4981-
logging_server.protocol = "TCP"
4981+
logging_server.protocol = "RELP"
49824982
logging_server.source_type = "VCSA"
49834983
49844984
request = vmwareengine_v1.UpdateLoggingServerRequest(
@@ -6423,7 +6423,7 @@ def sample_create_network_peering():
64236423
# Initialize request argument(s)
64246424
network_peering = vmwareengine_v1.NetworkPeering()
64256425
network_peering.peer_network = "peer_network_value"
6426-
network_peering.peer_network_type = "DELL_POWERSCALE"
6426+
network_peering.peer_network_type = "GOOGLE_CLOUD_NETAPP_VOLUMES"
64276427
network_peering.vmware_engine_network = "vmware_engine_network_value"
64286428
64296429
request = vmwareengine_v1.CreateNetworkPeeringRequest(
@@ -6719,7 +6719,7 @@ def sample_update_network_peering():
67196719
# Initialize request argument(s)
67206720
network_peering = vmwareengine_v1.NetworkPeering()
67216721
network_peering.peer_network = "peer_network_value"
6722-
network_peering.peer_network_type = "DELL_POWERSCALE"
6722+
network_peering.peer_network_type = "GOOGLE_CLOUD_NETAPP_VOLUMES"
67236723
network_peering.vmware_engine_network = "vmware_engine_network_value"
67246724
67256725
request = vmwareengine_v1.UpdateNetworkPeeringRequest(

packages/google-cloud-vmwareengine/google/cloud/vmwareengine_v1/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
UpdateVmwareEngineNetworkRequest,
109109
)
110110
from .vmwareengine_resources import (
111+
AutoscalingSettings,
111112
Cluster,
112113
Credentials,
113114
DnsBindPermission,
@@ -229,6 +230,7 @@
229230
"UpdatePrivateConnectionRequest",
230231
"UpdateSubnetRequest",
231232
"UpdateVmwareEngineNetworkRequest",
233+
"AutoscalingSettings",
232234
"Cluster",
233235
"Credentials",
234236
"DnsBindPermission",

packages/google-cloud-vmwareengine/google/cloud/vmwareengine_v1/types/vmwareengine_resources.py

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
from typing import MutableMapping, MutableSequence
1919

20+
from google.protobuf import duration_pb2 # type: ignore
2021
from google.protobuf import timestamp_pb2 # type: ignore
2122
import proto # type: ignore
2223

@@ -39,6 +40,7 @@
3940
"Hcx",
4041
"Nsx",
4142
"Vcenter",
43+
"AutoscalingSettings",
4244
"DnsForwarding",
4345
"NetworkPeering",
4446
"PeeringRoute",
@@ -411,6 +413,9 @@ class Cluster(proto.Message):
411413
management cluster; false otherwise. There can
412414
only be one management cluster in a private
413415
cloud and it has to be the first one.
416+
autoscaling_settings (google.cloud.vmwareengine_v1.types.AutoscalingSettings):
417+
Optional. Configuration of the autoscaling
418+
applied to this cluster.
414419
uid (str):
415420
Output only. System-generated unique
416421
identifier for the resource.
@@ -475,6 +480,11 @@ class State(proto.Enum):
475480
proto.BOOL,
476481
number=7,
477482
)
483+
autoscaling_settings: "AutoscalingSettings" = proto.Field(
484+
proto.MESSAGE,
485+
number=18,
486+
message="AutoscalingSettings",
487+
)
478488
uid: str = proto.Field(
479489
proto.STRING,
480490
number=14,
@@ -1020,10 +1030,19 @@ class Protocol(proto.Enum):
10201030
UDP
10211031
TCP (2):
10221032
TCP
1033+
TLS (3):
1034+
TLS
1035+
SSL (4):
1036+
SSL
1037+
RELP (5):
1038+
RELP
10231039
"""
10241040
PROTOCOL_UNSPECIFIED = 0
10251041
UDP = 1
10261042
TCP = 2
1043+
TLS = 3
1044+
SSL = 4
1045+
RELP = 5
10271046

10281047
class SourceType(proto.Enum):
10291048
r"""Defines possible types of component that produces logs.
@@ -1314,10 +1333,13 @@ class State(proto.Enum):
13141333
The appliance is operational and can be used.
13151334
CREATING (2):
13161335
The appliance is being deployed.
1336+
ACTIVATING (3):
1337+
The appliance is being activated.
13171338
"""
13181339
STATE_UNSPECIFIED = 0
13191340
ACTIVE = 1
13201341
CREATING = 2
1342+
ACTIVATING = 3
13211343

13221344
internal_ip: str = proto.Field(
13231345
proto.STRING,
@@ -1436,6 +1458,148 @@ class State(proto.Enum):
14361458
)
14371459

14381460

1461+
class AutoscalingSettings(proto.Message):
1462+
r"""Autoscaling settings define the rules used by VMware Engine
1463+
to automatically scale-out and scale-in the clusters in a
1464+
private cloud.
1465+
1466+
Attributes:
1467+
autoscaling_policies (MutableMapping[str, google.cloud.vmwareengine_v1.types.AutoscalingSettings.AutoscalingPolicy]):
1468+
Required. The map with autoscaling policies applied to the
1469+
cluster. The key is the identifier of the policy. It must
1470+
meet the following requirements:
1471+
1472+
- Only contains 1-63 alphanumeric characters and hyphens
1473+
- Begins with an alphabetical character
1474+
- Ends with a non-hyphen character
1475+
- Not formatted as a UUID
1476+
- Complies with `RFC
1477+
1034 <https://datatracker.ietf.org/doc/html/rfc1034>`__
1478+
(section 3.5)
1479+
1480+
Currently there map must contain only one element that
1481+
describes the autoscaling policy for compute nodes.
1482+
min_cluster_node_count (int):
1483+
Optional. Minimum number of nodes of any type
1484+
in a cluster. If not specified the default
1485+
limits apply.
1486+
max_cluster_node_count (int):
1487+
Optional. Maximum number of nodes of any type
1488+
in a cluster. If not specified the default
1489+
limits apply.
1490+
cool_down_period (google.protobuf.duration_pb2.Duration):
1491+
Optional. The minimum duration between
1492+
consecutive autoscale operations. It starts once
1493+
addition or removal of nodes is fully completed.
1494+
Defaults to 30 minutes if not specified. Cool
1495+
down period must be in whole minutes (for
1496+
example, 30, 31, 50, 180 minutes).
1497+
"""
1498+
1499+
class Thresholds(proto.Message):
1500+
r"""Thresholds define the utilization of resources triggering
1501+
scale-out and scale-in operations.
1502+
1503+
Attributes:
1504+
scale_out (int):
1505+
Required. The utilization triggering the
1506+
scale-out operation in percent.
1507+
scale_in (int):
1508+
Required. The utilization triggering the
1509+
scale-in operation in percent.
1510+
"""
1511+
1512+
scale_out: int = proto.Field(
1513+
proto.INT32,
1514+
number=1,
1515+
)
1516+
scale_in: int = proto.Field(
1517+
proto.INT32,
1518+
number=2,
1519+
)
1520+
1521+
class AutoscalingPolicy(proto.Message):
1522+
r"""Autoscaling policy describes the behavior of the autoscaling
1523+
with respect to the resource utilization.
1524+
The scale-out operation is initiated if the utilization exceeds
1525+
ANY of the respective thresholds.
1526+
The scale-in operation is initiated if the utilization is below
1527+
ALL of the respective thresholds.
1528+
1529+
Attributes:
1530+
node_type_id (str):
1531+
Required. The canonical identifier of the node type to add
1532+
or remove. Corresponds to the ``NodeType``.
1533+
scale_out_size (int):
1534+
Required. Number of nodes to add to a cluster
1535+
during a scale-out operation. Must be divisible
1536+
by 2 for stretched clusters. During a scale-in
1537+
operation only one node (or 2 for stretched
1538+
clusters) are removed in a single iteration.
1539+
cpu_thresholds (google.cloud.vmwareengine_v1.types.AutoscalingSettings.Thresholds):
1540+
Optional. Utilization thresholds pertaining
1541+
to CPU utilization.
1542+
granted_memory_thresholds (google.cloud.vmwareengine_v1.types.AutoscalingSettings.Thresholds):
1543+
Optional. Utilization thresholds pertaining
1544+
to amount of granted memory.
1545+
consumed_memory_thresholds (google.cloud.vmwareengine_v1.types.AutoscalingSettings.Thresholds):
1546+
Optional. Utilization thresholds pertaining
1547+
to amount of consumed memory.
1548+
storage_thresholds (google.cloud.vmwareengine_v1.types.AutoscalingSettings.Thresholds):
1549+
Optional. Utilization thresholds pertaining
1550+
to amount of consumed storage.
1551+
"""
1552+
1553+
node_type_id: str = proto.Field(
1554+
proto.STRING,
1555+
number=1,
1556+
)
1557+
scale_out_size: int = proto.Field(
1558+
proto.INT32,
1559+
number=2,
1560+
)
1561+
cpu_thresholds: "AutoscalingSettings.Thresholds" = proto.Field(
1562+
proto.MESSAGE,
1563+
number=11,
1564+
message="AutoscalingSettings.Thresholds",
1565+
)
1566+
granted_memory_thresholds: "AutoscalingSettings.Thresholds" = proto.Field(
1567+
proto.MESSAGE,
1568+
number=12,
1569+
message="AutoscalingSettings.Thresholds",
1570+
)
1571+
consumed_memory_thresholds: "AutoscalingSettings.Thresholds" = proto.Field(
1572+
proto.MESSAGE,
1573+
number=13,
1574+
message="AutoscalingSettings.Thresholds",
1575+
)
1576+
storage_thresholds: "AutoscalingSettings.Thresholds" = proto.Field(
1577+
proto.MESSAGE,
1578+
number=14,
1579+
message="AutoscalingSettings.Thresholds",
1580+
)
1581+
1582+
autoscaling_policies: MutableMapping[str, AutoscalingPolicy] = proto.MapField(
1583+
proto.STRING,
1584+
proto.MESSAGE,
1585+
number=1,
1586+
message=AutoscalingPolicy,
1587+
)
1588+
min_cluster_node_count: int = proto.Field(
1589+
proto.INT32,
1590+
number=2,
1591+
)
1592+
max_cluster_node_count: int = proto.Field(
1593+
proto.INT32,
1594+
number=3,
1595+
)
1596+
cool_down_period: duration_pb2.Duration = proto.Field(
1597+
proto.MESSAGE,
1598+
number=4,
1599+
message=duration_pb2.Duration,
1600+
)
1601+
1602+
14391603
class DnsForwarding(proto.Message):
14401604
r"""DNS forwarding config.
14411605
This config defines a list of domain to name server mappings,
@@ -1656,6 +1820,9 @@ class PeerNetworkType(proto.Enum):
16561820
DELL_POWERSCALE (6):
16571821
Peering connection used for connecting to
16581822
Dell PowerScale Filers
1823+
GOOGLE_CLOUD_NETAPP_VOLUMES (7):
1824+
Peering connection used for connecting to
1825+
Google Cloud NetApp Volumes.
16591826
"""
16601827
PEER_NETWORK_TYPE_UNSPECIFIED = 0
16611828
STANDARD = 1
@@ -1664,6 +1831,7 @@ class PeerNetworkType(proto.Enum):
16641831
NETAPP_CLOUD_VOLUMES = 4
16651832
THIRD_PARTY_SERVICE = 5
16661833
DELL_POWERSCALE = 6
1834+
GOOGLE_CLOUD_NETAPP_VOLUMES = 7
16671835

16681836
name: str = proto.Field(
16691837
proto.STRING,

packages/google-cloud-vmwareengine/samples/generated_samples/snippet_metadata_google.cloud.vmwareengine.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-vmwareengine",
11-
"version": "1.4.4"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-vmwareengine/samples/generated_samples/vmwareengine_v1_generated_vmware_engine_create_logging_server_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async def sample_create_logging_server():
4242
logging_server = vmwareengine_v1.LoggingServer()
4343
logging_server.hostname = "hostname_value"
4444
logging_server.port = 453
45-
logging_server.protocol = "TCP"
45+
logging_server.protocol = "RELP"
4646
logging_server.source_type = "VCSA"
4747

4848
request = vmwareengine_v1.CreateLoggingServerRequest(

0 commit comments

Comments
 (0)