Skip to content

Commit

Permalink
Extend OpenShiftObject class with LifecycleObject
Browse files Browse the repository at this point in the history
  • Loading branch information
jsmolar committed Nov 10, 2023
1 parent a29bf81 commit 605bfdb
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 605bfdb

Please sign in to comment.