mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-05-23 13:00:18 +08:00
20 lines
436 B
Go
20 lines
436 B
Go
package shell
|
|
|
|
import (
|
|
"yunion.io/x/onecloud/pkg/util/openstack"
|
|
"yunion.io/x/onecloud/pkg/util/shellutils"
|
|
)
|
|
|
|
func init() {
|
|
type ProjectListOptions struct {
|
|
}
|
|
shellutils.R(&ProjectListOptions{}, "project-list", "List project", func(cli *openstack.SRegion, args *ProjectListOptions) error {
|
|
project, err := cli.GetClient().GetIProjects()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
printList(project, 0, 0, 0, nil)
|
|
return nil
|
|
})
|
|
}
|