Skip to content

Commit f6e5b56

Browse files
authored
feat: Add SecureSign resource (#2650)
1 parent 2e98482 commit f6e5b56

2 files changed

Lines changed: 77 additions & 0 deletions

File tree

ocp_resources/resource.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,7 @@ class ApiGroup:
552552
QUOTA_OPENSHIFT_IO: str = "quota.openshift.io"
553553
RBAC_AUTHORIZATION_K8S_IO: str = "rbac.authorization.k8s.io"
554554
REMEDIATION_MEDIK8S_IO: str = "remediation.medik8s.io"
555+
RHTAS_REDHAT_COM: str = "rhtas.redhat.com"
555556
RIPSAW_CLOUDBULLDOZER_IO: str = "ripsaw.cloudbulldozer.io"
556557
ROUTE_OPENSHIFT_IO: str = "route.openshift.io"
557558
SAMPLES_OPERATOR_OPENSHIFT_IO: str = "samples.operator.openshift.io"

ocp_resources/securesign.py

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Generated using https://github.com/RedHatQE/openshift-python-wrapper/blob/main/scripts/resource/README.md
2+
3+
4+
from typing import Any
5+
6+
from ocp_resources.resource import NamespacedResource
7+
8+
9+
class Securesign(NamespacedResource):
10+
"""
11+
Securesign is the Schema for the securesigns API
12+
"""
13+
14+
api_group: str = NamespacedResource.ApiGroup.RHTAS_REDHAT_COM
15+
16+
def __init__(
17+
self,
18+
ctlog: dict[str, Any] | None = None,
19+
fulcio: dict[str, Any] | None = None,
20+
rekor: dict[str, Any] | None = None,
21+
trillian: dict[str, Any] | None = None,
22+
tsa: dict[str, Any] | None = None,
23+
tuf: dict[str, Any] | None = None,
24+
**kwargs: Any,
25+
) -> None:
26+
r"""
27+
Args:
28+
ctlog (dict[str, Any]): CTlogSpec defines the desired state of CTlog component
29+
30+
fulcio (dict[str, Any]): FulcioSpec defines the desired state of Fulcio
31+
32+
rekor (dict[str, Any]): RekorSpec defines the desired state of Rekor
33+
34+
trillian (dict[str, Any]): TrillianSpec defines the desired state of Trillian
35+
36+
tsa (dict[str, Any]): TimestampAuthoritySpec defines the desired state of TimestampAuthority
37+
38+
tuf (dict[str, Any]): TufSpec defines the desired state of Tuf
39+
40+
"""
41+
super().__init__(**kwargs)
42+
43+
self.ctlog = ctlog
44+
self.fulcio = fulcio
45+
self.rekor = rekor
46+
self.trillian = trillian
47+
self.tsa = tsa
48+
self.tuf = tuf
49+
50+
def to_dict(self) -> None:
51+
52+
super().to_dict()
53+
54+
if not self.kind_dict and not self.yaml_file:
55+
self.res["spec"] = {}
56+
_spec = self.res["spec"]
57+
58+
if self.ctlog is not None:
59+
_spec["ctlog"] = self.ctlog
60+
61+
if self.fulcio is not None:
62+
_spec["fulcio"] = self.fulcio
63+
64+
if self.rekor is not None:
65+
_spec["rekor"] = self.rekor
66+
67+
if self.trillian is not None:
68+
_spec["trillian"] = self.trillian
69+
70+
if self.tsa is not None:
71+
_spec["tsa"] = self.tsa
72+
73+
if self.tuf is not None:
74+
_spec["tuf"] = self.tuf
75+
76+
# End of generated code

0 commit comments

Comments
 (0)