Skip to content

Commit

Permalink
Enable azure_rm_iothub test case (#1641)
Browse files Browse the repository at this point in the history
* Enable azure_rm_iothub test case

* Upgrade the azure-mgmt-iothub version to 3.0.0
  • Loading branch information
Fred-sun authored Jul 22, 2024
1 parent 7983f7a commit 372d2f5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions plugins/modules/azure_rm_iothub.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@

try:
from ansible_collections.azure.azcollection.plugins.module_utils.azure_rm_common_ext import AzureRMModuleBaseExt
from azure.mgmt.iothub import models as IotHubModels
from azure.mgmt.iothub.v2023_06_30_preview import models as IotHubModels
except ImportError:
# This is handled in azure_rm_common
pass
Expand Down Expand Up @@ -966,7 +966,8 @@ def to_dict(self, hub):
result['fallback_route'] = self.route_to_dict(properties.routing.fallback_route)
result['status'] = properties.state
result['storage_endpoints'] = self.instance_dict_to_dict(properties.storage_endpoints)
result['identity'] = hub.identity.as_dict() if hub.identity else None
if hasattr(hub, 'identity'):
result['identity'] = hub.identity.as_dict() if hub.identity else None
return result


Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ azure-mgmt-hdinsight==9.0.0
azure-mgmt-devtestlabs==9.0.0
azure-mgmt-loganalytics==12.0.0
azure-mgmt-automation==1.0.0
azure-mgmt-iothub==2.2.0
azure-mgmt-iothub==3.0.0
azure-iot-hub==2.6.1;platform_machine=="x86_64"
azure-mgmt-recoveryservices==2.0.0
azure-mgmt-recoveryservicesbackup==3.0.0
Expand Down
1 change: 0 additions & 1 deletion tests/integration/targets/azure_rm_iothub/aliases
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cloud/azure
shippable/azure/group2
destructive
disabled

0 comments on commit 372d2f5

Please sign in to comment.