Skip to content

Commit

Permalink
Fixed an error in formatting the return value (#1503)
Browse files Browse the repository at this point in the history
* Fixed an error in formatting the return value

* fix sanity error
  • Loading branch information
Fred-sun authored Mar 21, 2024
1 parent bc101bc commit 038fdef
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion plugins/modules/azure_rm_servicebus_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,14 +378,32 @@
"type": "Microsoft.ServiceBus/Namespaces/Queues/AuthorizationRules"
}
}
private_endpoint_connections:
description:
- Properties of the PrivateEndpointConnection.
type: list
returned: always
sample: [{
"id": "/subscriptions/xxxxxx/resourceGroups/myRG/providers/Microsoft.ServiceBus/namespaces/fredVM/privateEndpointConnections/xxxxxxxx",
"name": "xxxxxx",
"private_endpoint": {
"id": "/subscriptions/xxxxx/resourceGroups/myRG/providers/Microsoft.Network/privateEndpoints/fredprivateendpoint"
},
"private_link_service_connection_state": {
"description": "Auto-Approved",
"status": "Approved"
},
"provisioning_state": "Succeeded",
"type": "Microsoft.ServiceBus/Namespaces/PrivateEndpointConnections"
}]
'''

try:
from ansible_collections.azure.azcollection.plugins.module_utils.azure_rm_common import AzureRMModuleBase
except Exception:
# This is handled in azure_rm_common
pass

from ansible.module_utils.common.dict_transformations import _camel_to_snake
from ansible.module_utils._text import to_native
from datetime import datetime, timedelta
Expand Down Expand Up @@ -484,6 +502,8 @@ def instance_to_dict(self, instance):
result[attribute] = to_native(value)
elif attribute == 'max_size_in_megabytes':
result['max_size_in_mb'] = value
elif attribute == 'private_endpoint_connections':
result['private_endpoint_connections'] = [item.as_dict() for item in value]
else:
result[attribute] = value
if self.show_sas_policies and self.type != 'subscription':
Expand Down

0 comments on commit 038fdef

Please sign in to comment.