Skip to content

Commit

Permalink
[storage] [lint] Re-enable rule=core::0134
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <[email protected]>
  • Loading branch information
glimchb committed Dec 8, 2022
1 parent 77d372e commit b14b925
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 34 deletions.
2 changes: 1 addition & 1 deletion storage/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ all:
mv google "${PWD}"/v1alpha1/
docker run --user=$$(id -u):$$(id -g) --rm --entrypoint=sh -v "${PWD}/../common/v1":/common -v "${PWD}"/v1alpha1/:/out -w /out -v "${PWD}"/v1alpha1:/protos pseudomuto/protoc-gen-doc -c "protoc -I /common -I /protos --doc_out=/out --doc_opt=markdown,autogen.md /protos/*.proto /common/*.proto"
docker run --user=$$(id -u):$$(id -g) --rm --entrypoint=sh -v "${PWD}/../common/v1":/common -v "${PWD}"/v1alpha1/:/out -w /out ghcr.io/docker-multiarch/google-api-linter:1.36.0 -c "api-linter -I /common /out/*.proto --output-format summary"
docker run --user=$$(id -u):$$(id -g) --rm --entrypoint=sh -v "${PWD}/../common/v1":/common -v "${PWD}"/v1alpha1/:/out -w /out ghcr.io/docker-multiarch/google-api-linter:1.36.0 -c "api-linter -I /common /out/*.proto --output-format github --disable-rule=core::0192::has-comments --disable-rule=core::0127 --disable-rule=core::0133 --disable-rule=core::0134 --disable-rule=core::0156 --set-exit-status"
docker run --user=$$(id -u):$$(id -g) --rm --entrypoint=sh -v "${PWD}/../common/v1":/common -v "${PWD}"/v1alpha1/:/out -w /out ghcr.io/docker-multiarch/google-api-linter:1.36.0 -c "api-linter -I /common /out/*.proto --output-format github --disable-rule=core::0192::has-comments --disable-rule=core::0127 --disable-rule=core::0133 --disable-rule=core::0156 --set-exit-status"
rm -rf "${PWD}"/v1alpha1/google
10 changes: 7 additions & 3 deletions storage/v1alpha1/backend_aio.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import "google/api/resource.proto";
import "google/protobuf/empty.proto";
import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/field_mask.proto";

