Skip to content

Commit

Permalink
feat: [gdchardwaremanagement] add a DeleteSite method (#5767)
Browse files Browse the repository at this point in the history
* feat: add a DeleteSite method
feat: add MAC address and disk info to the Hardware resource
docs: annotate rack_location field as required; this was always enforced

PiperOrigin-RevId: 689565044

Source-Link: googleapis/googleapis@17aef37

Source-Link: googleapis/googleapis-gen@856b1e6
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWdkY2hhcmR3YXJlbWFuYWdlbWVudC8uT3dsQm90LnlhbWwiLCJoIjoiODU2YjFlNjE2Yzc1YWY0MWY1ODVlZDExYWVmOWE2OTNhNWU5ZDhlNSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 30, 2024
1 parent e8664f7 commit 55c77b9
Show file tree
Hide file tree
Showing 18 changed files with 2,573 additions and 19 deletions.
1 change: 1 addition & 0 deletions packages/google-cloud-gdchardwaremanagement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
| G_d_c_hardware_management.delete_hardware | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.delete_hardware.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.delete_hardware.js,packages/google-cloud-gdchardwaremanagement/samples/README.md) |
| G_d_c_hardware_management.delete_hardware_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.delete_hardware_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.delete_hardware_group.js,packages/google-cloud-gdchardwaremanagement/samples/README.md) |
| G_d_c_hardware_management.delete_order | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.delete_order.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.delete_order.js,packages/google-cloud-gdchardwaremanagement/samples/README.md) |
| G_d_c_hardware_management.delete_site | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.delete_site.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.delete_site.js,packages/google-cloud-gdchardwaremanagement/samples/README.md) |
| G_d_c_hardware_management.delete_zone | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.delete_zone.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.delete_zone.js,packages/google-cloud-gdchardwaremanagement/samples/README.md) |
| G_d_c_hardware_management.get_change_log_entry | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.get_change_log_entry.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.get_change_log_entry.js,packages/google-cloud-gdchardwaremanagement/samples/README.md) |
| G_d_c_hardware_management.get_comment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.get_comment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gdchardwaremanagement/samples/generated/v1alpha/g_d_c_hardware_management.get_comment.js,packages/google-cloud-gdchardwaremanagement/samples/README.md) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,9 @@ message Site {
OrganizationContact organization_contact = 5
[(google.api.field_behavior) = REQUIRED];

// Required. A URL to the Google Maps address location of the site.
// Optional. A URL to the Google Maps address location of the site.
// An example value is `https://goo.gl/maps/xxxxxxxxx`.
string google_maps_pin_uri = 6 [(google.api.field_behavior) = REQUIRED];
string google_maps_pin_uri = 6 [(google.api.field_behavior) = OPTIONAL];

// Optional. The time periods when the site is accessible.
// If this field is empty, the site is accessible at all times.
Expand Down Expand Up @@ -357,6 +357,68 @@ message Hardware {
singular: "hardware"
};

// Message to describe the MAC address of a machine.
message MacAddress {
// Enum for the different types of MAC address.
enum AddressType {
// Unspecified address type.
ADDRESS_TYPE_UNSPECIFIED = 0;

// Address of a network interface card.
NIC = 1;

// Address of a baseboard management controller.
BMC = 2;

// Address of a virtual interface.
VIRTUAL = 3;
}

// Output only. Address string.
string address = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Address type for this MAC address.
AddressType type = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Information about individual disks on a machine.
message DiskInfo {
// Output only. Disk manufacturer.
string manufacturer = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Disk slot number.
int32 slot = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Disk serial number.
string serial_number = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Disk PSID.
string psid = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Disk part number.
string part_number = 5 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Disk model number.
string model_number = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Information about individual machines vendors will provide during turnup.
message MachineInfo {
// Output only. Machine service tag.
string service_tag = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Each associated MAC address.
repeated MacAddress mac_addresses = 2
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Machine name.
string name = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Information for each disk installed.
repeated DiskInfo disk_infos = 4
[(google.api.field_behavior) = OUTPUT_ONLY];
}

// Valid states for hardware.
enum State {
// State of the Hardware is unspecified.
Expand Down Expand Up @@ -460,16 +522,20 @@ message Hardware {
}
];

// Optional. Requested installation date for this hardware. This is
// auto-populated when the order is accepted, if the hardware's HardwareGroup
// specifies this. It can also be filled in by the customer.
// Optional. Requested installation date for this hardware. If not specified,
// this is auto-populated from the order's fulfillment_time upon submission or
// from the HardwareGroup's requested_installation_date upon order acceptance.
google.type.Date requested_installation_date = 16
[(google.api.field_behavior) = OPTIONAL];

// Output only. Actual installation date for this hardware. Filled in by
// Google.
google.type.Date actual_installation_date = 17
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Per machine asset information needed for turnup.
repeated MachineInfo machine_infos = 20
[(google.api.field_behavior) = OUTPUT_ONLY];
}

// A comment on an order.
Expand Down Expand Up @@ -854,9 +920,9 @@ message HardwareInstallationInfo {
FOUR_POST = 2;
}

// Optional. Location of the rack in the site e.g. Floor 2, Room 201, Row 7,
// Required. Location of the rack in the site e.g. Floor 2, Room 201, Row 7,
// Rack 3.
string rack_location = 1 [(google.api.field_behavior) = OPTIONAL];
string rack_location = 1 [(google.api.field_behavior) = REQUIRED];

// Required. Distance from the power outlet in meters.
int32 power_distance_meters = 2 [(google.api.field_behavior) = REQUIRED];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,18 @@ service GDCHardwareManagement {
};
}

// Deletes a site.
rpc DeleteSite(DeleteSiteRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1alpha/{name=projects/*/locations/*/sites/*}"
};
option (google.api.method_signature) = "name";
option (google.longrunning.operation_info) = {
response_type: "google.protobuf.Empty"
metadata_type: "OperationMetadata"
};
}

// Lists hardware groups in a given order.
rpc ListHardwareGroups(ListHardwareGroupsRequest)
returns (ListHardwareGroupsResponse) {
Expand Down Expand Up @@ -414,6 +426,10 @@ service GDCHardwareManagement {
message ListOrdersRequest {
// Required. The project and location to list orders in.
// Format: `projects/{project}/locations/{location}`
//
// To list orders across all locations, substitute `-` (the hyphen or
// dash character) for the location and check the unreachable field in
// the response message.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down Expand Up @@ -443,7 +459,8 @@ message ListOrdersResponse {
// A token identifying a page of results the server should return.
string next_page_token = 2;

// Locations that could not be reached.
// Locations that could not be reached. Only used for queries to the wildcard
// location `-`. If non-empty, it indicates that the results are incomplete.
repeated string unreachable = 3;
}

Expand Down Expand Up @@ -574,6 +591,10 @@ message SubmitOrderRequest {
message ListSitesRequest {
// Required. The project and location to list sites in.
// Format: `projects/{project}/locations/{location}`
//
// To list sites across all locations, substitute `-` (the hyphen or
// dash character) for the location and check the unreachable field in
// the response message.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down Expand Up @@ -603,7 +624,8 @@ message ListSitesResponse {
// A token identifying a page of results the server should return.
string next_page_token = 2;

// Locations that could not be reached.
// Locations that could not be reached. Only used for queries to the wildcard
// location `-`. If non-empty, it indicates that the results are incomplete.
repeated string unreachable = 3;
}

Expand Down Expand Up @@ -665,6 +687,25 @@ message UpdateSiteRequest {
string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
}

// A request to delete a site.
message DeleteSiteRequest {
// Required. The name of the site.
// Format: `projects/{project}/locations/{location}/sites/{site}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "gdchardwaremanagement.googleapis.com/Site"
}
];

// Optional. An optional unique identifier for this request. See
// [AIP-155](https://google.aip.dev/155).
string request_id = 2 [
(google.api.field_info).format = UUID4,
(google.api.field_behavior) = OPTIONAL
];
}

// A request to list hardware groups.
message ListHardwareGroupsRequest {
// Required. The order to list hardware groups in.
Expand Down Expand Up @@ -783,6 +824,10 @@ message DeleteHardwareGroupRequest {
message ListHardwareRequest {
// Required. The project and location to list hardware in.
// Format: `projects/{project}/locations/{location}`
//
// To list hardware across all locations, substitute `-` (the hyphen or
// dash character) for the location and check the unreachable field in
// the response message.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down Expand Up @@ -812,7 +857,8 @@ message ListHardwareResponse {
// A token identifying a page of results the server should return.
string next_page_token = 2;

// Locations that could not be reached.
// Locations that could not be reached. Only used for queries to the wildcard
// location `-`. If non-empty, it indicates that the results are incomplete.
repeated string unreachable = 3;
}

Expand Down Expand Up @@ -1050,6 +1096,10 @@ message GetChangeLogEntryRequest {
message ListSkusRequest {
// Required. The project and location to list SKUs in.
// Format: `projects/{project}/locations/{location}`
//
// To list SKUs across all locations, substitute `-` (the hyphen or
// dash character) for the location and check the unreachable field in
// the response message.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down Expand Up @@ -1079,7 +1129,8 @@ message ListSkusResponse {
// A token identifying a page of results the server should return.
string next_page_token = 2;

// Locations that could not be reached.
// Locations that could not be reached. Only used for queries to the wildcard
// location `-`. If non-empty, it indicates that the results are incomplete.
repeated string unreachable = 3;
}

Expand All @@ -1099,6 +1150,10 @@ message GetSkuRequest {
message ListZonesRequest {
// Required. The project and location to list zones in.
// Format: `projects/{project}/locations/{location}`
//
// To list zones across all locations, substitute `-` (the hyphen or
// dash character) for the location and check the unreachable field in
// the response message.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down Expand Up @@ -1128,7 +1183,8 @@ message ListZonesResponse {
// A token identifying a page of results the server should return.
string next_page_token = 2;

// Locations that could not be reached.
// Locations that could not be reached. Only used for queries to the wildcard
// location `-`. If non-empty, it indicates that the results are incomplete.
repeated string unreachable = 3;
}

Expand Down
Loading

0 comments on commit 55c77b9

Please sign in to comment.