From 30a8b39fe1eb029956cf3b05620d6fe0853024c0 Mon Sep 17 00:00:00 2001 From: shisoAqron Date: Mon, 31 May 2021 09:48:01 +0900 Subject: [PATCH] IF-5871 fix parameter name --- ecl/mvna/v1/_proxy.py | 22 +++++++++++----------- ecl/mvna/v1/rule.py | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ecl/mvna/v1/_proxy.py b/ecl/mvna/v1/_proxy.py index 9845b5a..8dcd26c 100644 --- a/ecl/mvna/v1/_proxy.py +++ b/ecl/mvna/v1/_proxy.py @@ -1035,14 +1035,14 @@ def rules(self, **params): """List Rules.""" return list(self._list(_rule.Rule, paginated=False, **params)) - def create_rule(self, priority, target_group_id, policy_id, condition, + def create_rule(self, priority, target_group_id, policy_id, conditions, name=None, description=None, tags=None): """Create Rule. :param string priority: Priority of Rule :param string target_group_id: Target group ID of Rule :param string policy_id: Policy ID of Rule - :param string condition: Condition ID of Rule + :param string conditions: Condition IDs of Rule :param string name: Name of Rule :param string description: Description of Rule :param dict tags: Tags of Rule @@ -1052,7 +1052,7 @@ def create_rule(self, priority, target_group_id, policy_id, condition, 'priority': priority, 'target_group_id': target_group_id, 'policy_id': policy_id, - 'condition': condition + 'conditions': conditions } if name: body["name"] = name @@ -1105,13 +1105,13 @@ def delete_rule(self, rule_id, ignore_missing=False): def create_staged_rule_configuration( self, rule_id, - priority=None, target_group_id=None, condition=None): + priority=None, target_group_id=None, conditions=None): """Create Staged Rule Configuration. :param string rule_id: ID of Rule :param string priority: Priority of Rule :param string target_group_id: Target Group ID of Rule - :param string condition: Condition of Rule + :param string conditions: Conditions of Rule :return: Rule """ body = {} @@ -1119,8 +1119,8 @@ def create_staged_rule_configuration( body["priority"] = priority if target_group_id: body["target_group_id"] = target_group_id - if condition: - body["condition"] = condition + if conditions: + body["conditions"] = conditions rule = _rule.Rule() return rule.create_staged_configuration(self.session, rule_id, **body) @@ -1135,13 +1135,13 @@ def get_staged_rule_configuration(self, rule_id): def update_staged_rule_configuration( self, rule_id, - priority=None, target_group_id=None, condition=None): + priority=None, target_group_id=None, conditions=None): """Create Staged Rule Configuration. :param string rule_id: ID of Rule :param string priority: Priority of Rule :param string target_group_id: Target Group ID of Rule - :param string condition: Condition of Rule + :param string conditions: Conditions of Rule :return: Rule """ body = {} @@ -1149,8 +1149,8 @@ def update_staged_rule_configuration( body["priority"] = priority if target_group_id: body["target_group_id"] = target_group_id - if condition: - body["condition"] = condition + if conditions: + body["conditions"] = conditions rule = _rule.Rule() return rule.update_staged_configuration(self.session, rule_id, **body) diff --git a/ecl/mvna/v1/rule.py b/ecl/mvna/v1/rule.py index 5316a8c..3f42b7f 100644 --- a/ecl/mvna/v1/rule.py +++ b/ecl/mvna/v1/rule.py @@ -54,8 +54,8 @@ class Rule(base.MVNABaseResource): load_balancer_id = resource2.Body('load_balancer_id') #: Tenant ID of rule tenant_id = resource2.Body('tenant_id') - #: Condition of rule - condition = resource2.Body('condition') + #: Conditions of rule + conditions = resource2.Body('conditions') #: Current configuration of rule current = resource2.Body('current') #: Staged configuration of rule