remove cross-module imports

* duplicated code instead; use module_utils if code-sharing needs increase
This commit is contained in:
Matt Davis 2018-10-11 16:37:07 -07:00 committed by Matt Clay
parent 0c29463785
commit 3e18bbec34
4 changed files with 103 additions and 3 deletions

View file

@ -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