From d76b331bd755b8581351f95c8498296ea8ed64e5 Mon Sep 17 00:00:00 2001 From: Todd Knight Date: Tue, 28 Apr 2020 13:55:57 -0700 Subject: [PATCH] Add the ignore result limit for host set request. --- internal/gen/controller.swagger.json | 10 +++++++++- .../gen/controller/api/host_set_service.pb.go | 16 ++++++++++++++-- .../gen/controller/api/resource/host_set.pb.go | 3 ++- .../controller/api/resource/v1/host_set.proto | 3 ++- .../controller/api/v1/host_set_service.proto | 3 +++ 5 files changed, 30 insertions(+), 5 deletions(-) diff --git a/internal/gen/controller.swagger.json b/internal/gen/controller.swagger.json index b9b36abb17..0c574d3b9f 100644 --- a/internal/gen/controller.swagger.json +++ b/internal/gen/controller.swagger.json @@ -248,6 +248,14 @@ "FULL" ], "default": "BASIC" + }, + { + "name": "ignore_result_limit", + "description": "Allows the full list of Hosts in this Host Set to be returned even if there are more than the system wide limit.", + "in": "query", + "required": false, + "type": "boolean", + "format": "boolean" } ], "tags": [ @@ -951,7 +959,7 @@ "items": { "$ref": "#/definitions/controller.api.resource.v1.Host" }, - "title": "A list of hosts in this host set.\nOutput only" + "title": "A list of hosts in this host set.\nTODO: Figure out if this should be in the basic HostSet view and what view to use on the Hosts.\nOutput only" } }, "description": "HostSets are a collection of sets created and managed by a catalog." diff --git a/internal/gen/controller/api/host_set_service.pb.go b/internal/gen/controller/api/host_set_service.pb.go index bf4ebea19b..08181c1bb0 100644 --- a/internal/gen/controller/api/host_set_service.pb.go +++ b/internal/gen/controller/api/host_set_service.pb.go @@ -45,6 +45,8 @@ type GetHostSetRequest struct { HostCatalogId string `protobuf:"bytes,3,opt,name=host_catalog_id,json=hostCatalogId,proto3" json:"host_catalog_id,omitempty"` Id string `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"` View view.View `protobuf:"varint,5,opt,name=view,proto3,enum=controller.api.view.v1.View" json:"view,omitempty"` + // Allows the full list of Hosts in this Host Set to be returned even if there are more than the system wide limit. + IgnoreResultLimit bool `protobuf:"varint,6,opt,name=ignore_result_limit,json=ignoreResultLimit,proto3" json:"ignore_result_limit,omitempty"` } func (x *GetHostSetRequest) Reset() { @@ -114,6 +116,13 @@ func (x *GetHostSetRequest) GetView() view.View { return view.View_BASIC } +func (x *GetHostSetRequest) GetIgnoreResultLimit() bool { + if x != nil { + return x.IgnoreResultLimit + } + return false +} + type GetHostSetResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -925,7 +934,7 @@ var file_controller_api_v1_host_set_service_proto_rawDesc = []byte{ 0x76, 0x31, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x65, 0x77, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x69, 0x65, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xae, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, + 0x22, 0xde, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x72, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x72, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, @@ -936,7 +945,10 @@ var file_controller_api_v1_host_set_service_proto_rawDesc = []byte{ 0x30, 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x69, 0x65, 0x77, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x52, 0x04, 0x76, 0x69, 0x65, - 0x77, 0x22, 0x4d, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, + 0x77, 0x12, 0x2e, 0x0a, 0x13, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, + 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x22, 0x4d, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, diff --git a/internal/gen/controller/api/resource/host_set.pb.go b/internal/gen/controller/api/resource/host_set.pb.go index 6a3646a800..392d52a34a 100644 --- a/internal/gen/controller/api/resource/host_set.pb.go +++ b/internal/gen/controller/api/resource/host_set.pb.go @@ -47,7 +47,8 @@ type HostSet struct { // The total count of hosts in this host set // Output only Size *wrappers.Int32Value `protobuf:"bytes,6,opt,name=size,proto3" json:"size,omitempty"` - // A list of hosts in this host set. + // A list of hosts in this host set. + // TODO: Figure out if this should be in the basic HostSet view and what view to use on the Hosts. // Output only Hosts []*Host `protobuf:"bytes,7,rep,name=hosts,proto3" json:"hosts,omitempty"` } diff --git a/internal/proto/local/controller/api/resource/v1/host_set.proto b/internal/proto/local/controller/api/resource/v1/host_set.proto index 37632292d5..9f6ab7cd6e 100644 --- a/internal/proto/local/controller/api/resource/v1/host_set.proto +++ b/internal/proto/local/controller/api/resource/v1/host_set.proto @@ -28,7 +28,8 @@ message HostSet { // Output only google.protobuf.Int32Value size = 6; - // A list of hosts in this host set. + // A list of hosts in this host set. + // TODO: Figure out if this should be in the basic HostSet view and what view to use on the Hosts. // Output only repeated Host hosts = 7; } diff --git a/internal/proto/local/controller/api/v1/host_set_service.proto b/internal/proto/local/controller/api/v1/host_set_service.proto index fa98ec9bc6..fdf4954753 100644 --- a/internal/proto/local/controller/api/v1/host_set_service.proto +++ b/internal/proto/local/controller/api/v1/host_set_service.proto @@ -96,6 +96,9 @@ message GetHostSetRequest { string host_catalog_id = 3; string id = 4; api.view.v1.View view = 5; + + // Allows the full list of Hosts in this Host Set to be returned even if there are more than the system wide limit. + bool ignore_result_limit = 6; } message GetHostSetResponse {