mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #416 in YUNIONIO/onecloud from ~LIZEXI/onecloud:feature/lzx-endpoint-list to release/2.3.0
* commit '85af9754d7f56f2d065011b44a43297271670b7d': climc: endpoint list by service id
This commit is contained in:
@@ -11,6 +11,7 @@ func init() {
|
||||
Limit int64 `help:"Limit, default 0, i.e. no limit" default:"20"`
|
||||
Offset int64 `help:"Offset, default 0, i.e. no offset"`
|
||||
Region string `help:"Search by region"`
|
||||
ServiceId string `help:"Search by service id"`
|
||||
Interface string `help:"Search by interface"`
|
||||
}
|
||||
R(&EndpointListOptions{}, "endpoint-list", "List service endpoints", func(s *mcclient.ClientSession, args *EndpointListOptions) error {
|
||||
@@ -28,6 +29,9 @@ func init() {
|
||||
if len(args.Region) > 0 {
|
||||
query.Add(jsonutils.NewString(args.Region), "region_id")
|
||||
}
|
||||
if len(args.ServiceId) > 0 {
|
||||
query.Add(jsonutils.NewString(args.ServiceId), "service_id")
|
||||
}
|
||||
if len(args.Interface) > 0 {
|
||||
query.Add(jsonutils.NewString(args.Interface), "interface")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user