From 2d2b23d7889f9386ff50b003a6b6467ba43d0a10 Mon Sep 17 00:00:00 2001 From: Danielle Lancashire Date: Wed, 21 Aug 2019 16:18:23 +0200 Subject: [PATCH] remove hidden field from host volumes We're not shipping support for "hidden" volumes in 0.10 any more, I'll convert this to an issue+mini RFC for future enhancement. --- api/nodes.go | 1 - api/tasks.go | 1 - command/agent/job_endpoint.go | 1 - command/node_status.go | 4 ++-- nomad/structs/volumes.go | 2 -- 5 files changed, 2 insertions(+), 7 deletions(-) diff --git a/api/nodes.go b/api/nodes.go index 4c823fb3d25..bf72034f094 100644 --- a/api/nodes.go +++ b/api/nodes.go @@ -440,7 +440,6 @@ type DriverInfo struct { type HostVolumeInfo struct { Path string ReadOnly bool - Hidden bool } // Node is used to deserialize a node entry. diff --git a/api/tasks.go b/api/tasks.go index b3022766202..2285c5bceb0 100644 --- a/api/tasks.go +++ b/api/tasks.go @@ -367,7 +367,6 @@ type VolumeRequest struct { Name string Type string ReadOnly bool `mapstructure:"read_only"` - Hidden bool Config map[string]interface{} } diff --git a/command/agent/job_endpoint.go b/command/agent/job_endpoint.go index 0ec6c4a7736..18c438d3356 100644 --- a/command/agent/job_endpoint.go +++ b/command/agent/job_endpoint.go @@ -753,7 +753,6 @@ func ApiTgToStructsTG(taskGroup *api.TaskGroup, tg *structs.TaskGroup) { Name: v.Name, Type: v.Type, ReadOnly: v.ReadOnly, - Hidden: v.Hidden, Config: v.Config, } diff --git a/command/node_status.go b/command/node_status.go index 97923b6c585..2084af2a65d 100644 --- a/command/node_status.go +++ b/command/node_status.go @@ -486,11 +486,11 @@ func (c *NodeStatusCommand) outputNodeVolumeInfo(node *api.Node) { sort.Strings(names) output := make([]string, 0, len(names)+1) - output = append(output, "Name|ReadOnly|Hidden|Source") + output = append(output, "Name|ReadOnly|Source") for _, volName := range names { info := node.HostVolumes[volName] - output = append(output, fmt.Sprintf("%s|%v|%v|%s", volName, info.ReadOnly, info.Hidden, info.Path)) + output = append(output, fmt.Sprintf("%s|%v|%s", volName, info.ReadOnly, info.Path)) } c.Ui.Output(formatList(output)) } diff --git a/nomad/structs/volumes.go b/nomad/structs/volumes.go index 519c4e42e97..a873e87d9e6 100644 --- a/nomad/structs/volumes.go +++ b/nomad/structs/volumes.go @@ -14,7 +14,6 @@ type ClientHostVolumeConfig struct { Name string `hcl:",key"` Path string `hcl:"path"` ReadOnly bool `hcl:"read_only"` - Hidden bool `hcl:"hidden"` } func (p *ClientHostVolumeConfig) Copy() *ClientHostVolumeConfig { @@ -96,7 +95,6 @@ type VolumeRequest struct { Name string Type string ReadOnly bool - Hidden bool Config map[string]interface{} }