diff --git a/api/client.go b/api/client.go index 90abb7054..041649f93 100644 --- a/api/client.go +++ b/api/client.go @@ -25,7 +25,7 @@ import ( "golang.org/x/time/rate" ) -const EnvWatchtowerAddress = "WATCHTOWER_ADDR" +const EnvWatchtowerAddr = "WATCHTOWER_ADDR" const EnvWatchtowerCACert = "WATCHTOWER_CACERT" const EnvWatchtowerCAPath = "WATCHTOWER_CAPATH" const EnvWatchtowerClientCert = "WATCHTOWER_CLIENT_CERT" @@ -42,11 +42,11 @@ const EnvWatchtowerProject = "WATCHTOWER_PROJECT" // Config is used to configure the creation of the client type Config struct { - // Address is the address of the Watchtower controller. This should be a + // Addr is the address of the Watchtower controller. This should be a // complete URL such as "http://watchtower.example.com". If you need a custom // SSL cert or want to enable insecure mode, you need to specify a custom // HttpClient. - Address string + Addr string // Token is the client token that reuslts from authentication and can be // used to make calls into Watchtower @@ -133,13 +133,13 @@ type TLSConfig struct { // DefaultConfig returns a default configuration for the client. It is // safe to modify the return value of this function. // -// The default Address is https://127.0.0.1:9200, but this can be overridden by +// The default Addr is https://127.0.0.1:9200, but this can be overridden by // setting the `WATCHTOWER_ADDR` environment variable. // // If an error is encountered, this will return nil. func DefaultConfig() (*Config, error) { config := &Config{ - Address: "https://127.0.0.1:9200", + Addr: "https://127.0.0.1:9200", HttpClient: cleanhttp.DefaultPooledClient(), Timeout: time.Second * 60, } @@ -223,12 +223,12 @@ func (c *Config) ConfigureTLS() error { // // This also removes any trailing "/v1"; we'll use that in our commands so we // don't require it from users. -func (c *Config) setAddress(addr string) error { +func (c *Config) setAddr(addr string) error { u, err := url.Parse(addr) if err != nil { return fmt.Errorf("error parsing address: %w", err) } - c.Address = fmt.Sprintf("%s://%s", u.Scheme, u.Host) + c.Addr = fmt.Sprintf("%s://%s", u.Scheme, u.Host) path := strings.TrimPrefix(u.Path, "/v1") path = strings.TrimPrefix(path, "/") @@ -271,8 +271,8 @@ func (c *Config) ReadEnvironment() error { var envServerName string // Parse the environment variables - if v := os.Getenv(EnvWatchtowerAddress); v != "" { - c.Address = v + if v := os.Getenv(EnvWatchtowerAddr); v != "" { + c.Addr = v } if v := os.Getenv(EnvWatchtowerToken); v != "" { @@ -423,8 +423,8 @@ func NewClient(c *Config) (*Client, error) { } } - if c.Address != "" { - if err := c.setAddress(c.Address); err != nil { + if c.Addr != "" { + if err := c.setAddr(c.Addr); err != nil { return nil, err } } @@ -437,11 +437,11 @@ func NewClient(c *Config) (*Client, error) { // Sets the address of Watchtower in the client. The format of address should // be "://:". Setting this on a client will override the // value of the WATCHTOWER_ADDR environment variable. -func (c *Client) SetAddress(addr string) error { +func (c *Client) SetAddr(addr string) error { c.modifyLock.Lock() defer c.modifyLock.Unlock() - return c.config.setAddress(addr) + return c.config.setAddr(addr) } // SetOrg sets the organization the client will use by default @@ -550,7 +550,7 @@ func (c *Client) Clone() (*Client, error) { config := c.config newConfig := &Config{ - Address: config.Address, + Addr: config.Addr, Token: config.Token, HttpClient: config.HttpClient, Headers: make(http.Header), @@ -626,7 +626,7 @@ func (c *Client) NewRequest(ctx context.Context, method, requestPath string, bod } c.modifyLock.RLock() - addr := c.config.Address + addr := c.config.Addr org := c.config.Org project := c.config.Project srvLookup := c.config.SRVLookup diff --git a/api/hosts/host.go b/api/hosts/host.go index f696be3d6..c4723208e 100644 --- a/api/hosts/host.go +++ b/api/hosts/host.go @@ -21,8 +21,10 @@ type Host struct { Id *string `json:"id,omitempty"` // The type of the resource, to help differentiate schemas Type *string `json:"type,omitempty"` - // Friendly name, if set - FriendlyName *string `json:"friendly_name,omitempty"` + // Optional name for identification purposes + Name *string `json:"name,omitempty"` + // Optional user-set description for identification purposes + Description *string `json:"description,omitempty"` // The time this host was created // Ouput only. CreatedTime time.Time `json:"created_time,omitempty"` diff --git a/api/hosts/host_catalog.go b/api/hosts/host_catalog.go index 278e3d1dc..39fd70bd8 100644 --- a/api/hosts/host_catalog.go +++ b/api/hosts/host_catalog.go @@ -21,8 +21,10 @@ type HostCatalog struct { Id *string `json:"id,omitempty"` // The type of the resource, to help differentiate schemas Type *string `json:"type,omitempty"` - // Friendly name, if set - FriendlyName *string `json:"friendly_name,omitempty"` + // Optional name for identification purposes + Name *string `json:"name,omitempty"` + // Optional user-set description for identification purposes + Description *string `json:"description,omitempty"` // The time this host was created // Output only. CreatedTime time.Time `json:"created_time,omitempty"` diff --git a/api/hosts/host_set.go b/api/hosts/host_set.go index b6c7127ae..0114bad2c 100644 --- a/api/hosts/host_set.go +++ b/api/hosts/host_set.go @@ -21,8 +21,10 @@ type HostSet struct { Id *string `json:"id,omitempty"` // The type of the resource, to help differentiate schemas Type *string `json:"type,omitempty"` - // Friendly name, if set - FriendlyName *string `json:"friendly_name,omitempty"` + // Optional name for identification purposes + Name *string `json:"name,omitempty"` + // Optional user-set description for identification purposes + Description *string `json:"description,omitempty"` // The time this host was created // Output only. CreatedTime time.Time `json:"created_time,omitempty"` diff --git a/internal/cmd/base/base.go b/internal/cmd/base/base.go index f1ab85b7f..d43791aeb 100644 --- a/internal/cmd/base/base.go +++ b/internal/cmd/base/base.go @@ -38,7 +38,7 @@ type Command struct { flags *FlagSets flagsOnce sync.Once - flagAddress string + flagAddr string flagOrg string flagProject string @@ -78,8 +78,8 @@ func (c *Command) Client() (*api.Client, error) { return nil, err } - if c.flagAddress != NotSetValue { - c.client.SetAddress(c.flagAddress) + if c.flagAddr != NotSetValue { + c.client.SetAddr(c.flagAddr) } if c.flagOrg != NotSetValue { c.client.SetOrg(c.flagOrg) @@ -154,12 +154,12 @@ func (c *Command) FlagSet(bit FlagSetBit) *FlagSets { f := set.NewFlagSet("Connection Options") f.StringVar(&StringVar{ - Name: FlagNameAddress, - Target: &c.flagAddress, + Name: FlagNameAddr, + Target: &c.flagAddr, Default: NotSetValue, - EnvVar: api.EnvWatchtowerAddress, + EnvVar: api.EnvWatchtowerAddr, Completion: complete.PredictAnything, - Usage: "Address of the Watchtower controller.", + Usage: "Addr of the Watchtower controller, as a complete URL (e.g. https://watchtower.example.com:9200).", }) f.StringVar(&StringVar{ diff --git a/internal/cmd/base/const.go b/internal/cmd/base/const.go index 621202ea9..3b0a9f42e 100644 --- a/internal/cmd/base/const.go +++ b/internal/cmd/base/const.go @@ -1,9 +1,9 @@ package base const ( - // FlagNameAddress is the flag used in the base command to read in the + // FlagNameAddr is the flag used in the base command to read in the // address of the Watchtower server. - FlagNameAddress = "address" + FlagNameAddr = "addr" // FlagNameOrg is the flag used in the base command to read in the org in // which to make a request. FlagNameOrg = "org" diff --git a/internal/cmd/commands/hosts/host_create.go b/internal/cmd/commands/hosts/host_create.go index 3dcb67a01..e69653325 100644 --- a/internal/cmd/commands/hosts/host_create.go +++ b/internal/cmd/commands/hosts/host_create.go @@ -18,9 +18,10 @@ var _ cli.CommandAutocomplete = (*CreateCommand)(nil) type CreateCommand struct { *base.Command - flagHost string - flagName string - flagCatalog string + flagAddress string + flagName string + flagCatalog string + flagDescription string } func (c *CreateCommand) Synopsis() string { @@ -36,7 +37,7 @@ Usage: watchtower hosts create Example: - $ watchtower hosts create -catalog= -host= -name= + $ watchtower hosts create -catalog= -address= -name= ` + c.Flags().Help() @@ -49,8 +50,8 @@ func (c *CreateCommand) Flags() *base.FlagSets { f := set.NewFlagSet("Command Options") f.StringVar(&base.StringVar{ - Name: "host", - Target: &c.flagHost, + Name: "address", + Target: &c.flagAddress, Completion: complete.PredictAnything, Usage: "The host's address; can be an IP address or DNS name", }) @@ -59,7 +60,7 @@ func (c *CreateCommand) Flags() *base.FlagSets { Name: "name", Target: &c.flagName, Completion: complete.PredictAnything, - Usage: "A friendly name for the host for display purposes", + Usage: "An optional name assigned to the host for display purposes", }) f.StringVar(&base.StringVar{ @@ -69,6 +70,13 @@ func (c *CreateCommand) Flags() *base.FlagSets { Usage: "The ID of the host catalog in which the host should be created", }) + f.StringVar(&base.StringVar{ + Name: "description", + Target: &c.flagDescription, + Completion: complete.PredictNothing, + Usage: "The ID of the host catalog in which the host should be created", + }) + return set } @@ -92,8 +100,8 @@ func (c *CreateCommand) Run(args []string) int { case c.flagCatalog == "": c.UI.Error("Catalog ID must be provided via -catalog") return 1 - case c.flagHost == "": - c.UI.Error("Host address must be provided via -host") + case c.flagAddress == "": + c.UI.Error("Host address must be provided via -address") return 1 } @@ -109,8 +117,9 @@ func (c *CreateCommand) Run(args []string) int { } host := &hosts.Host{ - FriendlyName: api.StringOrNil(c.flagName), - Address: api.String(c.flagHost), + Address: api.String(c.flagAddress), + Name: api.StringOrNil(c.flagName), + Description: api.StringOrNil(c.flagDescription), } var apiErr *api.Error diff --git a/internal/gen/controller.swagger.json b/internal/gen/controller.swagger.json index a9bec4a97..c9f474dd8 100644 --- a/internal/gen/controller.swagger.json +++ b/internal/gen/controller.swagger.json @@ -766,9 +766,13 @@ "type": "string", "title": "The type of the resource, to help differentiate schemas" }, - "friendly_name": { + "name": { "type": "string", - "title": "Friendly name, if set" + "title": "Optional name for identification purposes" + }, + "description": { + "type": "string", + "title": "Optional user-set description for identification purposes" }, "created_time": { "type": "string", @@ -805,9 +809,13 @@ "type": "string", "title": "The type of the resource, to help differentiate schemas" }, - "friendly_name": { + "name": { "type": "string", - "title": "Friendly name, if set" + "title": "Optional name for identification purposes" + }, + "description": { + "type": "string", + "title": "Optional user-set description for identification purposes" }, "created_time": { "type": "string", @@ -845,9 +853,13 @@ "type": "string", "title": "The type of the resource, to help differentiate schemas" }, - "friendly_name": { + "name": { "type": "string", - "title": "Friendly name, if set" + "title": "Optional name for identification purposes" + }, + "description": { + "type": "string", + "title": "Optional user-set description for identification purposes" }, "created_time": { "type": "string", diff --git a/internal/gen/controller/api/resources/hosts/host.pb.go b/internal/gen/controller/api/resources/hosts/host.pb.go index 4e7212135..89410a258 100644 --- a/internal/gen/controller/api/resources/hosts/host.pb.go +++ b/internal/gen/controller/api/resources/hosts/host.pb.go @@ -38,18 +38,20 @@ type Host struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The type of the resource, to help differentiate schemas Type *wrappers.StringValue `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - // Friendly name, if set - FriendlyName *wrappers.StringValue `protobuf:"bytes,3,opt,name=friendly_name,json=friendlyName,proto3" json:"friendly_name,omitempty"` + // Optional name for identification purposes + Name *wrappers.StringValue `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + // Optional user-set description for identification purposes + Description *wrappers.StringValue `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` // The time this host was created // Ouput only. - CreatedTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty"` + CreatedTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty"` // The time this host was last updated // Output only. - UpdatedTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=updated_time,json=updatedTime,proto3" json:"updated_time,omitempty"` + UpdatedTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=updated_time,json=updatedTime,proto3" json:"updated_time,omitempty"` // Whether the host is disabled - Disabled *wrappers.BoolValue `protobuf:"bytes,6,opt,name=disabled,proto3" json:"disabled,omitempty"` + Disabled *wrappers.BoolValue `protobuf:"bytes,7,opt,name=disabled,proto3" json:"disabled,omitempty"` // The address (DNS or IP name) used to reach the host - Address *wrappers.StringValue `protobuf:"bytes,7,opt,name=address,proto3" json:"address,omitempty"` + Address *wrappers.StringValue `protobuf:"bytes,8,opt,name=address,proto3" json:"address,omitempty"` } func (x *Host) Reset() { @@ -98,9 +100,16 @@ func (x *Host) GetType() *wrappers.StringValue { return nil } -func (x *Host) GetFriendlyName() *wrappers.StringValue { +func (x *Host) GetName() *wrappers.StringValue { if x != nil { - return x.FriendlyName + return x.Name + } + return nil +} + +func (x *Host) GetDescription() *wrappers.StringValue { + if x != nil { + return x.Description } return nil } @@ -145,36 +154,39 @@ var file_controller_api_resources_hosts_v1_host_proto_rawDesc = []byte{ 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xf9, 0x02, 0x0a, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x74, 0x6f, 0x22, 0xa8, 0x03, 0x0a, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, - 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x6c, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x3e, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x0c, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x6c, 0x79, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x3d, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x3d, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x75, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x3d, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x36, - 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x64, 0x69, - 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x53, - 0x5a, 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, - 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x3b, 0x68, 0x6f, - 0x73, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3d, + 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, + 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x64, 0x69, 0x73, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x53, 0x5a, + 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, + 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, 0x72, + 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x3b, 0x68, 0x6f, 0x73, + 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -198,16 +210,17 @@ var file_controller_api_resources_hosts_v1_host_proto_goTypes = []interface{}{ } var file_controller_api_resources_hosts_v1_host_proto_depIdxs = []int32{ 1, // 0: controller.api.resources.hosts.v1.Host.type:type_name -> google.protobuf.StringValue - 1, // 1: controller.api.resources.hosts.v1.Host.friendly_name:type_name -> google.protobuf.StringValue - 2, // 2: controller.api.resources.hosts.v1.Host.created_time:type_name -> google.protobuf.Timestamp - 2, // 3: controller.api.resources.hosts.v1.Host.updated_time:type_name -> google.protobuf.Timestamp - 3, // 4: controller.api.resources.hosts.v1.Host.disabled:type_name -> google.protobuf.BoolValue - 1, // 5: controller.api.resources.hosts.v1.Host.address:type_name -> google.protobuf.StringValue - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 1, // 1: controller.api.resources.hosts.v1.Host.name:type_name -> google.protobuf.StringValue + 1, // 2: controller.api.resources.hosts.v1.Host.description:type_name -> google.protobuf.StringValue + 2, // 3: controller.api.resources.hosts.v1.Host.created_time:type_name -> google.protobuf.Timestamp + 2, // 4: controller.api.resources.hosts.v1.Host.updated_time:type_name -> google.protobuf.Timestamp + 3, // 5: controller.api.resources.hosts.v1.Host.disabled:type_name -> google.protobuf.BoolValue + 1, // 6: controller.api.resources.hosts.v1.Host.address:type_name -> google.protobuf.StringValue + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_controller_api_resources_hosts_v1_host_proto_init() } diff --git a/internal/gen/controller/api/resources/hosts/host_catalog.pb.go b/internal/gen/controller/api/resources/hosts/host_catalog.pb.go index cedb25f1a..d42f2bfcf 100644 --- a/internal/gen/controller/api/resources/hosts/host_catalog.pb.go +++ b/internal/gen/controller/api/resources/hosts/host_catalog.pb.go @@ -39,18 +39,20 @@ type HostCatalog struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The type of the resource, to help differentiate schemas Type *wrappers.StringValue `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - // Friendly name, if set - FriendlyName *wrappers.StringValue `protobuf:"bytes,3,opt,name=friendly_name,json=friendlyName,proto3" json:"friendly_name,omitempty"` + // Optional name for identification purposes + Name *wrappers.StringValue `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + // Optional user-set description for identification purposes + Description *wrappers.StringValue `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` // The time this host was created // Output only. - CreatedTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty"` + CreatedTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty"` // The time this host was last updated // Output only. - UpdatedTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=updated_time,json=updatedTime,proto3" json:"updated_time,omitempty"` + UpdatedTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=updated_time,json=updatedTime,proto3" json:"updated_time,omitempty"` // Whether the catalog is disabled - Disabled *wrappers.BoolValue `protobuf:"bytes,6,opt,name=disabled,proto3" json:"disabled,omitempty"` + Disabled *wrappers.BoolValue `protobuf:"bytes,7,opt,name=disabled,proto3" json:"disabled,omitempty"` // Attributes specific to the catalog type - Attributes *_struct.Struct `protobuf:"bytes,7,opt,name=attributes,proto3" json:"attributes,omitempty"` + Attributes *_struct.Struct `protobuf:"bytes,8,opt,name=attributes,proto3" json:"attributes,omitempty"` } func (x *HostCatalog) Reset() { @@ -99,9 +101,16 @@ func (x *HostCatalog) GetType() *wrappers.StringValue { return nil } -func (x *HostCatalog) GetFriendlyName() *wrappers.StringValue { +func (x *HostCatalog) GetName() *wrappers.StringValue { if x != nil { - return x.FriendlyName + return x.Name + } + return nil +} + +func (x *HostCatalog) GetDescription() *wrappers.StringValue { + if x != nil { + return x.Description } return nil } @@ -261,53 +270,56 @@ var file_controller_api_resources_hosts_v1_host_catalog_proto_rawDesc = []byte{ 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, - 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x81, 0x03, 0x0a, 0x0b, 0x48, 0x6f, 0x73, + 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb0, 0x03, 0x0a, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x0d, 0x66, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x6c, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x0c, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x6c, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, - 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x0c, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x08, 0x64, - 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0x1a, 0x0a, 0x18, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, - 0x67, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0xe2, 0x01, 0x0a, 0x18, 0x41, 0x77, 0x73, - 0x45, 0x63, 0x32, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x44, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x3b, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x09, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x0a, - 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, - 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x06, 0x72, 0x6f, 0x74, - 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x42, 0x53, 0x5a, - 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, 0x72, - 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x3b, 0x68, 0x6f, 0x73, - 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x08, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, + 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x12, 0x37, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, + 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0x1a, 0x0a, 0x18, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0xe2, 0x01, 0x0a, 0x18, 0x41, 0x77, 0x73, 0x45, + 0x63, 0x32, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3b, + 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x09, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x0a, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x06, 0x72, 0x6f, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x42, 0x53, 0x5a, 0x51, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, + 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, 0x72, 0x2f, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x3b, 0x68, 0x6f, 0x73, 0x74, + 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -333,20 +345,21 @@ var file_controller_api_resources_hosts_v1_host_catalog_proto_goTypes = []interf (*_struct.Struct)(nil), // 6: google.protobuf.Struct } var file_controller_api_resources_hosts_v1_host_catalog_proto_depIdxs = []int32{ - 3, // 0: controller.api.resources.hosts.v1.HostCatalog.type:type_name -> google.protobuf.StringValue - 3, // 1: controller.api.resources.hosts.v1.HostCatalog.friendly_name:type_name -> google.protobuf.StringValue - 4, // 2: controller.api.resources.hosts.v1.HostCatalog.created_time:type_name -> google.protobuf.Timestamp - 4, // 3: controller.api.resources.hosts.v1.HostCatalog.updated_time:type_name -> google.protobuf.Timestamp - 5, // 4: controller.api.resources.hosts.v1.HostCatalog.disabled:type_name -> google.protobuf.BoolValue - 6, // 5: controller.api.resources.hosts.v1.HostCatalog.attributes:type_name -> google.protobuf.Struct - 3, // 6: controller.api.resources.hosts.v1.AwsEc2HostCatalogDetails.access_key:type_name -> google.protobuf.StringValue - 3, // 7: controller.api.resources.hosts.v1.AwsEc2HostCatalogDetails.secret_key:type_name -> google.protobuf.StringValue - 5, // 8: controller.api.resources.hosts.v1.AwsEc2HostCatalogDetails.rotate:type_name -> google.protobuf.BoolValue - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 3, // 0: controller.api.resources.hosts.v1.HostCatalog.type:type_name -> google.protobuf.StringValue + 3, // 1: controller.api.resources.hosts.v1.HostCatalog.name:type_name -> google.protobuf.StringValue + 3, // 2: controller.api.resources.hosts.v1.HostCatalog.description:type_name -> google.protobuf.StringValue + 4, // 3: controller.api.resources.hosts.v1.HostCatalog.created_time:type_name -> google.protobuf.Timestamp + 4, // 4: controller.api.resources.hosts.v1.HostCatalog.updated_time:type_name -> google.protobuf.Timestamp + 5, // 5: controller.api.resources.hosts.v1.HostCatalog.disabled:type_name -> google.protobuf.BoolValue + 6, // 6: controller.api.resources.hosts.v1.HostCatalog.attributes:type_name -> google.protobuf.Struct + 3, // 7: controller.api.resources.hosts.v1.AwsEc2HostCatalogDetails.access_key:type_name -> google.protobuf.StringValue + 3, // 8: controller.api.resources.hosts.v1.AwsEc2HostCatalogDetails.secret_key:type_name -> google.protobuf.StringValue + 5, // 9: controller.api.resources.hosts.v1.AwsEc2HostCatalogDetails.rotate:type_name -> google.protobuf.BoolValue + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_controller_api_resources_hosts_v1_host_catalog_proto_init() } diff --git a/internal/gen/controller/api/resources/hosts/host_set.pb.go b/internal/gen/controller/api/resources/hosts/host_set.pb.go index 99332e114..979c142d2 100644 --- a/internal/gen/controller/api/resources/hosts/host_set.pb.go +++ b/internal/gen/controller/api/resources/hosts/host_set.pb.go @@ -38,24 +38,26 @@ type HostSet struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The type of the resource, to help differentiate schemas Type *wrappers.StringValue `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - // Friendly name, if set - FriendlyName *wrappers.StringValue `protobuf:"bytes,3,opt,name=friendly_name,json=friendlyName,proto3" json:"friendly_name,omitempty"` + // Optional name for identification purposes + Name *wrappers.StringValue `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + // Optional user-set description for identification purposes + Description *wrappers.StringValue `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` // The time this host was created // Output only. - CreatedTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty"` + CreatedTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty"` // The time this host was last updated // Output only. - UpdatedTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=updated_time,json=updatedTime,proto3" json:"updated_time,omitempty"` + UpdatedTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=updated_time,json=updatedTime,proto3" json:"updated_time,omitempty"` // Whether the host set is disabled - Disabled *wrappers.BoolValue `protobuf:"bytes,6,opt,name=disabled,proto3" json:"disabled,omitempty"` + Disabled *wrappers.BoolValue `protobuf:"bytes,7,opt,name=disabled,proto3" json:"disabled,omitempty"` // The total count of hosts in this host set // Output only. - Size *wrappers.Int64Value `protobuf:"bytes,7,opt,name=size,proto3" json:"size,omitempty"` + Size *wrappers.Int64Value `protobuf:"bytes,8,opt,name=size,proto3" json:"size,omitempty"` // 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,8,rep,name=hosts,proto3" json:"hosts,omitempty"` + Hosts []*Host `protobuf:"bytes,9,rep,name=hosts,proto3" json:"hosts,omitempty"` } func (x *HostSet) Reset() { @@ -104,9 +106,16 @@ func (x *HostSet) GetType() *wrappers.StringValue { return nil } -func (x *HostSet) GetFriendlyName() *wrappers.StringValue { +func (x *HostSet) GetName() *wrappers.StringValue { if x != nil { - return x.FriendlyName + return x.Name + } + return nil +} + +func (x *HostSet) GetDescription() *wrappers.StringValue { + if x != nil { + return x.Description } return nil } @@ -161,40 +170,43 @@ var file_controller_api_resources_hosts_v1_host_set_proto_rawDesc = []byte{ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb4, 0x03, 0x0a, 0x07, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe3, 0x03, 0x0a, 0x07, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x41, 0x0a, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x6c, 0x79, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x70, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x6c, - 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x04, 0x73, - 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, - 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x3d, 0x0a, 0x05, - 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x48, 0x6f, 0x73, 0x74, 0x52, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x42, 0x53, 0x5a, 0x51, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, 0x72, 0x2f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x3b, 0x68, 0x6f, 0x73, 0x74, 0x73, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x04, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x3d, 0x0a, 0x05, 0x68, + 0x6f, 0x73, 0x74, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, + 0x6f, 0x73, 0x74, 0x52, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x42, 0x53, 0x5a, 0x51, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, + 0x72, 0x70, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, 0x72, 0x2f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x3b, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -220,17 +232,18 @@ var file_controller_api_resources_hosts_v1_host_set_proto_goTypes = []interface{ } var file_controller_api_resources_hosts_v1_host_set_proto_depIdxs = []int32{ 1, // 0: controller.api.resources.hosts.v1.HostSet.type:type_name -> google.protobuf.StringValue - 1, // 1: controller.api.resources.hosts.v1.HostSet.friendly_name:type_name -> google.protobuf.StringValue - 2, // 2: controller.api.resources.hosts.v1.HostSet.created_time:type_name -> google.protobuf.Timestamp - 2, // 3: controller.api.resources.hosts.v1.HostSet.updated_time:type_name -> google.protobuf.Timestamp - 3, // 4: controller.api.resources.hosts.v1.HostSet.disabled:type_name -> google.protobuf.BoolValue - 4, // 5: controller.api.resources.hosts.v1.HostSet.size:type_name -> google.protobuf.Int64Value - 5, // 6: controller.api.resources.hosts.v1.HostSet.hosts:type_name -> controller.api.resources.hosts.v1.Host - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 1, // 1: controller.api.resources.hosts.v1.HostSet.name:type_name -> google.protobuf.StringValue + 1, // 2: controller.api.resources.hosts.v1.HostSet.description:type_name -> google.protobuf.StringValue + 2, // 3: controller.api.resources.hosts.v1.HostSet.created_time:type_name -> google.protobuf.Timestamp + 2, // 4: controller.api.resources.hosts.v1.HostSet.updated_time:type_name -> google.protobuf.Timestamp + 3, // 5: controller.api.resources.hosts.v1.HostSet.disabled:type_name -> google.protobuf.BoolValue + 4, // 6: controller.api.resources.hosts.v1.HostSet.size:type_name -> google.protobuf.Int64Value + 5, // 7: controller.api.resources.hosts.v1.HostSet.hosts:type_name -> controller.api.resources.hosts.v1.Host + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_controller_api_resources_hosts_v1_host_set_proto_init() } diff --git a/internal/proto/local/controller/api/resources/hosts/v1/host.proto b/internal/proto/local/controller/api/resources/hosts/v1/host.proto index 856700e45..61763dc11 100644 --- a/internal/proto/local/controller/api/resources/hosts/v1/host.proto +++ b/internal/proto/local/controller/api/resources/hosts/v1/host.proto @@ -16,20 +16,23 @@ message Host { // The type of the resource, to help differentiate schemas google.protobuf.StringValue type = 2; - // Friendly name, if set - google.protobuf.StringValue friendly_name = 3; + // Optional name for identification purposes + google.protobuf.StringValue name = 3; + + // Optional user-set description for identification purposes + google.protobuf.StringValue description = 4; // The time this host was created // Ouput only. - google.protobuf.Timestamp created_time = 4; + google.protobuf.Timestamp created_time = 5; // The time this host was last updated // Output only. - google.protobuf.Timestamp updated_time = 5; + google.protobuf.Timestamp updated_time = 6; // Whether the host is disabled - google.protobuf.BoolValue disabled = 6; + google.protobuf.BoolValue disabled = 7; // The address (DNS or IP name) used to reach the host - google.protobuf.StringValue address = 7; + google.protobuf.StringValue address = 8; } diff --git a/internal/proto/local/controller/api/resources/hosts/v1/host_catalog.proto b/internal/proto/local/controller/api/resources/hosts/v1/host_catalog.proto index b22ee1db3..834944b5c 100644 --- a/internal/proto/local/controller/api/resources/hosts/v1/host_catalog.proto +++ b/internal/proto/local/controller/api/resources/hosts/v1/host_catalog.proto @@ -17,22 +17,25 @@ message HostCatalog { // The type of the resource, to help differentiate schemas google.protobuf.StringValue type = 2; - // Friendly name, if set - google.protobuf.StringValue friendly_name = 3; + // Optional name for identification purposes + google.protobuf.StringValue name = 3; + + // Optional user-set description for identification purposes + google.protobuf.StringValue description = 4; // The time this host was created // Output only. - google.protobuf.Timestamp created_time = 4; + google.protobuf.Timestamp created_time = 5; // The time this host was last updated // Output only. - google.protobuf.Timestamp updated_time = 5; + google.protobuf.Timestamp updated_time = 6; // Whether the catalog is disabled - google.protobuf.BoolValue disabled = 6; + google.protobuf.BoolValue disabled = 7; // Attributes specific to the catalog type - google.protobuf.Struct attributes = 7; + google.protobuf.Struct attributes = 8; } message StaticHostCatalogDetails { diff --git a/internal/proto/local/controller/api/resources/hosts/v1/host_set.proto b/internal/proto/local/controller/api/resources/hosts/v1/host_set.proto index 8b529446c..11122f47b 100644 --- a/internal/proto/local/controller/api/resources/hosts/v1/host_set.proto +++ b/internal/proto/local/controller/api/resources/hosts/v1/host_set.proto @@ -17,27 +17,30 @@ message HostSet { // The type of the resource, to help differentiate schemas google.protobuf.StringValue type = 2; - // Friendly name, if set - google.protobuf.StringValue friendly_name = 3; + // Optional name for identification purposes + google.protobuf.StringValue name = 3; + + // Optional user-set description for identification purposes + google.protobuf.StringValue description = 4; // The time this host was created // Output only. - google.protobuf.Timestamp created_time = 4; + google.protobuf.Timestamp created_time = 5; // The time this host was last updated // Output only. - google.protobuf.Timestamp updated_time = 5; + google.protobuf.Timestamp updated_time = 6; // Whether the host set is disabled - google.protobuf.BoolValue disabled = 6; + google.protobuf.BoolValue disabled = 7; // The total count of hosts in this host set // Output only. - google.protobuf.Int64Value size = 7; + google.protobuf.Int64Value size = 8; // 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 = 8; + repeated Host hosts = 9; }