Update conventions in azure modules

* Remove wildcard imports
* Update GPL header to the one-line form
* Add from __future__ imports
This commit is contained in:
Toshio Kuratomi 2017-07-27 02:22:17 -07:00
parent 3a2670e0fd
commit 30a688d8d3
19 changed files with 137 additions and 365 deletions

View file

@ -3,21 +3,11 @@
# Copyright (c) 2016 Matt Davis, <mdavis@ansible.com>
# Chris Houseknecht, <house@redhat.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.0',
'status': ['preview'],
@ -226,9 +216,6 @@ state:
}
'''
from ansible.module_utils.basic import *
from ansible.module_utils.azure_rm_common import *
try:
from msrestazure.azure_exceptions import CloudError
from azure.mgmt.network.models import NetworkInterface, NetworkInterfaceIPConfiguration, Subnet, \
@ -237,6 +224,7 @@ except ImportError:
# This is handled in azure_rm_common
pass
from ansible.module_utils.azure_rm_common import AzureRMModuleBase, azure_id_to_dict
def nic_to_dict(nic):
@ -577,6 +565,6 @@ class AzureRMNetworkInterface(AzureRMModuleBase):
def main():
AzureRMNetworkInterface()
if __name__ == '__main__':
main()