mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-24 12:32:55 +08:00
20 lines
432 B
Go
20 lines
432 B
Go
package shell
|
|
|
|
import (
|
|
"yunion.io/x/onecloud/pkg/mcclient"
|
|
"yunion.io/x/onecloud/pkg/mcclient/modules"
|
|
)
|
|
|
|
func init() {
|
|
type TenantListOptions struct {
|
|
}
|
|
R(&TenantListOptions{}, "tenant-list", "List tenants", func(s *mcclient.ClientSession, args *TenantListOptions) error {
|
|
result, err := modules.Tenants.List(s, nil)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
printList(result, modules.Tenants.GetColumns(s))
|
|
return nil
|
|
})
|
|
}
|