Skip to content

Commit

Permalink
Merge pull request #273 from jsmolar/lifecycle_fix
Browse files Browse the repository at this point in the history
Extend OpenShiftObject class with LifecycleObject
  • Loading branch information
pehala authored Nov 13, 2023
2 parents 2904571 + 605bfdb commit 796b2aa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion testsuite/objects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def delete(self):


class Authorino(LifecycleObject):
"""Authorino instance"""
"""Authorino interface"""

@abc.abstractmethod
def wait_for_ready(self):
Expand Down
4 changes: 3 additions & 1 deletion testsuite/openshift/objects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

from openshift import APIObject

from testsuite.objects import LifecycleObject


def modify(func):
"""Wraps method of a subclass of OpenShiftObject to use modify_and_apply when the object
Expand All @@ -28,7 +30,7 @@ def _wrap(self, *args, **kwargs):
return _wrap


class OpenShiftObject(APIObject):
class OpenShiftObject(APIObject, LifecycleObject):
"""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):
Expand Down
3 changes: 1 addition & 2 deletions testsuite/openshift/objects/ingress.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
"""Kubernetes Ingress object"""
from typing import Any, Dict, List, Optional, TYPE_CHECKING

from testsuite.objects import LifecycleObject
from testsuite.openshift.objects import OpenShiftObject

if TYPE_CHECKING:
# pylint: disable=cyclic-import
from testsuite.openshift.client import OpenShiftClient


class Ingress(OpenShiftObject, LifecycleObject):
class Ingress(OpenShiftObject):
"""Represents Kubernetes Ingress object"""

@classmethod
Expand Down

0 comments on commit 796b2aa

Please sign in to comment.