-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MGC rewritten for new API and DNSPolicy usage
- Loading branch information
Showing
11 changed files
with
255 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"""Module for DNSPolicy related classes""" | ||
from testsuite.openshift.client import OpenShiftClient | ||
from testsuite.openshift.objects import OpenShiftObject | ||
from testsuite.openshift.objects.gateway_api import Referencable | ||
|
||
|
||
class DNSPolicy(OpenShiftObject): | ||
"""DNSPolicy object""" | ||
|
||
@classmethod | ||
def create_instance( | ||
cls, | ||
openshift: OpenShiftClient, | ||
name: str, | ||
parent: Referencable, | ||
labels: dict[str, str] = None, | ||
): | ||
"""Creates new instance of DNSPolicy""" | ||
|
||
model = { | ||
"apiVersion": "kuadrant.io/v1alpha1", | ||
"kind": "DNSPolicy", | ||
"metadata": {"name": name, "labels": labels}, | ||
"spec": {"targetRef": parent.reference}, | ||
} | ||
|
||
return cls(model, context=openshift.context) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.