Skip to content

Commit

Permalink
feat: [google-cloud-gdchardwaremanagement] add DNS address, Kubernete…
Browse files Browse the repository at this point in the history
…s primary VLAN ID, and provisioning state to the Zone resource (#13273)

- [ ] Regenerate this pull request now.

BEGIN_COMMIT_OVERRIDE
feat: add MAC address-associated IP address to the Hardware resource
docs: change state_signal field in SignalZoneState method request as
optional
feat: add provisioning_state_signal field in SignalZoneState method
request
feat: add DNS address, Kubernetes primary VLAN ID, and provisioning
state to the Zone resource
END_COMMIT_OVERRIDE



PiperOrigin-RevId: 695813387

Source-Link:
googleapis/googleapis@dee637f

Source-Link:
googleapis/googleapis-gen@41ed4da
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWdkY2hhcmR3YXJlbWFuYWdlbWVudC8uT3dsQm90LnlhbWwiLCJoIjoiNDFlZDRkYWU4Yzg4NTkyOTE0ZTQ1MWE2YjFkYjkyOTEwMzI0ZTRkOSJ9

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Nov 13, 2024
1 parent f7470ad commit 3c1e8b8
Show file tree
Hide file tree
Showing 11 changed files with 149 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.1.7" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.1.7" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -4619,7 +4619,6 @@ async def sample_signal_zone_state():
# Initialize request argument(s)
request = gdchardwaremanagement_v1alpha.SignalZoneStateRequest(
name="name_value",
state_signal="FACTORY_TURNUP_CHECKS_FAILED",
)
# Make the request
Expand All @@ -4644,8 +4643,9 @@ async def sample_signal_zone_state():
on the ``request`` instance; if ``request`` is provided, this
should not be set.
state_signal (:class:`google.cloud.gdchardwaremanagement_v1alpha.types.SignalZoneStateRequest.StateSignal`):
Required. The state signal to send
for this zone.
Optional. The state signal to send for this zone. Either
state_signal or provisioning_state_signal must be set,
but not both.
This corresponds to the ``state_signal`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5053,7 +5053,6 @@ def sample_signal_zone_state():
# Initialize request argument(s)
request = gdchardwaremanagement_v1alpha.SignalZoneStateRequest(
name="name_value",
state_signal="FACTORY_TURNUP_CHECKS_FAILED",
)
# Make the request
Expand All @@ -5078,8 +5077,9 @@ def sample_signal_zone_state():
on the ``request`` instance; if ``request`` is provided, this
should not be set.
state_signal (google.cloud.gdchardwaremanagement_v1alpha.types.SignalZoneStateRequest.StateSignal):
Required. The state signal to send
for this zone.
Optional. The state signal to send for this zone. Either
state_signal or provisioning_state_signal must be set,
but not both.
This corresponds to the ``state_signal`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,10 @@ class MacAddress(proto.Message):
type_ (google.cloud.gdchardwaremanagement_v1alpha.types.Hardware.MacAddress.AddressType):
Output only. Address type for this MAC
address.
ipv4_address (str):
Output only. Static IP address (if used) that
is associated with the MAC address. Only
applicable for VIRTUAL MAC address type.
"""

class AddressType(proto.Enum):
Expand Down Expand Up @@ -660,6 +664,10 @@ class AddressType(proto.Enum):
number=2,
enum="Hardware.MacAddress.AddressType",
)
ipv4_address: str = proto.Field(
proto.STRING,
number=3,
)

class DiskInfo(proto.Message):
r"""Information about individual disks on a machine.
Expand Down Expand Up @@ -1069,6 +1077,9 @@ class Zone(proto.Message):
subscription_configs (MutableSequence[google.cloud.gdchardwaremanagement_v1alpha.types.SubscriptionConfig]):
Output only. Subscription configurations for
this zone.
provisioning_state (google.cloud.gdchardwaremanagement_v1alpha.types.Zone.ProvisioningState):
Output only. Provisioning state for
configurations like MAC addresses.
"""

class State(proto.Enum):
Expand Down Expand Up @@ -1102,6 +1113,25 @@ class State(proto.Enum):
ACTIVE = 3
CANCELLED = 4

class ProvisioningState(proto.Enum):
r"""Valid provisioning states for configurations like MAC
addresses.
Values:
PROVISIONING_STATE_UNSPECIFIED (0):
Provisioning state is unspecified.
PROVISIONING_REQUIRED (1):
Provisioning is required. Set by Google.
PROVISIONING_IN_PROGRESS (2):
Provisioning is in progress. Set by customer.
PROVISIONING_COMPLETE (3):
Provisioning is complete. Set by customer.
"""
PROVISIONING_STATE_UNSPECIFIED = 0
PROVISIONING_REQUIRED = 1
PROVISIONING_IN_PROGRESS = 2
PROVISIONING_COMPLETE = 3

name: str = proto.Field(
proto.STRING,
number=1,
Expand Down Expand Up @@ -1153,6 +1183,11 @@ class State(proto.Enum):
number=13,
message="SubscriptionConfig",
)
provisioning_state: ProvisioningState = proto.Field(
proto.ENUM,
number=14,
enum=ProvisioningState,
)


class OrganizationContact(proto.Message):
Expand Down Expand Up @@ -1538,6 +1573,18 @@ class ZoneNetworkConfig(proto.Message):
Optional. An IPv4 subnet for the kubernetes
network. If unspecified, the kubernetes subnet
will be the same as the management subnet.
dns_ipv4_addresses (MutableSequence[str]):
Optional. DNS nameservers.
The GDC Infrastructure will resolve DNS queries
via these IPs. If unspecified, Google DNS is
used.
kubernetes_primary_vlan_id (int):
Optional. Kubernetes VLAN ID.
By default, the kubernetes node, including the
primary kubernetes network, are in the same VLAN
as the machine management network. For network
segmentation purposes, these can optionally be
separated.
"""

machine_mgmt_ipv4_range: str = proto.Field(
Expand All @@ -1562,6 +1609,14 @@ class ZoneNetworkConfig(proto.Message):
number=5,
message="Subnet",
)
dns_ipv4_addresses: MutableSequence[str] = proto.RepeatedField(
proto.STRING,
number=6,
)
kubernetes_primary_vlan_id: int = proto.Field(
proto.INT32,
number=7,
)


class Subnet(proto.Message):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1477,8 +1477,13 @@ class SignalZoneStateRequest(proto.Message):
Optional. An optional unique identifier for this request.
See `AIP-155 <https://google.aip.dev/155>`__.
state_signal (google.cloud.gdchardwaremanagement_v1alpha.types.SignalZoneStateRequest.StateSignal):
Required. The state signal to send for this
zone.
Optional. The state signal to send for this zone. Either
state_signal or provisioning_state_signal must be set, but
not both.
provisioning_state_signal (google.cloud.gdchardwaremanagement_v1alpha.types.SignalZoneStateRequest.ProvisioningStateSignal):
Optional. The provisioning state signal to send for this
zone. Either state_signal or provisioning_state_signal must
be set, but not both.
"""

class StateSignal(proto.Enum):
Expand All @@ -1501,6 +1506,21 @@ class StateSignal(proto.Enum):
READY_FOR_SITE_TURNUP = 1
FACTORY_TURNUP_CHECKS_FAILED = 2

class ProvisioningStateSignal(proto.Enum):
r"""Valid provisioning state signals for a zone.
Values:
PROVISIONING_STATE_SIGNAL_UNSPECIFIED (0):
Provisioning state signal is unspecified.
PROVISIONING_IN_PROGRESS (1):
Provisioning is in progress.
PROVISIONING_COMPLETE (2):
Provisioning is complete.
"""
PROVISIONING_STATE_SIGNAL_UNSPECIFIED = 0
PROVISIONING_IN_PROGRESS = 1
PROVISIONING_COMPLETE = 2

name: str = proto.Field(
proto.STRING,
number=1,
Expand All @@ -1514,6 +1534,11 @@ class StateSignal(proto.Enum):
number=3,
enum=StateSignal,
)
provisioning_state_signal: ProvisioningStateSignal = proto.Field(
proto.ENUM,
number=4,
enum=ProvisioningStateSignal,
)


class OperationMetadata(proto.Message):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ async def sample_signal_zone_state():
# Initialize request argument(s)
request = gdchardwaremanagement_v1alpha.SignalZoneStateRequest(
name="name_value",
state_signal="FACTORY_TURNUP_CHECKS_FAILED",
)

# Make the request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def sample_signal_zone_state():
# Initialize request argument(s)
request = gdchardwaremanagement_v1alpha.SignalZoneStateRequest(
name="name_value",
state_signal="FACTORY_TURNUP_CHECKS_FAILED",
)

# Make the request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-gdchardwaremanagement",
"version": "0.1.7"
"version": "0.1.0"
},
"snippets": [
{
Expand Down Expand Up @@ -4676,12 +4676,12 @@
"regionTag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SignalZoneState_async",
"segments": [
{
"end": 56,
"end": 55,
"start": 27,
"type": "FULL"
},
{
"end": 56,
"end": 55,
"start": 27,
"type": "SHORT"
},
Expand All @@ -4691,18 +4691,18 @@
"type": "CLIENT_INITIALIZATION"
},
{
"end": 46,
"end": 45,
"start": 41,
"type": "REQUEST_INITIALIZATION"
},
{
"end": 53,
"start": 47,
"end": 52,
"start": 46,
"type": "REQUEST_EXECUTION"
},
{
"end": 57,
"start": 54,
"end": 56,
"start": 53,
"type": "RESPONSE_HANDLING"
}
],
Expand Down Expand Up @@ -4760,12 +4760,12 @@
"regionTag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SignalZoneState_sync",
"segments": [
{
"end": 56,
"end": 55,
"start": 27,
"type": "FULL"
},
{
"end": 56,
"end": 55,
"start": 27,
"type": "SHORT"
},
Expand All @@ -4775,18 +4775,18 @@
"type": "CLIENT_INITIALIZATION"
},
{
"end": 46,
"end": 45,
"start": 41,
"type": "REQUEST_INITIALIZATION"
},
{
"end": 53,
"start": 47,
"end": 52,
"start": 46,
"type": "REQUEST_EXECUTION"
},
{
"end": 57,
"start": 54,
"end": 56,
"start": 53,
"type": "RESPONSE_HANDLING"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class gdchardwaremanagementCallTransformer(cst.CSTTransformer):
'list_skus': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ),
'list_zones': ('parent', 'page_size', 'page_token', 'filter', 'order_by', ),
'record_action_on_comment': ('name', 'action_type', ),
'signal_zone_state': ('name', 'state_signal', 'request_id', ),
'signal_zone_state': ('name', 'request_id', 'state_signal', 'provisioning_state_signal', ),
'submit_order': ('name', 'request_id', 'type_', ),
'update_hardware': ('update_mask', 'hardware', 'request_id', ),
'update_hardware_group': ('update_mask', 'hardware_group', 'request_id', ),
Expand Down
Loading

0 comments on commit 3c1e8b8

Please sign in to comment.