mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-31 05:19:09 -07:00
remove cross-module imports
* duplicated code instead; use module_utils if code-sharing needs increase
This commit is contained in:
parent
0c29463785
commit
3e18bbec34
4 changed files with 103 additions and 3 deletions
|
@ -326,6 +326,7 @@ state:
|
|||
''' # NOQA
|
||||
|
||||
from ansible.module_utils.azure_rm_common import AzureRMModuleBase, format_resource_id
|
||||
from ansible.module_utils._text import to_native
|
||||
from datetime import timedelta
|
||||
|
||||
try:
|
||||
|
@ -333,12 +334,12 @@ try:
|
|||
from msrestazure.azure_exceptions import CloudError
|
||||
from azure.mgmt.monitor.models import WebhookNotification, EmailNotification, AutoscaleNotification, RecurrentSchedule, MetricTrigger, \
|
||||
ScaleAction, AutoscaleSettingResource, AutoscaleProfile, ScaleCapacity, TimeWindow, Recurrence, ScaleRule
|
||||
from ansible.module_utils._text import to_native
|
||||
except ImportError:
|
||||
# This is handled in azure_rm_common
|
||||
pass
|
||||
|
||||
|
||||
# duplicated in azure_rm_autoscale_facts
|
||||
def timedelta_to_minutes(time):
|
||||
if not time:
|
||||
return 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue