Skip to content

Commit

Permalink
feat: resource name IDENTIFIER enforcement
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <[email protected]>
  • Loading branch information
glimchb committed Aug 31, 2023
1 parent 56e46f7 commit 5f0b892
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 38 deletions.
6 changes: 2 additions & 4 deletions network/evpn-gw/v1alpha1/l2_xpu_infra_mgr.proto
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ message LogicalBridge {
// user can only set {resource}_id on the Create request object
// Format: logicalBridges/{logical_bridge}
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = IDENTIFIER,
(google.api.resource_reference).type = "opi_api.network.evpn_gw.v1alpha1/LogicalBridge"
];

Expand Down Expand Up @@ -227,8 +226,7 @@ message BridgePort {
// user can only set {resource}_id on the Create request object
// Format: bridge_ports/{bridge_port}
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = IDENTIFIER,
(google.api.resource_reference).type = "opi_api.network.evpn_gw.v1alpha1/BridgePort"
];

Expand Down
6 changes: 2 additions & 4 deletions network/evpn-gw/v1alpha1/l3_xpu_infra_mgr.proto
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ message Vrf {
// user can only set {resource}_id on the Create request object
// Format: vrfs/{vrf}
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = IDENTIFIER,
(google.api.resource_reference).type = "opi_api.network.evpn_gw.v1alpha1/Vrf"
];

Expand Down Expand Up @@ -249,8 +248,7 @@ message Svi {
// user can only set {resource}_id on the Create request object
// Format: svis/{svi}
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = IDENTIFIER,
(google.api.resource_reference).type = "opi_api.network.evpn_gw.v1alpha1/Svi"
];

Expand Down
3 changes: 1 addition & 2 deletions network/opinetcommon/v1alpha1/openconfig_interfaces.proto
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,7 @@ message NetInterface {
// Name of the interface. This is an opaque object that is not
// user settable. It is returned by the created object
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = IDENTIFIER,
(google.api.resource_reference).type = "opi_api.network.opinetcommon.v1alpha1/NetInterface"
];
// Configuration settings - rw
Expand Down
3 changes: 1 addition & 2 deletions storage/v1alpha1/backend_aio.proto
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ message AioVolume {
// name will be returned with created object
// user can only set {resource}_id on the Create request object
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = IDENTIFIER,
(google.api.resource_reference).type = "opi_api.storage.v1/AioVolume"
];

Expand Down
3 changes: 1 addition & 2 deletions storage/v1alpha1/backend_null.proto
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ message NullVolume {
// name will be returned with created object
// user can only set {resource}_id on the Create request object
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = IDENTIFIER,
(google.api.resource_reference).type = "opi_api.storage.v1/NullVolume"
];

Expand Down
9 changes: 3 additions & 6 deletions storage/v1alpha1/backend_nvme_tcp.proto
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@ message NvmeRemoteController {
// name will be returned with created object
// user can only set {resource}_id on the Create request object
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = IDENTIFIER,
(google.api.resource_reference).type = "opi_api.storage.v1/NvmeRemoteController"
];

Expand Down Expand Up @@ -182,8 +181,7 @@ message NvmePath {
// name will be returned with created object
// user can only set {resource}_id on the Create request object
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = IDENTIFIER,
(google.api.resource_reference).type = "opi_api.storage.v1/NvmePath"
];

Expand Down Expand Up @@ -227,8 +225,7 @@ message NvmeRemoteNamespace {
// name will be returned with created object
// user can only set {resource}_id on the Create request object
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = IDENTIFIER,
(google.api.resource_reference).type = "opi_api.storage.v1/NvmeRemoteNamespace"
];

Expand Down
9 changes: 3 additions & 6 deletions storage/v1alpha1/frontend_nvme_pcie.proto
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,7 @@ message NvmeSubsystem {
// name will be returned with created object
// user can only set {resource}_id on the Create request object
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = IDENTIFIER,
(google.api.resource_reference).type = "opi_api.storage.v1/NvmeSubsystem"
];

Expand Down Expand Up @@ -219,8 +218,7 @@ message NvmeController {
// name will be returned with created object
// user can only set {resource}_id on the Create request object
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = IDENTIFIER,
(google.api.resource_reference).type = "opi_api.storage.v1/NvmeController"
];

Expand Down Expand Up @@ -289,8 +287,7 @@ message NvmeNamespace {
// name will be returned with created object
// user can only set {resource}_id on the Create request object
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = IDENTIFIER,
(google.api.resource_reference).type = "opi_api.storage.v1/NvmeNamespace"
];

Expand Down
3 changes: 1 addition & 2 deletions storage/v1alpha1/frontend_virtio_blk.proto
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ message VirtioBlk {
// name will be returned with created object
// user can only set {resource}_id on the Create request object
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = IDENTIFIER,
(google.api.resource_reference).type = "opi_api.storage.v1/VirtioBlk"
];

Expand Down
9 changes: 3 additions & 6 deletions storage/v1alpha1/frontend_virtio_scsi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ message VirtioScsiTarget {
// name will be returned with created object
// user can only set {resource}_id on the Create request object
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = IDENTIFIER,
(google.api.resource_reference).type = "opi_api.storage.v1/VirtioScsiTarget"
];

Expand All @@ -188,8 +187,7 @@ message VirtioScsiController {
// name will be returned with created object
// user can only set {resource}_id on the Create request object
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = IDENTIFIER,
(google.api.resource_reference).type = "opi_api.storage.v1/VirtioScsiController"
];

Expand All @@ -215,8 +213,7 @@ message VirtioScsiLun {
// name will be returned with created object
// user can only set {resource}_id on the Create request object
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = IDENTIFIER,
(google.api.resource_reference).type = "opi_api.storage.v1/VirtioScsiLun"
];

Expand Down
3 changes: 1 addition & 2 deletions storage/v1alpha1/middleend_encryption.proto
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ message EncryptedVolume {
// name will be returned with created object
// user can only set {resource}_id on the Create request object
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = IDENTIFIER,
(google.api.resource_reference).type = "opi_api.storage.v1/EncryptedVolume"
];

Expand Down
3 changes: 1 addition & 2 deletions storage/v1alpha1/middleend_qos_volume.proto
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ message QosVolume {
// name will be returned with created object
// user can only set {resource}_id on the Create request object
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = IDENTIFIER,
(google.api.resource_reference).type = "opi_api.storage.v1/QosVolume"
];

Expand Down

0 comments on commit 5f0b892

Please sign in to comment.