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

ARO-8423: fix client generation issue with new Identity field for MIWI #3639

Merged
merged 2 commits into from
Jun 18, 2024
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 .sha256sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ b1f1de0fe40d05de90742b17928968923b936adc294000f58974f50a297581dd swagger/redhat
c023515341196746454c0ae7af077d40d3ec13f6b88b33cb558f0a7ab17a5a24 swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/preview/2023-07-01-preview/redhatopenshift.json
440748951dd1c3b34b5ccbdcb7cd966e3b89490887a1f1d64429561fad789515 swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/redhatopenshift.json
74a46fdde6ceb0121fe1515c7e11e902dd921b54cffe693307fb02b3dc88f26e swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-11-22/redhatopenshift.json
f1e9d42d7c4c0081282e065e7845455db28ed6924687f1acecafb5fbc43ae0c3 swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/preview/2024-08-12-preview/redhatopenshift.json
5849bcb518f6c7a6942a7eafb1d2edd107a18ad489c823e0262aad4bc509da9f swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/preview/2024-08-12-preview/redhatopenshift.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pkg/swagger/swagger.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ func Run(api, outputDir string) error {
if property.Name == "properties" {
property.Schema.ClientFlatten = true
properties = append(properties, property)
} else if property.Name == "identity" {
properties = append(properties, property)
}
}
s.Definitions[azureResource].Properties = properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,9 @@ class OpenShiftCluster(TrackedResource):
:vartype tags: dict[str, str]
:ivar location: Required. The geo-location where the resource lives.
:vartype location: str
:ivar identity: Identity stores information about the cluster MSI(s) in a workload identity
cluster.
:vartype identity: ~azure.mgmt.redhatopenshift.v2024_08_12_preview.models.Identity
:ivar provisioning_state: The cluster provisioning state. Possible values include:
"AdminUpdating", "Canceled", "Creating", "Deleting", "Failed", "Succeeded", "Updating".
:vartype provisioning_state: str or
Expand Down Expand Up @@ -842,6 +845,7 @@ class OpenShiftCluster(TrackedResource):
'system_data': {'key': 'systemData', 'type': 'SystemData'},
'tags': {'key': 'tags', 'type': '{str}'},
'location': {'key': 'location', 'type': 'str'},
'identity': {'key': 'identity', 'type': 'Identity'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'cluster_profile': {'key': 'properties.clusterProfile', 'type': 'ClusterProfile'},
'console_profile': {'key': 'properties.consoleProfile', 'type': 'ConsoleProfile'},
Expand All @@ -864,6 +868,9 @@ def __init__(
:paramtype tags: dict[str, str]
:keyword location: Required. The geo-location where the resource lives.
:paramtype location: str
:keyword identity: Identity stores information about the cluster MSI(s) in a workload identity
cluster.
:paramtype identity: ~azure.mgmt.redhatopenshift.v2024_08_12_preview.models.Identity
:keyword provisioning_state: The cluster provisioning state. Possible values include:
"AdminUpdating", "Canceled", "Creating", "Deleting", "Failed", "Succeeded", "Updating".
:paramtype provisioning_state: str or
Expand Down Expand Up @@ -896,6 +903,7 @@ def __init__(
list[~azure.mgmt.redhatopenshift.v2024_08_12_preview.models.IngressProfile]
"""
super(OpenShiftCluster, self).__init__(**kwargs)
self.identity = kwargs.get('identity', None)
self.provisioning_state = kwargs.get('provisioning_state', None)
self.cluster_profile = kwargs.get('cluster_profile', None)
self.console_profile = kwargs.get('console_profile', None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,9 @@ class OpenShiftCluster(TrackedResource):
:vartype tags: dict[str, str]
:ivar location: Required. The geo-location where the resource lives.
:vartype location: str
:ivar identity: Identity stores information about the cluster MSI(s) in a workload identity
cluster.
:vartype identity: ~azure.mgmt.redhatopenshift.v2024_08_12_preview.models.Identity
:ivar provisioning_state: The cluster provisioning state. Possible values include:
"AdminUpdating", "Canceled", "Creating", "Deleting", "Failed", "Succeeded", "Updating".
:vartype provisioning_state: str or
Expand Down Expand Up @@ -902,6 +905,7 @@ class OpenShiftCluster(TrackedResource):
'system_data': {'key': 'systemData', 'type': 'SystemData'},
'tags': {'key': 'tags', 'type': '{str}'},
'location': {'key': 'location', 'type': 'str'},
'identity': {'key': 'identity', 'type': 'Identity'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'cluster_profile': {'key': 'properties.clusterProfile', 'type': 'ClusterProfile'},
'console_profile': {'key': 'properties.consoleProfile', 'type': 'ConsoleProfile'},
Expand All @@ -920,6 +924,7 @@ def __init__(
*,
location: str,
tags: Optional[Dict[str, str]] = None,
identity: Optional["Identity"] = None,
provisioning_state: Optional[Union[str, "ProvisioningState"]] = None,
cluster_profile: Optional["ClusterProfile"] = None,
console_profile: Optional["ConsoleProfile"] = None,
Expand All @@ -937,6 +942,9 @@ def __init__(
:paramtype tags: dict[str, str]
:keyword location: Required. The geo-location where the resource lives.
:paramtype location: str
:keyword identity: Identity stores information about the cluster MSI(s) in a workload identity
cluster.
:paramtype identity: ~azure.mgmt.redhatopenshift.v2024_08_12_preview.models.Identity
:keyword provisioning_state: The cluster provisioning state. Possible values include:
"AdminUpdating", "Canceled", "Creating", "Deleting", "Failed", "Succeeded", "Updating".
:paramtype provisioning_state: str or
Expand Down Expand Up @@ -969,6 +977,7 @@ def __init__(
list[~azure.mgmt.redhatopenshift.v2024_08_12_preview.models.IngressProfile]
"""
super(OpenShiftCluster, self).__init__(tags=tags, location=location, **kwargs)
self.identity = identity
self.provisioning_state = provisioning_state
self.cluster_profile = cluster_profile
self.console_profile = console_profile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2090,6 +2090,10 @@
"description": "The cluster properties.",
"x-ms-client-flatten": true
},
"identity": {
"$ref": "#/definitions/Identity",
"description": "Identity stores information about the cluster MSI(s) in a workload identity cluster."
},
"systemData": {
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/systemData",
"description": "The system meta data relating to this resource.",
Expand Down
Loading