Skip to content

Commit 5717785

Browse files
authored
platform/repository: Fix list format (#136)
Fixes `ecctl platform repository list` command where the AccessKey was being printed in a sepparate line. Additionally Fixes another bug where the `--setings` flag was marked as required even though the snapshot repository definition can be passed through the standard input. Last but not least, adds "json", "yaml" and "yml" file extension autocompletion. Signed-off-by: Marc Lopez <marc5.12@outlook.com>
1 parent 89a0097 commit 5717785

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

cmd/platform/repository/command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,5 +191,5 @@ func init() {
191191

192192
platformSnapshotCreateCmd.Flags().String("settings", "", "Configuration file for the snapshot repository")
193193
platformSnapshotCreateCmd.Flags().String("type", "s3", "Repository type that will be configured")
194-
cobra.MarkFlagRequired(platformSnapshotCreateCmd.Flags(), "settings")
194+
platformSnapshotCreateCmd.MarkFlagFilename("settings", "json", "yaml", "yml")
195195
}

pkg/formatter/templates/bindata.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ func textMetadataShowGotmpl() (*asset, error) {
523523
return a, nil
524524
}
525525

526-
var _textPlatformRepositorylistGotmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\x50\x3f\x4f\x84\x30\x14\xdf\xf9\x14\x2f\xc4\x41\x07\x59\xdc\x4c\x1c\x38\x42\x8c\x21\xa2\x01\x1c\x6e\xc4\xf6\x07\x69\xbc\x6b\x09\x2d\x46\xd2\xf4\xbb\x1b\x28\xbd\xe4\xce\x73\x6b\x7f\x7f\xdf\x7b\xd6\xde\x13\x47\x27\x24\x28\x56\xdf\x18\x47\xc1\x11\x93\x73\xd6\xd2\xd8\xca\x1e\x94\x64\x4a\x76\xa2\xd7\x2b\x86\x1f\xb0\xc9\xa0\xc1\x71\x38\xb4\x06\x94\x38\x17\x59\x4b\x90\xdc\x5b\x4e\x8f\x10\xc9\xd1\xb5\xd3\xc1\x2c\x89\xd1\x52\x15\x97\xe9\x6b\xee\xf3\x4d\xfb\xb9\x4a\xe3\x66\xff\x7e\x09\x55\xf9\xf3\xcb\x5b\x79\x01\xee\x3e\xb2\x22\x6f\xe8\x4a\x42\x9a\x65\x79\x5d\x53\x91\xef\x4f\x45\x57\x86\xa7\x1b\xb6\xfe\xe8\xf1\x89\x6e\x8d\xaa\x1f\x9a\x79\x80\x17\x04\xe1\xdd\x26\xd4\x30\x46\xc8\x5e\x2f\xd2\xcd\x95\xd4\x01\xf3\x3b\x27\x15\x06\xa5\x85\x51\xe3\x5c\xb6\x47\x9c\x0d\x14\x2c\x4b\xc1\x39\x11\x82\x93\x0a\xbd\x50\xf2\x1f\x72\x37\xb1\x2f\x98\xad\xe8\x2f\x9d\x32\x06\xad\x0b\xcc\xdb\xae\xfe\xea\x91\xb5\x90\xdc\xb9\xe8\x37\x00\x00\xff\xff\x1f\x13\xbc\xb3\xd3\x01\x00\x00")
526+
var _textPlatformRepositorylistGotmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\x90\x41\x4f\x84\x30\x14\x84\xef\xfc\x8a\x17\xe2\x41\x0f\x72\xf1\x66\xe2\x81\x25\xc4\x18\x22\x1a\xc0\xc3\x1e\xb1\x1d\x48\xe3\x6e\x4b\x68\x31\x92\xa6\xff\xdd\x40\xe9\x26\xbb\xae\x37\x98\xf7\xcd\xcc\x7b\xb5\xf6\x9e\x38\x3a\x21\x41\xb1\xfa\xc6\x38\x0a\x8e\x98\x9c\xb3\x96\xc6\x56\xf6\xa0\x24\x53\xb2\x13\xbd\x5e\x35\xfc\x80\x4d\x06\x0d\x8e\xc3\xa1\x35\xa0\xc4\xb9\xc8\x5a\x82\xe4\xde\x72\xfa\x08\x91\x1c\x5d\x3b\x1d\xcc\x92\x18\x2d\x55\x71\x99\xbe\xe6\x3e\xdf\xb4\x9f\x2b\x1a\x37\xfb\xf7\x4b\xa9\xca\x9f\x5f\xde\xca\x0b\x71\xf7\x91\x15\x79\x43\x57\x12\xd2\x2c\xcb\xeb\x9a\x8a\x7c\x7f\x2a\xba\xb2\x3c\xdd\xb0\xf5\x8f\x1e\x9f\xe8\xd6\xa8\xfa\xa1\x99\x07\x78\x20\x80\x77\x1b\xa8\x61\x8c\x90\xbd\x5e\xd0\xcd\x95\xd4\x41\xf3\x37\x27\x15\x06\xa5\x85\x51\xe3\x5c\xb6\x47\x9c\x2d\x14\x2c\x4b\xc1\xf9\x20\x04\x27\x15\x7a\xa1\xe4\x3f\xc3\xdd\xc4\xbe\x60\xc2\x29\x7f\xe7\x29\x63\xd0\xba\xc0\xbc\x11\xfe\xd9\x23\x6b\x21\xb9\x73\xd1\x6f\x00\x00\x00\xff\xff\xe3\xdb\x2e\xe1\xd4\x01\x00\x00")
527527

528528
func textPlatformRepositorylistGotmplBytes() ([]byte, error) {
529529
return bindataRead(

pkg/formatter/templates/text/platform/repositorylist.gotmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
{{- "NAME" }}{{tab}}{{ "TYPE" }}{{tab}}{{ "REGION" }}{{tab}}{{ "BUCKET NAME" }}{{tab}}{{ "ACCESS KEY" }}
44
{{- range .Configs }}{{ $config := (toS3TypeConfig .Config) }}{{ $settings := $config.Settings }}
55
{{ .RepositoryName }}{{tab}}{{ $config.Type }}{{tab}}{{ $settings.Region }}{{tab}}{{ $settings.Bucket }}
6-
{{ tab}}{{ $settings.AccessKey}}
6+
{{- tab}}{{ $settings.AccessKey}}
77
{{- end }}
88
{{end}}

0 commit comments

Comments
 (0)