-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat]tools-v2: add bs create volume snapshot #2772
[feat]tools-v2: add bs create volume snapshot #2772
Conversation
cicheck |
1 similar comment
cicheck |
tools-v2/pkg/cli/command/curvebs/create/volume/snapshot/snapshot.go
Outdated
Show resolved
Hide resolved
a5e0878
to
448e3f1
Compare
cicheck |
1 similar comment
cicheck |
448e3f1
to
067f655
Compare
cicheck |
2 similar comments
cicheck |
cicheck |
067f655
to
cd28014
Compare
cicheck |
1 similar comment
cicheck |
@baytan0720 need to rebase. |
2a4e051
to
0786363
Compare
Signed-off-by: baytan0720 <[email protected]>
0786363
to
b762c43
Compare
cicheck |
cicheck |
1 similar comment
cicheck |
@caoxianfei1 PTAL |
|
||
Usage: | ||
```bash | ||
curve bs create volume snapshot --user root --filename test --snapshotname snap-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The filename is '/test'?
metric := basecmd.NewMetric(sCmd.snapshotAddrs, subUri, sCmd.timeout) | ||
result, err := basecmd.QueryMetric(metric) | ||
if err.TypeCode() != cmderror.CODE_SUCCESS { | ||
return err.ToError() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should get error code and return proper error description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
What problem does this PR solve?
Issue Number: #2585
Problem Summary:
What is changed and how it works?
What's Changed:
modify tools-v2/internal/utils/snapshot.go
modify tools-v2/internal/utils/row.go
modify tools-v2/pkg/cli/command/curvebs/create/create.go
modify tools-v2/pkg/config/bs.go
add tools-v2/pkg/cli/command/curvebs/create/volume/snapshot/snapshot.go
add tools-v2/pkg/cli/command/curvebs/create/volume/volume.go
How it Works:
Usage:
curve bs create volume snapshot --user root --filename test --snapshotname snap-test
Output:
Side effects(Breaking backward compatibility? Performance regression?):
Check List