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

Extend OpenShiftObject class with LifecycleObject #273

Merged
merged 1 commit into from
Nov 13, 2023
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
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