Skip to content

Commit 139b42b

Browse files
committed
fix(storage): display template UUID in storage templatise output
1 parent c84665c commit 139b42b

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Fixed
1313
- Complete shell input with uppercase letters (e.g., `Cap` to `CapitalizedName` will now work)
14+
- Display UUID of created template in `storage templatise` output.
1415

1516
## [1.4.0] - 2022-06-15
1617
### Added

internal/commands/storage/templatize.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"github.com/UpCloudLtd/upcloud-cli/internal/completion"
88
"github.com/UpCloudLtd/upcloud-cli/internal/output"
99
"github.com/UpCloudLtd/upcloud-cli/internal/resolver"
10+
"github.com/UpCloudLtd/upcloud-cli/internal/ui"
1011

1112
"github.com/UpCloudLtd/upcloud-go-api/v4/upcloud/request"
1213
"github.com/spf13/pflag"
@@ -73,5 +74,7 @@ func (s *templatizeCommand) Execute(exec commands.Executor, uuid string) (output
7374
logline.SetMessage(fmt.Sprintf("%s: success", msg))
7475
logline.MarkDone()
7576

76-
return output.OnlyMarshaled{Value: res}, nil
77+
return output.MarshaledWithHumanDetails{Value: res, Details: []output.DetailRow{
78+
{Title: "UUID", Value: res.UUID, Colour: ui.DefaultUUUIDColours},
79+
}}, nil
7780
}

0 commit comments

Comments
 (0)