Skip to content

Commit 17aef37

Browse files
Google APIscopybara-github
authored andcommitted
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
1 parent d9673c1 commit 17aef37

3 files changed

Lines changed: 135 additions & 12 deletions

File tree

google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement_v1alpha_grpc_service_config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
{ "service": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement", "method": "DeleteHardware" },
55
{ "service": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement", "method": "DeleteHardwareGroup" },
66
{ "service": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement", "method": "DeleteOrder" },
7+
{ "service": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement", "method": "DeleteSite" },
78
{ "service": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement", "method": "DeleteZone" },
89
{ "service": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement", "method": "GetChangeLogEntry" },
910
{ "service": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement", "method": "GetComment" },

google/cloud/gdchardwaremanagement/v1alpha/resources.proto

Lines changed: 73 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,9 @@ message Site {
231231
OrganizationContact organization_contact = 5
232232
[(google.api.field_behavior) = REQUIRED];
233233

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

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

360+
// Message to describe the MAC address of a machine.
361+
message MacAddress {
362+
// Enum for the different types of MAC address.
363+
enum AddressType {
364+
// Unspecified address type.
365+
ADDRESS_TYPE_UNSPECIFIED = 0;
366+
367+
// Address of a network interface card.
368+
NIC = 1;
369+
370+
// Address of a baseboard management controller.
371+
BMC = 2;
372+
373+
// Address of a virtual interface.
374+
VIRTUAL = 3;
375+
}
376+
377+
// Output only. Address string.
378+
string address = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
379+
380+
// Output only. Address type for this MAC address.
381+
AddressType type = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
382+
}
383+
384+
// Information about individual disks on a machine.
385+
message DiskInfo {
386+
// Output only. Disk manufacturer.
387+
string manufacturer = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
388+
389+
// Output only. Disk slot number.
390+
int32 slot = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
391+
392+
// Output only. Disk serial number.
393+
string serial_number = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
394+
395+
// Output only. Disk PSID.
396+
string psid = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
397+
398+
// Output only. Disk part number.
399+
string part_number = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
400+
401+
// Output only. Disk model number.
402+
string model_number = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
403+
}
404+
405+
// Information about individual machines vendors will provide during turnup.
406+
message MachineInfo {
407+
// Output only. Machine service tag.
408+
string service_tag = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
409+
410+
// Output only. Each associated MAC address.
411+
repeated MacAddress mac_addresses = 2
412+
[(google.api.field_behavior) = OUTPUT_ONLY];
413+
414+
// Output only. Machine name.
415+
string name = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
416+
417+
// Output only. Information for each disk installed.
418+
repeated DiskInfo disk_infos = 4
419+
[(google.api.field_behavior) = OUTPUT_ONLY];
420+
}
421+
360422
// Valid states for hardware.
361423
enum State {
362424
// State of the Hardware is unspecified.
@@ -460,16 +522,20 @@ message Hardware {
460522
}
461523
];
462524

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

469531
// Output only. Actual installation date for this hardware. Filled in by
470532
// Google.
471533
google.type.Date actual_installation_date = 17
472534
[(google.api.field_behavior) = OUTPUT_ONLY];
535+
536+
// Output only. Per machine asset information needed for turnup.
537+
repeated MachineInfo machine_infos = 20
538+
[(google.api.field_behavior) = OUTPUT_ONLY];
473539
}
474540

475541
// A comment on an order.
@@ -854,9 +920,9 @@ message HardwareInstallationInfo {
854920
FOUR_POST = 2;
855921
}
856922

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

861927
// Required. Distance from the power outlet in meters.
862928
int32 power_distance_meters = 2 [(google.api.field_behavior) = REQUIRED];

google/cloud/gdchardwaremanagement/v1alpha/service.proto

Lines changed: 61 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,18 @@ service GDCHardwareManagement {
150150
};
151151
}
152152

153+
// Deletes a site.
154+
rpc DeleteSite(DeleteSiteRequest) returns (google.longrunning.Operation) {
155+
option (google.api.http) = {
156+
delete: "/v1alpha/{name=projects/*/locations/*/sites/*}"
157+
};
158+
option (google.api.method_signature) = "name";
159+
option (google.longrunning.operation_info) = {
160+
response_type: "google.protobuf.Empty"
161+
metadata_type: "OperationMetadata"
162+
};
163+
}
164+
153165
// Lists hardware groups in a given order.
154166
rpc ListHardwareGroups(ListHardwareGroupsRequest)
155167
returns (ListHardwareGroupsResponse) {
@@ -414,6 +426,10 @@ service GDCHardwareManagement {
414426
message ListOrdersRequest {
415427
// Required. The project and location to list orders in.
416428
// Format: `projects/{project}/locations/{location}`
429+
//
430+
// To list orders across all locations, substitute `-` (the hyphen or
431+
// dash character) for the location and check the unreachable field in
432+
// the response message.
417433
string parent = 1 [
418434
(google.api.field_behavior) = REQUIRED,
419435
(google.api.resource_reference) = {
@@ -443,7 +459,8 @@ message ListOrdersResponse {
443459
// A token identifying a page of results the server should return.
444460
string next_page_token = 2;
445461

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

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

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

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

690+
// A request to delete a site.
691+
message DeleteSiteRequest {
692+
// Required. The name of the site.
693+
// Format: `projects/{project}/locations/{location}/sites/{site}`
694+
string name = 1 [
695+
(google.api.field_behavior) = REQUIRED,
696+
(google.api.resource_reference) = {
697+
type: "gdchardwaremanagement.googleapis.com/Site"
698+
}
699+
];
700+
701+
// Optional. An optional unique identifier for this request. See
702+
// [AIP-155](https://google.aip.dev/155).
703+
string request_id = 2 [
704+
(google.api.field_info).format = UUID4,
705+
(google.api.field_behavior) = OPTIONAL
706+
];
707+
}
708+
668709
// A request to list hardware groups.
669710
message ListHardwareGroupsRequest {
670711
// Required. The order to list hardware groups in.
@@ -783,6 +824,10 @@ message DeleteHardwareGroupRequest {
783824
message ListHardwareRequest {
784825
// Required. The project and location to list hardware in.
785826
// Format: `projects/{project}/locations/{location}`
827+
//
828+
// To list hardware across all locations, substitute `-` (the hyphen or
829+
// dash character) for the location and check the unreachable field in
830+
// the response message.
786831
string parent = 1 [
787832
(google.api.field_behavior) = REQUIRED,
788833
(google.api.resource_reference) = {
@@ -812,7 +857,8 @@ message ListHardwareResponse {
812857
// A token identifying a page of results the server should return.
813858
string next_page_token = 2;
814859

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

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

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

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

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

0 commit comments

Comments
 (0)