Remove Prefix Id and Plugin Name fields (#1563)

* Remove Prefix Id and Plugin Name fields.  Creating catalogs now require either the plugin id or the name of the plugin resource (but not both).  Host Catalogs and Host Sets API resources now have a read only plugin field populated with plugin info.  Host Catalogs have a plugin id field as a top level field.
This commit is contained in:
Todd authored and GitHub committed 2021-09-24 13:16:13 -07:00
1 parent e4e788553f
commit a4ea99047f
51 files changed
+1314 -1052

No files matched your search

@@ -8,6 +8,7 @@ import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
import "google/protobuf/struct.proto";
import "controller/api/resources/scopes/v1/scope.proto";
import "controller/api/resources/plugins/v1/plugin.proto";
import "controller/custom_options/v1/options.proto";
// HostCatalog manages Hosts and Host Sets
@@ -21,6 +22,12 @@ message HostCatalog {
// Output only. Scope information for this resource.
resources.scopes.v1.ScopeInfo scope = 30;
// The ID of the plugin of which this catalog is created.
string plugin_id = 34 [json_name="plugin_id"];
// Output only. Plugin information for this resource.
resources.plugins.v1.PluginInfo plugin = 35;
// Optional name for identification purposes.
google.protobuf.StringValue name = 40 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
@@ -8,6 +8,7 @@ import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
import "controller/api/resources/scopes/v1/scope.proto";
import "controller/api/resources/plugins/v1/plugin.proto";
import "controller/custom_options/v1/options.proto";
// Host contains all fields related to a Host resource
@@ -21,6 +22,9 @@ message Host {
// Output only. Scope information for this resource.
resources.scopes.v1.ScopeInfo scope = 30;
// Output only. Plugin information for this resource.
resources.plugins.v1.PluginInfo plugin = 35;
// Optional name for identification purposes.
google.protobuf.StringValue name = 40 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
@@ -8,6 +8,7 @@ import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
import "controller/api/resources/scopes/v1/scope.proto";
import "controller/api/resources/plugins/v1/plugin.proto";
import "controller/custom_options/v1/options.proto";
// HostSet is a collection of Hosts created and managed by a Host Catalog
@@ -21,6 +22,9 @@ message HostSet {
// Output only. Scope information for this resource.
resources.scopes.v1.ScopeInfo scope = 30;
// Output only. Plugin information for this resource.
resources.plugins.v1.PluginInfo plugin = 35;
// Optional name for identification purposes.
google.protobuf.StringValue name = 40 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
@@ -0,0 +1,16 @@
syntax = "proto3";
package controller.api.resources.plugins.v1;
option go_package = "github.com/hashicorp/boundary/sdk/pbs/controller/api/resources/plugins;plugins";
message PluginInfo {
// Output only. The ID of the Plugin.
string id = 1;
// Output only. The name of the plugin resource in boundary, if any.
string name = 2;
// Output only. The description of the plugin in boundary, if any.
string description = 3;
}
@@ -103,6 +103,9 @@ message ListHostCatalogsResponse {
message CreateHostCatalogRequest {
api.resources.hostcatalogs.v1.HostCatalog item = 1;
// As an alternative to providing the plugin id in the provided HostCatalog,
// this field can be used to lookup the plugin using it's name.
string plugin_name = 2;
}
message CreateHostCatalogResponse {