Merge pull request #46 in YUNIONIO/onecloud from ~QUXUAN/onecloud:feature/qx-server-secgroup to release/2.1.0

* commit 'bc73e77e3594992110e74f05a9774ef49952f5ad':
  更改sync算法
  同步阿里云安全组规则到本地
This commit is contained in:
李泽玺
2018-08-15 12:32:36 +08:00
15 changed files with 933 additions and 42 deletions
-2
View File
@@ -59,7 +59,6 @@ func init() {
})
type SecGroupRulesCreateOptions struct {
NAME string `help:"Name of security group rule to create"`
SECGROUP string `help:"Secgroup ID or Name" metavar:"Secgroup"`
Direction string `help:"Direction of rule" choices:"in|out"`
Action string `help:"Action of rule" choices:"allow|deny"`
@@ -72,7 +71,6 @@ func init() {
R(&SecGroupRulesCreateOptions{}, "secgroup-rule-create", "Create all security group rule", func(s *mcclient.ClientSession, args *SecGroupRulesCreateOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.NAME), "name")
if len(args.Desc) > 0 {
params.Add(jsonutils.NewString(args.Desc), "description")
}