Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IF-5871 fix parameter name #81

Merged
merged 1 commit into from
May 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions ecl/mvna/v1/_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -1105,22 +1105,22 @@ 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 = {}
if priority:
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)
Expand All @@ -1135,22 +1135,22 @@ 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 = {}
if priority:
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)
Expand Down
4 changes: 2 additions & 2 deletions ecl/mvna/v1/rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down