Skip to content

Commit

Permalink
Add aliase for container parameters (ansible-collections#1763)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred-sun authored Nov 20, 2024
1 parent 9b6e393 commit 29900d4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions plugins/modules/azure_rm_iothub.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,12 @@
- The connection string should have send privilege.
type: str
required: yes
container:
container_name:
description:
- Container name of the custom endpoint when I(resource_type=storage).
type: str
aliases:
- container
encoding:
description:
- Encoding of the message when I(resource_type=storage).
Expand Down Expand Up @@ -533,7 +535,7 @@
resource_group=dict(type='str'),
subscription=dict(type='str'),
resource_type=dict(type='str', required=True, choices=['eventhub', 'queue', 'storage', 'topic']),
container=dict(type='str'),
container_name=dict(type='str', aliases=['container']),
encoding=dict(type='str')
)

Expand Down Expand Up @@ -805,7 +807,7 @@ def lookup_endpoint(self, target, routing_endpoints):
if not re.search(connection_string_regex, target['connection_string']):
return False
if resource_type == 'storage':
if target.get('container') and item.container_name != target['container']:
if target.get('container_name') and item.container_name != target['container_name']:
return False
if target.get('encoding') and item.encoding != target['encoding']:
return False
Expand Down

0 comments on commit 29900d4

Please sign in to comment.