Skip to content

Commit

Permalink
Update azure_rm_eventhub.py
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabh3796 authored May 27, 2021
1 parent d9106bc commit 2bc5306
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/modules/azure_rm_eventhub.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@

try:
from msrestazure.azure_exceptions import CloudError
from ansible_collections.azure.azcollection.plugins.module_utils.azure_rm_common import AzureRMModuleBase

This comment has been minimized.

Copy link
@Fred-sun

Fred-sun May 27, 2021

Collaborator

Why do you put it in a try statement?

This comment has been minimized.

Copy link
@saurabh3796

saurabh3796 May 27, 2021

Author Contributor

It got duplicated, removed it now.

from azure.mgmt.eventhub.models import Eventhub, EHNamespace
from azure.mgmt.eventhub.models.sku import Sku
except ImportError:
Expand Down Expand Up @@ -252,6 +253,9 @@ def exec_module(self, **kwargs):
elif self.namespace_name and not self.name:
if self.sku != results['sku'].lower():
changed = True
elif self.namespace_name and self.name and event_hub_results:
if self.sku != 'Basic' and self.message_retention_in_days != event_hub_results['message_retention_in_days']:
changed = True

elif self.state == 'absent':
changed = True
Expand Down

0 comments on commit 2bc5306

Please sign in to comment.