mirror of https://github.com/status-im/consul.git
fix templated policy cli output (#18821)
This commit is contained in:
parent
9c1a1ffcde
commit
e24b3d9b3f
|
@ -64,7 +64,7 @@ type prettyFormatter struct {
|
|||
func (f *prettyFormatter) FormatTemplatedPolicy(templatedPolicy api.ACLTemplatedPolicyResponse) (string, error) {
|
||||
var buffer bytes.Buffer
|
||||
|
||||
buffer.WriteString(fmt.Sprintf("Name: %s\n", templatedPolicy.TemplateName))
|
||||
buffer.WriteString(fmt.Sprintf("Name: %s\n", templatedPolicy.TemplateName))
|
||||
|
||||
buffer.WriteString("Input variables:")
|
||||
switch templatedPolicy.TemplateName {
|
||||
|
@ -77,7 +77,7 @@ func (f *prettyFormatter) FormatTemplatedPolicy(templatedPolicy api.ACLTemplated
|
|||
buffer.WriteString("Example usage:\n")
|
||||
buffer.WriteString(fmt.Sprintf("%sconsul acl token create -templated-policy builtin/node -var name:node-1\n", WhitespaceIndent))
|
||||
case api.ACLTemplatedPolicyDNSName:
|
||||
buffer.WriteString(" None\n")
|
||||
buffer.WriteString(" None\n")
|
||||
buffer.WriteString("Example usage:\n")
|
||||
buffer.WriteString(fmt.Sprintf("%sconsul acl token create -templated-policy builtin/dns\n", WhitespaceIndent))
|
||||
default:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Name: builtin/dns
|
||||
Input variables: None
|
||||
Name: builtin/dns
|
||||
Input variables: None
|
||||
Example usage:
|
||||
consul acl token create -templated-policy builtin/dns
|
||||
Raw Template:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Name: builtin/dns
|
||||
Input variables: None
|
||||
Name: builtin/dns
|
||||
Input variables: None
|
||||
Example usage:
|
||||
consul acl token create -templated-policy builtin/dns
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Name: builtin/node
|
||||
Name: builtin/node
|
||||
Input variables:
|
||||
Name: String - Required - The node name.
|
||||
Example usage:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Name: builtin/node
|
||||
Name: builtin/node
|
||||
Input variables:
|
||||
Name: String - Required - The node name.
|
||||
Example usage:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Name: builtin/service
|
||||
Name: builtin/service
|
||||
Input variables:
|
||||
Name: String - Required - The name of the service.
|
||||
Example usage:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Name: builtin/service
|
||||
Name: builtin/service
|
||||
Input variables:
|
||||
Name: String - Required - The name of the service.
|
||||
Example usage:
|
||||
|
|
Loading…
Reference in New Issue