From a8e180943aa3bd1692507f5ecd4126b7993202c6 Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Wed, 29 Mar 2017 11:27:30 -0400 Subject: Fixed docs. Fixed add_resource. --- roles/lib_openshift/library/oc_clusterrole.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'roles/lib_openshift/library') diff --git a/roles/lib_openshift/library/oc_clusterrole.py b/roles/lib_openshift/library/oc_clusterrole.py index b94137d30..8bd8a2ccd 100644 --- a/roles/lib_openshift/library/oc_clusterrole.py +++ b/roles/lib_openshift/library/oc_clusterrole.py @@ -1438,6 +1438,7 @@ class Rule(object): def add_resource(self, inc_resource): '''add an resource to the resources array''' + self.resources.append(inc_resource) def remove_verb(self, inc_verb): '''add a verb to the verbs array''' @@ -1471,10 +1472,10 @@ class Rule(object): def __eq__(self, other): '''return whether rules are equal''' - return self.attribute_restrictions == other.attribute_restrictions and \ - self.api_groups == other.api_groups and \ - self.resources == other.resources and \ - self.verbs == other.verbs + return (self.attribute_restrictions == other.attribute_restrictions and + self.api_groups == other.api_groups and + self.resources == other.resources and + self.verbs == other.verbs) @staticmethod @@ -1497,7 +1498,7 @@ class Rule(object): # pylint: disable=too-many-public-methods class ClusterRole(Yedit): - ''' Class to model an openshift DeploymentConfig''' + ''' Class to model an openshift ClusterRole''' rules_path = "rules" def __init__(self, name=None, content=None): -- cgit v1.2.3