Static Catalog Api definition (#12)
* Setup buf to see and process protos correctly. This commit adds a proposed directory structure for protos. Included is a rough draft of the Ec2Catalog protos. * Add host and host_catalog service apis. This also has for the first time the move away from holding individual ids for resources and instead using the full uri path as the api facing identifier. There are some issues with the swagger generation stripping out the format of the path matching so currently only PATCH uses the approach I would like to move to. In follow up commits I'll try to either get swagger to display the correct expected paths or I'll resolve if that is even needed by our clients. * Move all protos and generated files to under the internal directory. This also required updating the buf config to explicitly name the exluded linted proto files under oplog since previously /internal/ was listed as a root in buf. Future commit will move oplog proto files to be with the others. * Moved oplog related protos to under the proto directory and regenerated. * Update the oplog protos to be compliant with buf lint. * Clean up comments in tools. * Merged in recent changes to oplog protos. * Add resource result messages to contain the read only fields and separate them from the writable fields. * Merge the ec2 catalog resources in with the more generic host_catalog resource. * Cleaning the generated swagger. This included adding summaries for each proto rpc method, Making the resources be the full fqn, removing the default error, and a few other tweaks. * Make project plural in the paths. * Adding the ability to add and remove hosts from a host set. * Add the ignore result limit for host set request. * Make size and host lists read only. * Add documentation about what host references are allowed to be added. * Remove ignore result limit when listing items. These can be added in later. * Add handlers and tests for unimplemented services. * Add bootstrap target and update how tools are built (#13) * Update tool installation method, add bootstrap target to makefile * Changing org to orgs in all paths and org param to org_id. * Adding tests for unimplemented service implementations. Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
This commit is contained in:
1 parent
4d86db6ba5
commit
c7126ae69b
32 files changed
+10935
-29
No files matched your search
@@ -0,0 +1,28 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package controller.api.resource.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/watchtower/internal/gen/controller/api/resource;resource";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
|
||||
// Host contains all fields related to a Host resource.
|
||||
message Host {
|
||||
// Output only.
|
||||
string uri = 1;
|
||||
google.protobuf.StringValue friendly_name = 2;
|
||||
|
||||
// The time this host was created.
|
||||
// Output only.
|
||||
google.protobuf.Timestamp created_time = 3;
|
||||
// The time this host was last updated.
|
||||
// Output only.
|
||||
google.protobuf.Timestamp updated_time = 4;
|
||||
|
||||
// Marks the host as disabled. Default is false.
|
||||
google.protobuf.BoolValue disabled = 5;
|
||||
|
||||
// This field is required.
|
||||
google.protobuf.StringValue address = 6;
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package controller.api.resource.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/watchtower/internal/gen/controller/api/resource;resource";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
|
||||
|
||||
enum HostCatalogType {
|
||||
HOST_CATALOG_TYPE_UNSPECIFIED = 0;
|
||||
HOST_CATALOG_TYPE_EC2 = 1;
|
||||
HOST_CATALOG_TYPE_STATIC = 2;
|
||||
}
|
||||
|
||||
// HostCatalog organizes Hosts into HostSets.
|
||||
message HostCatalog {
|
||||
// Output only.
|
||||
string uri = 1;
|
||||
google.protobuf.StringValue friendly_name = 2;
|
||||
|
||||
// The time this host_catalog was created.
|
||||
// Output only.
|
||||
google.protobuf.Timestamp created_time = 3;
|
||||
// The time this host_catalog was last updated.
|
||||
// Output only.
|
||||
google.protobuf.Timestamp updated_time = 4;
|
||||
|
||||
// Marks the host_catalog as disabled. Default is false.
|
||||
google.protobuf.BoolValue disabled = 5;
|
||||
|
||||
oneof type_details {
|
||||
StaticCatalogDetails static_host_catalog_details = 6;
|
||||
Ec2CatalogDetails ec2_host_catalog_details = 7;
|
||||
}
|
||||
|
||||
HostCatalogType type = 8;
|
||||
// TODO: Figure out how to provide relevant information regarding Host and Set lists on a catalog.
|
||||
}
|
||||
|
||||
message StaticCatalogDetails {
|
||||
// nothing here yet.
|
||||
}
|
||||
|
||||
message Ec2CatalogDetails {
|
||||
// The AWS regions from which this catalog will retrieve the EC2 instances.
|
||||
repeated string regions = 1;
|
||||
|
||||
// The access key used for authenticating with AWS when retrieving EC2 instance details.
|
||||
google.protobuf.StringValue access_key = 2;
|
||||
// Input only.
|
||||
google.protobuf.StringValue secret_key = 3;
|
||||
|
||||
// This value will never be returned in a response.
|
||||
google.protobuf.BoolValue rotate = 4;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package controller.api.resource.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/watchtower/internal/gen/controller/api/resource;resource";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "controller/api/resource/v1/host.proto";
|
||||
|
||||
// HostSets are a collection of sets created and managed by a catalog.
|
||||
message HostSet {
|
||||
// Output only.
|
||||
string uri = 1;
|
||||
google.protobuf.StringValue friendly_name = 2;
|
||||
|
||||
// The time this host_set was created.
|
||||
// Output only.
|
||||
google.protobuf.Timestamp created_time = 3;
|
||||
// The time this host_set was last updated.
|
||||
// Output only.
|
||||
google.protobuf.Timestamp updated_time = 4;
|
||||
|
||||
// Marks the host_set as disabled. Default is false.
|
||||
google.protobuf.BoolValue disabled = 5;
|
||||
|
||||
// The total count of hosts in this host set
|
||||
// Output only.
|
||||
google.protobuf.Int32Value size = 6;
|
||||
|
||||
// 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;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package controller.api.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/watchtower/internal/gen/controller/api;api";
|
||||
|
||||
message ErrorDetails {
|
||||
string trace_id = 1;
|
||||
string request_id = 2;
|
||||
repeated string request_fields = 3;
|
||||
}
|
||||
|
||||
// Error is returned by the JSON API when an error occurs.
|
||||
message Error {
|
||||
// The HTTP Status code applicable to this error.
|
||||
int32 status = 1;
|
||||
// An application-specific error string.
|
||||
string code = 2;
|
||||
// A human readable explanation specific to this occurrence of the error.
|
||||
string message = 3;
|
||||
// Additional metadata regarding the error. Depending on the error different fields will be populated.
|
||||
ErrorDetails details = 4;
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package controller.api.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/watchtower/internal/gen/controller/api;api";
|
||||
|
||||
import "protoc-gen-swagger/options/annotations.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "controller/api/resource/v1/host_catalog.proto";
|
||||
import "controller/api/view/v1/view.proto";
|
||||
|
||||
service HostCatalogService {
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_tag) = {
|
||||
description: "The host catalog service allows you to get/mutate Host catalogs of every type."
|
||||
};
|
||||
|
||||
// This retrieves the host catalog specified in the request using the basic view.
|
||||
rpc GetHostCatalog(GetHostCatalogRequest) returns (GetHostCatalogResponse) {
|
||||
// Gets the host as specified int he url.
|
||||
option (google.api.http) = {
|
||||
get: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{id}"
|
||||
response_body: "item"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = {
|
||||
summary: "Gets a single HostCatalog"
|
||||
description: "Get's a single Host Catalog with the provided identifier."
|
||||
};
|
||||
}
|
||||
rpc ListHostCatalogs(ListHostCatalogsRequest) returns (ListHostCatalogsResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = {
|
||||
summary: "Gets a list of HostCatalogs"
|
||||
};
|
||||
}
|
||||
rpc CreateHostCatalog(CreateHostCatalogRequest) returns (CreateHostCatalogResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs"
|
||||
body: "item"
|
||||
response_body: "item"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = {
|
||||
summary: "Creates a HostCatalog"
|
||||
description: "Creates a single host catalog under the specified org and project"
|
||||
};
|
||||
}
|
||||
rpc UpdateHostCatalog(UpdateHostCatalogRequest) returns (UpdateHostCatalogResponse) {
|
||||
option (google.api.http) = {
|
||||
patch: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{id}"
|
||||
body: "item"
|
||||
response_body: "item"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = {
|
||||
summary: "Updates a HostCatalog"
|
||||
};
|
||||
}
|
||||
// Deleting a HostCatalog removes all hosts and host sets associated with this Catalog.
|
||||
rpc DeleteHostCatalog(DeleteHostCatalogRequest) returns (DeleteHostCatalogResponse) {
|
||||
option (google.api.http) = {
|
||||
delete: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{id}"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = {
|
||||
summary: "Deletes a HostCatalog"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
message GetHostCatalogRequest {
|
||||
string org_id = 1;
|
||||
string project_id = 2;
|
||||
string id = 3;
|
||||
api.view.v1.View view = 4;
|
||||
}
|
||||
|
||||
message GetHostCatalogResponse {
|
||||
api.resource.v1.HostCatalog item = 1;
|
||||
}
|
||||
|
||||
message ListHostCatalogsRequest {
|
||||
string org_id = 1;
|
||||
string project_id = 2;
|
||||
|
||||
api.view.v1.View view = 3;
|
||||
}
|
||||
|
||||
message ListHostCatalogsResponse {
|
||||
repeated api.resource.v1.HostCatalog items = 1;
|
||||
}
|
||||
|
||||
message CreateHostCatalogRequest {
|
||||
string org_id = 1;
|
||||
string project_id = 2;
|
||||
api.resource.v1.HostCatalog item = 3;
|
||||
}
|
||||
|
||||
message CreateHostCatalogResponse {
|
||||
string uri = 1;
|
||||
api.resource.v1.HostCatalog item = 2;
|
||||
}
|
||||
|
||||
message UpdateHostCatalogRequest {
|
||||
string org_id = 1;
|
||||
string project_id = 2;
|
||||
string id = 3;
|
||||
api.resource.v1.HostCatalog item = 4;
|
||||
google.protobuf.FieldMask update_mask = 5;
|
||||
}
|
||||
|
||||
message UpdateHostCatalogResponse {
|
||||
api.resource.v1.HostCatalog item = 1;
|
||||
}
|
||||
|
||||
message DeleteHostCatalogRequest {
|
||||
string org_id = 1;
|
||||
string project_id = 2;
|
||||
string id = 3;
|
||||
}
|
||||
|
||||
message DeleteHostCatalogResponse {
|
||||
bool existed = 1;
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package controller.api.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/watchtower/internal/gen/controller/api;api";
|
||||
|
||||
import "protoc-gen-swagger/options/annotations.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "controller/api/resource/v1/host.proto";
|
||||
import "controller/api/view/v1/view.proto";
|
||||
|
||||
service HostService {
|
||||
// This retrieves the host specified in the request using the basic view.
|
||||
rpc GetHost(GetHostRequest) returns (GetHostResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/hosts/{id}"
|
||||
response_body: "item"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = {
|
||||
summary: "Gets a single Host"
|
||||
};
|
||||
}
|
||||
rpc ListHosts(ListHostsRequest) returns (ListHostsResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/hosts"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = {
|
||||
summary: "List all Hosts for the specified catalog"
|
||||
};
|
||||
}
|
||||
rpc CreateHost(CreateHostRequest) returns (CreateHostResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/hosts"
|
||||
body: "item"
|
||||
response_body: "item"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = {
|
||||
summary: "Create a single Host"
|
||||
};
|
||||
}
|
||||
rpc UpdateHost(UpdateHostRequest) returns (UpdateHostResponse) {
|
||||
option (google.api.http) = {
|
||||
patch: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/hosts/{id}"
|
||||
body: "item"
|
||||
response_body: "item"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = {
|
||||
summary: "Update a Host"
|
||||
};
|
||||
}
|
||||
rpc DeleteHost(DeleteHostRequest) returns (DeleteHostResponse) {
|
||||
option (google.api.http) = {
|
||||
delete: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/hosts/{id}"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = {
|
||||
summary: "Delete a Host"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
message GetHostRequest {
|
||||
string org_id = 1;
|
||||
string project_id = 2;
|
||||
string host_catalog_id = 3;
|
||||
string id = 4;
|
||||
api.view.v1.View view = 5;
|
||||
}
|
||||
|
||||
message GetHostResponse {
|
||||
api.resource.v1.Host item = 1;
|
||||
}
|
||||
|
||||
message ListHostsRequest {
|
||||
string org_id = 1;
|
||||
string project_id = 2;
|
||||
string host_catalog_id = 3;
|
||||
|
||||
api.view.v1.View view = 4;
|
||||
}
|
||||
|
||||
message ListHostsResponse {
|
||||
repeated api.resource.v1.Host items = 1;
|
||||
}
|
||||
|
||||
message CreateHostRequest {
|
||||
string org_id = 1;
|
||||
string project_id = 2;
|
||||
string host_catalog_id = 3;
|
||||
api.resource.v1.Host item = 4;
|
||||
}
|
||||
|
||||
message CreateHostResponse {
|
||||
string ref = 1;
|
||||
api.resource.v1.Host item = 2;
|
||||
}
|
||||
|
||||
message UpdateHostRequest {
|
||||
string org_id = 1;
|
||||
string project_id = 2;
|
||||
string host_catalog_id = 3;
|
||||
string id = 4;
|
||||
api.resource.v1.Host item = 5;
|
||||
google.protobuf.FieldMask update_mask = 6;
|
||||
}
|
||||
|
||||
message UpdateHostResponse {
|
||||
api.resource.v1.Host item = 1;
|
||||
}
|
||||
|
||||
message DeleteHostRequest {
|
||||
string org_id = 1;
|
||||
string project_id = 2;
|
||||
string host_catalog_id = 3;
|
||||
string id = 4;
|
||||
}
|
||||
|
||||
message DeleteHostResponse {
|
||||
bool existed = 1;
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package controller.api.v1;
|
||||
|
||||
option go_package = "github.com/hashicorp/watchtower/internal/gen/controller/api;api";
|
||||
|
||||
import "protoc-gen-swagger/options/annotations.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "controller/api/resource/v1/host_set.proto";
|
||||
import "controller/api/resource/v1/host.proto";
|
||||
import "controller/api/view/v1/view.proto";
|
||||
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = {
|
||||
info: {
|
||||
title: "Controller API"
|
||||
version: "0.0.1"
|
||||
description: "API for managing resources associated with Controllers."
|
||||
}
|
||||
schemes: HTTPS
|
||||
schemes: HTTP
|
||||
};
|
||||
|
||||
service HostSetService {
|
||||
// This retrieves the host set specified in the request using the basic view.
|
||||
rpc GetHostSet(GetHostSetRequest) returns (GetHostSetResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/host-sets/{id}"
|
||||
response_body: "item"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = {
|
||||
summary: "Get a single HostSet"
|
||||
};
|
||||
}
|
||||
rpc ListHostSets(ListHostSetsRequest) returns (ListHostSetsResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/host-sets"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = {
|
||||
summary: "List all HostSets under the specific catalog"
|
||||
};
|
||||
}
|
||||
rpc CreateHostSet(CreateHostSetRequest) returns (CreateHostSetResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/host-sets"
|
||||
body: "item"
|
||||
response_body: "item"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = {
|
||||
summary: "Create a HostSet"
|
||||
};
|
||||
}
|
||||
rpc UpdateHostSet(UpdateHostSetRequest) returns (UpdateHostSetResponse) {
|
||||
option (google.api.http) = {
|
||||
patch: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/host-sets/{id}"
|
||||
body: "item"
|
||||
response_body: "item"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = {
|
||||
summary: "Update a HostSet"
|
||||
};
|
||||
}
|
||||
rpc DeleteHostSet(DeleteHostSetRequest) returns (DeleteHostSetResponse) {
|
||||
option (google.api.http) = {
|
||||
delete: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/host-sets/{id}"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = {
|
||||
summary: "Delete a HostSet"
|
||||
};
|
||||
}
|
||||
|
||||
rpc AddToHostSet(AddToHostSetRequest) returns (AddToHostSetResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/host-sets/{id}:add-hosts"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = {
|
||||
summary: "Adds existing Hosts to the Host Set"
|
||||
description: "Adds the hosts to this Host Set if possible. All hosts added must be a child of the same host catalog this host set is a child of."
|
||||
};
|
||||
}
|
||||
|
||||
rpc RemoveFromHostSet(RemoveFromHostSetRequest) returns (RemoveFromHostSetResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/host-sets/{id}:remove-hosts"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = {
|
||||
summary: "Removes Hosts to the Host Set"
|
||||
description: "Removes the hosts from this Host Set if present. If it is not present then no action is taken and no error is returned."
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
message GetHostSetRequest {
|
||||
string org_id = 1;
|
||||
string project_id = 2;
|
||||
string host_catalog_id = 3;
|
||||
string id = 4;
|
||||
api.view.v1.View view = 5;
|
||||
}
|
||||
|
||||
message GetHostSetResponse {
|
||||
api.resource.v1.HostSet item = 1;
|
||||
}
|
||||
|
||||
message ListHostSetsRequest {
|
||||
string org_id = 1;
|
||||
string project_id = 2;
|
||||
string host_catalog_id = 3;
|
||||
api.view.v1.View view = 4;
|
||||
}
|
||||
|
||||
message ListHostSetsResponse {
|
||||
repeated api.resource.v1.HostSet items = 1;
|
||||
}
|
||||
|
||||
message CreateHostSetRequest {
|
||||
string org_id = 1;
|
||||
string project_id = 2;
|
||||
string host_catalog_id = 3;
|
||||
api.resource.v1.HostSet item = 4;
|
||||
}
|
||||
|
||||
message CreateHostSetResponse {
|
||||
string uri = 1;
|
||||
api.resource.v1.HostSet item = 2;
|
||||
}
|
||||
|
||||
message UpdateHostSetRequest {
|
||||
string org_id = 1;
|
||||
string project_id = 2;
|
||||
string host_catalog_id = 3;
|
||||
string id = 4;
|
||||
api.resource.v1.HostSet item = 5;
|
||||
google.protobuf.FieldMask update_mask = 6;
|
||||
}
|
||||
|
||||
message UpdateHostSetResponse {
|
||||
api.resource.v1.HostSet item = 1;
|
||||
}
|
||||
|
||||
message DeleteHostSetRequest {
|
||||
string org_id = 1;
|
||||
string project_id =2;
|
||||
string host_catalog_id = 3;
|
||||
string id = 4;
|
||||
}
|
||||
|
||||
message DeleteHostSetResponse {
|
||||
bool existed = 1;
|
||||
}
|
||||
|
||||
message AddToHostSetRequest {
|
||||
string org_id = 1;
|
||||
string project_id =2;
|
||||
string host_catalog_id = 3;
|
||||
string id = 4;
|
||||
|
||||
// A list of host uris which will be added to this host set. Each host referenced here must be a child of the
|
||||
// same host catalog that this host set is a child of.
|
||||
repeated string host_uris = 5;
|
||||
}
|
||||
|
||||
message AddToHostSetResponse {
|
||||
}
|
||||
|
||||
message RemoveFromHostSetRequest {
|
||||
string org_id = 1;
|
||||
string project_id =2;
|
||||
string host_catalog_id = 3;
|
||||
// This host set's id.
|
||||
string id = 4;
|
||||
|
||||
// A list of host uris which should not be in the host set when this request returns.
|
||||
repeated string host_uris = 5;
|
||||
}
|
||||
|
||||
message RemoveFromHostSetResponse {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package controller.api.view.v1;
|
||||
option go_package = "github.com/hashicorp/watchtower/internal/gen/controller/api/view;view";
|
||||
|
||||
// Note: This does not follow any of the good proto practices of using enums (allowing 0 represent unspecified, etc.)
|
||||
// This is designed this way in order to generate cleaner and easier to understand swagger.
|
||||
|
||||
enum View {
|
||||
BASIC = 0;
|
||||
FULL = 1;
|
||||
}
|
||||
Reference in new issue
Block a user