import "object_key.proto";
import "uuid.proto";
Expand All @@ -35,9 +36,10 @@ service AioControllerService {
}
rpc UpdateAioController (UpdateAioControllerRequest) returns (AioController) {
option (google.api.http) = {
patch: "/v1/subsystems"
body: "subsystem"
patch: "/v1/{aio_controller.name=subsystems}"
body: "aio_controller"
};
option (google.api.method_signature) = "aio_controller,update_mask";
}
rpc ListAioControllers (ListAioControllersRequest) returns (ListAioControllersResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -77,7 +79,9 @@ message DeleteAioControllerRequest {
}

message UpdateAioControllerRequest {
AioController device = 1;
AioController aio_controller = 1;
// The list of fields to update.
google.protobuf.FieldMask update_mask = 2;
}

message ListAioControllersRequest {
Expand Down
10 changes: 7 additions & 3 deletions storage/v1alpha1/backend_null.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import "google/api/resource.proto";
import "google/protobuf/empty.proto";
import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/field_mask.proto";

import "object_key.proto";
import "uuid.proto";
Expand All @@ -35,9 +36,10 @@ service NullDebugService {
}
rpc UpdateNullDebug (UpdateNullDebugRequest) returns (NullDebug) {
option (google.api.http) = {
patch: "/v1/subsystems"
body: "subsystem"
patch: "/v1/{null_debug.name=subsystems}"
body: "null_debug"
};
option (google.api.method_signature) = "null_debug,update_mask";
}
rpc ListNullDebugs (ListNullDebugsRequest) returns (ListNullDebugsResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -73,7 +75,9 @@ message DeleteNullDebugRequest {
}

message UpdateNullDebugRequest {
NullDebug device = 1;
NullDebug null_debug = 1;
// The list of fields to update.
google.protobuf.FieldMask update_mask = 2;
}

message ListNullDebugsRequest {
Expand Down
10 changes: 7 additions & 3 deletions storage/v1alpha1/backend_nvme_tcp.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import "google/api/resource.proto";
import "google/protobuf/empty.proto";
import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/field_mask.proto";

import "object_key.proto";

Expand All @@ -34,9 +35,10 @@ service NVMfRemoteControllerService {
}
rpc UpdateNVMfRemoteController (UpdateNVMfRemoteControllerRequest) returns (NVMfRemoteController) {
option (google.api.http) = {
patch: "/v1/subsystems"
body: "subsystem"
patch: "/v1/{nv_mf_remote_controller.name=subsystems}"
body: "nv_mf_remote_controller"
};
option (google.api.method_signature) = "nv_mf_remote_controller,update_mask";
}
rpc ListNVMfRemoteControllers (ListNVMfRemoteControllersRequest) returns (ListNVMfRemoteControllersResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -84,7 +86,9 @@ message DeleteNVMfRemoteControllerRequest {
}

message UpdateNVMfRemoteControllerRequest {
NVMfRemoteController ctrl = 1;
NVMfRemoteController nv_mf_remote_controller = 1;
// The list of fields to update.
google.protobuf.FieldMask update_mask = 2;
}

message ListNVMfRemoteControllersRequest {
Expand Down
28 changes: 19 additions & 9 deletions storage/v1alpha1/frontend_nvme_pcie.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import "google/api/resource.proto";
import "google/protobuf/empty.proto";
import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/field_mask.proto";

// Front End (host-facing) APIs. Mostly used for NVMe/PCIe emulation and host presentation.
service FrontendNvmeService {
Expand All @@ -36,9 +37,10 @@ service FrontendNvmeService {
}
rpc UpdateNVMeSubsystem (UpdateNVMeSubsystemRequest) returns (NVMeSubsystem) {
option (google.api.http) = {
patch: "/v1/subsystems"
body: "subsystem"
patch: "/v1/{nv_me_subsystem.name=subsystems}"
body: "nv_me_subsystem"
};
option (google.api.method_signature) = "nv_me_subsystem,update_mask";
}
rpc ListNVMeSubsystems (ListNVMeSubsystemsRequest) returns (ListNVMeSubsystemsResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -68,9 +70,10 @@ service FrontendNvmeService {
}
rpc UpdateNVMeController (UpdateNVMeControllerRequest) returns (NVMeController) {
option (google.api.http) = {
patch: "/v1/controllers"
body: "controller"
patch: "/v1/{nv_me_controller.name=subsystems}"
body: "nv_me_controller"
};
option (google.api.method_signature) = "nv_me_controller,update_mask";
}
rpc ListNVMeControllers (ListNVMeControllersRequest) returns (ListNVMeControllersResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -100,9 +103,10 @@ service FrontendNvmeService {
}
rpc UpdateNVMeNamespace (UpdateNVMeNamespaceRequest) returns (NVMeNamespace) {
option (google.api.http) = {
patch: "/v1/namespaces"
body: "namespace"
patch: "/v1/{nv_me_namespace.name=subsystems}"
body: "nv_me_namespace"
};
option (google.api.method_signature) = "nv_me_namespace,update_mask";
}
rpc ListNVMeNamespaces (ListNVMeNamespacesRequest) returns (ListNVMeNamespacesResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -248,7 +252,9 @@ message DeleteNVMeSubsystemRequest {
}

message UpdateNVMeSubsystemRequest {
NVMeSubsystem subsystem = 1;
NVMeSubsystem nv_me_subsystem = 1;
// The list of fields to update.
google.protobuf.FieldMask update_mask = 2;
}

message ListNVMeSubsystemsRequest {
Expand Down Expand Up @@ -292,7 +298,9 @@ message DeleteNVMeControllerRequest {
}

message UpdateNVMeControllerRequest {
NVMeController controller = 1;
NVMeController nv_me_controller = 1;
// The list of fields to update.
google.protobuf.FieldMask update_mask = 2;
}

message ListNVMeControllersRequest {
Expand Down Expand Up @@ -337,7 +345,9 @@ message DeleteNVMeNamespaceRequest {
}

message UpdateNVMeNamespaceRequest {
NVMeNamespace namespace = 1;
NVMeNamespace nv_me_namespace = 1;
// The list of fields to update.
google.protobuf.FieldMask update_mask = 2;
}

message ListNVMeNamespacesRequest {
Expand Down
10 changes: 7 additions & 3 deletions storage/v1alpha1/frontend_virtio_blk.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import "google/api/resource.proto";
import "google/protobuf/empty.proto";
import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/field_mask.proto";

// Front End (host-facing) APIs. Mostly used for Virtio-blk emulation emulation and host presentation as alternative to Nvme.
service FrontendVirtioBlkService {
Expand All @@ -34,9 +35,10 @@ service FrontendVirtioBlkService {
}
rpc UpdateVirtioBlk (UpdateVirtioBlkRequest) returns (VirtioBlk) {
option (google.api.http) = {
patch: "/v1/virtioblks"
body: "virtioblk"
patch: "/v1/{virtio_blk.name=subsystems}"
body: "virtio_blk"
};
option (google.api.method_signature) = "virtio_blk,update_mask";
}
rpc ListVirtioBlks (ListVirtioBlksRequest) returns (ListVirtioBlksResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -77,7 +79,9 @@ message DeleteVirtioBlkRequest {
}

message UpdateVirtioBlkRequest {
VirtioBlk controller = 1;
VirtioBlk virtio_blk = 1;
// The list of fields to update.
google.protobuf.FieldMask update_mask = 2;
}

message ListVirtioBlksRequest {
Expand Down
28 changes: 19 additions & 9 deletions storage/v1alpha1/frontend_virtio_scsi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import "google/api/resource.proto";
import "google/protobuf/empty.proto";
import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/field_mask.proto";

// Front End (host-facing) APIs. Mostly used for Virtio-scsi emulation and host presentation as alternative to Virtio-blk.
service FrontendVirtioScsiService {
Expand All @@ -34,9 +35,10 @@ service FrontendVirtioScsiService {
}
rpc UpdateVirtioScsiTarget (UpdateVirtioScsiTargetRequest) returns (VirtioScsiTarget) {
option (google.api.http) = {
patch: "/v1/virtioscsitargets"
body: "virtioscsitarget"
patch: "/v1/{virtio_scsi_target.name=subsystems}"
body: "virtio_scsi_target"
};
option (google.api.method_signature) = "virtio_scsi_target,update_mask";
}
rpc ListVirtioScsiTargets (ListVirtioScsiTargetsRequest) returns (ListVirtioScsiTargetsResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -66,9 +68,10 @@ service FrontendVirtioScsiService {
}
rpc UpdateVirtioScsiController (UpdateVirtioScsiControllerRequest) returns (VirtioScsiController) {
option (google.api.http) = {
patch: "/v1/virtioscsictrls"
body: "virtioscsictrl"
patch: "/v1/{virtio_scsi_controller.name=subsystems}"
body: "virtio_scsi_controller"
};
option (google.api.method_signature) = "virtio_scsi_controller,update_mask";
}
rpc ListVirtioScsiControllers (ListVirtioScsiControllersRequest) returns (ListVirtioScsiControllersResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -98,9 +101,10 @@ service FrontendVirtioScsiService {
}
rpc UpdateVirtioScsiLun (UpdateVirtioScsiLunRequest) returns (VirtioScsiLun) {
option (google.api.http) = {
patch: "/v1/virtioscsiluns"
body: "virtioscsilun"
patch: "/v1/{virtio_scsi_lun.name=subsystems}"
body: "virtio_scsi_lun"
};
option (google.api.method_signature) = "virtio_scsi_lun,update_mask";
}
rpc ListVirtioScsiLuns (ListVirtioScsiLunsRequest) returns (ListVirtioScsiLunsResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -153,7 +157,9 @@ message DeleteVirtioScsiTargetRequest {
}

message UpdateVirtioScsiTargetRequest {
VirtioScsiTarget target = 1;
VirtioScsiTarget virtio_scsi_target = 1;
// The list of fields to update.
google.protobuf.FieldMask update_mask = 2;
}

message ListVirtioScsiTargetsRequest {
Expand Down Expand Up @@ -198,7 +204,9 @@ message DeleteVirtioScsiControllerRequest {
}

message UpdateVirtioScsiControllerRequest {
VirtioScsiController controller = 1;
VirtioScsiController virtio_scsi_controller = 1;
// The list of fields to update.
google.protobuf.FieldMask update_mask = 2;
}

message ListVirtioScsiControllersRequest {
Expand Down Expand Up @@ -243,7 +251,9 @@ message DeleteVirtioScsiLunRequest {
}

message UpdateVirtioScsiLunRequest {
VirtioScsiLun lun = 1;
VirtioScsiLun virtio_scsi_lun = 1;
// The list of fields to update.
google.protobuf.FieldMask update_mask = 2;
}

message ListVirtioScsiLunsRequest {
Expand Down
10 changes: 7 additions & 3 deletions storage/v1alpha1/middleend.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import "google/api/resource.proto";
import "google/protobuf/empty.proto";
import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/field_mask.proto";

// Middle End (Storage Services) APIs. For example, encryption, compression, raid, QoS, multipath, ...
service MiddleendService {
Expand All @@ -35,9 +36,10 @@ service MiddleendService {
}
rpc UpdateEncryptedVolume (UpdateEncryptedVolumeRequest) returns (EncryptedVolume) {
option (google.api.http) = {
patch: "/v1/volumes"
body: "volume"
patch: "/v1/{encrypted_volume.name=subsystems}"
body: "encrypted_volume"
};
option (google.api.method_signature) = "encrypted_volume,update_mask";
}
rpc ListEncryptedVolumes (ListEncryptedVolumesRequest) returns (ListEncryptedVolumesResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -80,7 +82,9 @@ message DeleteEncryptedVolumeRequest {
}

message UpdateEncryptedVolumeRequest {
EncryptedVolume volume = 1;
EncryptedVolume encrypted_volume = 1;
// The list of fields to update.
google.protobuf.FieldMask update_mask = 2;
}

message ListEncryptedVolumesRequest {
Expand Down

0 comments on commit b14b925

Please sign in to comment.