mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
update
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package shell
|
||||
|
||||
import (
|
||||
"yunion.io/x/onecloud/pkg/util/shellutils"
|
||||
"yunion.io/x/onecloud/pkg/util/zstack"
|
||||
)
|
||||
|
||||
func init() {
|
||||
type DiskListOptions struct {
|
||||
StorageId string
|
||||
DiskId string
|
||||
}
|
||||
shellutils.R(&DiskListOptions{}, "disk-list", "List disks", func(cli *zstack.SRegion, args *DiskListOptions) error {
|
||||
disks, err := cli.GetDisks(args.StorageId, args.DiskId)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printList(disks, len(disks), 0, 0, []string{})
|
||||
return nil
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user