Skip to content

Commit

Permalink
Merge pull request #139 from pehala/committed
Browse files Browse the repository at this point in the history
Fix typo in OpenShiftObject.committed
  • Loading branch information
pehala authored Oct 26, 2022
2 parents d5b837f + 1b63cc3 commit b23f817
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions testsuite/openshift/objects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def _func(self):

@functools.wraps(func)
def _wrap(self, *args, **kwargs):
if self.commited:
if self.committed:
result, _ = self.modify_and_apply(_custom_partial(func, *args, **kwargs))
assert result.status
else:
Expand All @@ -31,15 +31,15 @@ class OpenShiftObject(APIObject):
"""Custom APIObjects which tracks if the object was already committed to the server or not"""
def __init__(self, dict_to_model=None, string_to_model=None, context=None):
super().__init__(dict_to_model, string_to_model, context)
self.commited = False
self.committed = False

def commit(self):
"""
Creates object on the server and returns created entity.
It will be the same class but attributes might differ, due to server adding/rejecting some of them.
"""
self.create(["--save-config=true"])
self.commited = True
self.committed = True
return self.refresh()

def delete(self, ignore_not_found=True, cmd_args=None):
Expand Down

0 comments on commit b23f817

Please sign in to comment.