Skip to content

Commit

Permalink
add the default value
Browse files Browse the repository at this point in the history
Signed-off-by: 了阔以 <[email protected]>
  • Loading branch information
kai2321 committed Oct 30, 2023
1 parent 74e1dac commit 34a66f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools-v2/pkg/cli/command/curvebs/list/snapshot/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,13 @@ func (sCmd *SnapShotCommand) RunCommand(cmd *cobra.Command, args []string) error
cobrautil.QueryAction: cobrautil.ActionGetFileSnapshotList,
cobrautil.QueryVersion: cobrautil.Version,
cobrautil.QueryUser: sCmd.user,
cobrautil.QueryUUID: sCmd.uuid,
cobrautil.QueryFile: sCmd.file,
cobrautil.QueryLimit: cobrautil.Limit,
cobrautil.QueryOffset: cobrautil.Offset,
}
if sCmd.uuid != "*" {
params[cobrautil.QueryUUID] = sCmd.uuid
}
snapshotsInfo, err := ListSnapShot(sCmd.snapshotAddrs, sCmd.timeout, params)
if err != nil {
sCmd.Error = err
Expand Down
2 changes: 2 additions & 0 deletions tools-v2/pkg/config/bs.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ const (
VIPER_CURVEBS_TASKID = "curvebs.taskid"
CURVEBS_SNAPSHOT_ID = "snapshotid"
VIPER_CURVEBS_SNAPSHOT_ID = "curvebs.snapshotqid"
CURVEBS_DEFAULT_SNAPSHOT_ID = "*"
CURVEBS_FAILED = "failed"
VIPER_CURVEBS_FAILED = "curvebs.failed"
)
Expand Down Expand Up @@ -224,6 +225,7 @@ var (
CURVEBS_ALL: CURVEBS_DEFAULT_ALL,
CURVEBS_LOGIC_POOL_ID: CURVEBS_DEFAULT_LOGIC_POOL_ID,
CURVEBS_COPYSET_ID: CURVEBS_DEFAULT_COPYSET_ID,
CURVEBS_SNAPSHOT_ID: CURVEBS_DEFAULT_SNAPSHOT_ID,
}
)

Expand Down

0 comments on commit 34a66f2

Please sign in to comment.