-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update resource useing generator script 2 (#1999)
* Update kubevirt, machine resources. Fix class generator parsing * Update kubevirt, machine resources. Fix class generator parsing * Fix parser * Fix parser * Add TODO, * Address comments * supprt create resource without spec or fields, add test for such * move to own directory under root of the project * when run with --add-tests, run the tests * when run with --add-tests, run the tests * Address comments * Address comments
- Loading branch information
Showing
25 changed files
with
662 additions
and
148 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
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
class_generator/tests/manifests/cluster_operator/cluster_operator_debug.json
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,4 @@ | ||
{ | ||
"explain": "GROUP: config.openshift.io\nKIND: ClusterOperator\nVERSION: v1\n\nDESCRIPTION:\n ClusterOperator is the Custom Resource object which holds the current state\n of an operator. This object is used by operators to convey their state to\n the rest of the cluster. \n Compatibility level 1: Stable within a major release for a minimum of 12\n months or 3 minor releases (whichever is longer).\n \nFIELDS:\n apiVersion\t<string>\n kind\t<string>\n metadata\t<ObjectMeta>\n annotations\t<map[string]string>\n creationTimestamp\t<string>\n deletionGracePeriodSeconds\t<integer>\n deletionTimestamp\t<string>\n finalizers\t<[]string>\n generateName\t<string>\n generation\t<integer>\n labels\t<map[string]string>\n managedFields\t<[]ManagedFieldsEntry>\n apiVersion\t<string>\n fieldsType\t<string>\n fieldsV1\t<FieldsV1>\n manager\t<string>\n operation\t<string>\n subresource\t<string>\n time\t<string>\n name\t<string>\n namespace\t<string>\n ownerReferences\t<[]OwnerReference>\n apiVersion\t<string> -required-\n blockOwnerDeletion\t<boolean>\n controller\t<boolean>\n kind\t<string> -required-\n name\t<string> -required-\n uid\t<string> -required-\n resourceVersion\t<string>\n selfLink\t<string>\n uid\t<string>\n spec\t<Object> -required-\n status\t<Object>\n conditions\t<[]Object>\n lastTransitionTime\t<string> -required-\n message\t<string>\n reason\t<string>\n status\t<string> -required-\n type\t<string> -required-\n extension\t<Object>\n relatedObjects\t<[]Object>\n group\t<string> -required-\n name\t<string> -required-\n namespace\t<string>\n resource\t<string> -required-\n versions\t<[]Object>\n name\t<string> -required-\n version\t<string> -required-\n\n", | ||
"namespace": "0\n" | ||
} |
22 changes: 22 additions & 0 deletions
22
class_generator/tests/manifests/cluster_operator/cluster_operator_res.py
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,22 @@ | ||
# Generated using https://github.com/RedHatQE/openshift-python-wrapper/blob/main/scripts/resource/README.md | ||
|
||
from typing import Any | ||
from ocp_resources.resource import Resource | ||
|
||
|
||
class ClusterOperator(Resource): | ||
""" | ||
ClusterOperator is the Custom Resource object which holds the current state | ||
of an operator. This object is used by operators to convey their state to | ||
the rest of the cluster. | ||
Compatibility level 1: Stable within a major release for a minimum of 12 | ||
months or 3 minor releases (whichever is longer). | ||
""" | ||
|
||
api_group: str = Resource.ApiGroup.CONFIG_OPENSHIFT_IO | ||
|
||
def __init__( | ||
self, | ||
**kwargs: Any, | ||
) -> None: | ||
super().__init__(**kwargs) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
2 changes: 1 addition & 1 deletion
2
...resource/tests/test_camelcase_to_snake.py → ...enerator/tests/test_camelcase_to_snake.py
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.