mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Automatic merge from release/2.2.0 -> release/2.3.0
* commit '6fd50aac20dda17a661f925156c82b559aa04b7f': network list by server_type
This commit is contained in:
@@ -12,11 +12,12 @@ import (
|
||||
func init() {
|
||||
type NetworkListOptions struct {
|
||||
options.BaseListOptions
|
||||
Ip string `help:"search networks that contain this IP"`
|
||||
Zone string `help:"search networks in a zone"`
|
||||
Wire string `help:"search networks belongs to a wire"`
|
||||
Vpc string `help:"search networks belongs to a VPC"`
|
||||
Region string `help:"search networks belongs to a CloudRegion"`
|
||||
Ip string `help:"search networks that contain this IP"`
|
||||
Zone string `help:"search networks in a zone"`
|
||||
Wire string `help:"search networks belongs to a wire"`
|
||||
Vpc string `help:"search networks belongs to a VPC"`
|
||||
Region string `help:"search networks belongs to a CloudRegion"`
|
||||
ServerType string `help:"search networks belongs to a ServerType"`
|
||||
}
|
||||
R(&NetworkListOptions{}, "network-list", "List networks", func(s *mcclient.ClientSession, args *NetworkListOptions) error {
|
||||
var params *jsonutils.JSONDict
|
||||
@@ -40,6 +41,9 @@ func init() {
|
||||
if len(args.Region) > 0 {
|
||||
params.Add(jsonutils.NewString(args.Region), "cloudregion")
|
||||
}
|
||||
if len(args.ServerType) > 0 {
|
||||
params.Add(jsonutils.NewString(args.ServerType), "server_type")
|
||||
}
|
||||
var result *modules.ListResult
|
||||
var err error
|
||||
if len(args.Wire) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user