From 67b455a8ac1ac6fcf4e45bb3101b162607ce26c8 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Tue, 15 Jan 2019 12:24:34 +0100 Subject: [PATCH] Update documentation notes, copyright and license (#50927) --- lib/ansible/module_utils/network/aci/msc.py | 34 +++---------------- lib/ansible/modules/network/aci/msc_label.py | 1 + lib/ansible/modules/network/aci/msc_role.py | 1 + lib/ansible/modules/network/aci/msc_site.py | 1 + lib/ansible/modules/network/aci/msc_tenant.py | 1 + lib/ansible/modules/network/aci/msc_user.py | 1 + .../utils/module_docs_fragments/msc.py | 7 ++-- 7 files changed, 14 insertions(+), 32 deletions(-) diff --git a/lib/ansible/module_utils/network/aci/msc.py b/lib/ansible/module_utils/network/aci/msc.py index a13bea86708..b64c1702191 100644 --- a/lib/ansible/module_utils/network/aci/msc.py +++ b/lib/ansible/module_utils/network/aci/msc.py @@ -1,40 +1,14 @@ # -*- coding: utf-8 -*- -# This code is part of Ansible, but is an independent component - -# This particular file snippet, and this file snippet only, is BSD licensed. -# Modules you write using this snippet, which is embedded dynamically by Ansible -# still belong to the author of the module, and may assign their own license -# to the complete work. - -# Copyright: (c) 2018, Dag Wieers -# All rights reserved. - -# Redistribution and use in source and binary forms, with or without modification, -# are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# Copyright: (c) 2018, Dag Wieers (@dagwieers) +# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from copy import deepcopy from ansible.module_utils.basic import AnsibleModule, json from ansible.module_utils.six import PY3 from ansible.module_utils.six.moves.urllib.parse import urlencode, urljoin from ansible.module_utils.urls import fetch_url -from ansible.module_utils._text import to_native, to_bytes +from ansible.module_utils._text import to_bytes, to_native if PY3: @@ -105,7 +79,7 @@ def msc_argument_spec(): port=dict(type='int', required=False), username=dict(type='str', default='admin'), password=dict(type='str', required=True, no_log=True), - output_level=dict(type='str', default='normal', choices=['normal', 'info', 'debug']), + output_level=dict(type='str', default='normal', choices=['debug', 'info', 'normal']), timeout=dict(type='int', default=30), use_proxy=dict(type='bool', default=True), use_ssl=dict(type='bool', default=True), diff --git a/lib/ansible/modules/network/aci/msc_label.py b/lib/ansible/modules/network/aci/msc_label.py index 6d6280347b3..a8f3ee4b395 100644 --- a/lib/ansible/modules/network/aci/msc_label.py +++ b/lib/ansible/modules/network/aci/msc_label.py @@ -1,6 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# Copyright: (c) 2018, Dag Wieers (@dagwieers) # 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 diff --git a/lib/ansible/modules/network/aci/msc_role.py b/lib/ansible/modules/network/aci/msc_role.py index 61cb667a2f1..a90117e469d 100644 --- a/lib/ansible/modules/network/aci/msc_role.py +++ b/lib/ansible/modules/network/aci/msc_role.py @@ -1,6 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# Copyright: (c) 2018, Dag Wieers (@dagwieers) # 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 diff --git a/lib/ansible/modules/network/aci/msc_site.py b/lib/ansible/modules/network/aci/msc_site.py index d090b4735a5..c66e66f79c6 100644 --- a/lib/ansible/modules/network/aci/msc_site.py +++ b/lib/ansible/modules/network/aci/msc_site.py @@ -1,6 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# Copyright: (c) 2018, Dag Wieers (@dagwieers) # 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 diff --git a/lib/ansible/modules/network/aci/msc_tenant.py b/lib/ansible/modules/network/aci/msc_tenant.py index 64b9bae83f9..b9179e0748c 100644 --- a/lib/ansible/modules/network/aci/msc_tenant.py +++ b/lib/ansible/modules/network/aci/msc_tenant.py @@ -1,6 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# Copyright: (c) 2018, Dag Wieers (@dagwieers) # 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 diff --git a/lib/ansible/modules/network/aci/msc_user.py b/lib/ansible/modules/network/aci/msc_user.py index 1cd53f006b9..78aa2e19b77 100644 --- a/lib/ansible/modules/network/aci/msc_user.py +++ b/lib/ansible/modules/network/aci/msc_user.py @@ -1,6 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# Copyright: (c) 2018, Dag Wieers (@dagwieers) # 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 diff --git a/lib/ansible/utils/module_docs_fragments/msc.py b/lib/ansible/utils/module_docs_fragments/msc.py index 8b32615dbde..8add92c8c5e 100644 --- a/lib/ansible/utils/module_docs_fragments/msc.py +++ b/lib/ansible/utils/module_docs_fragments/msc.py @@ -10,13 +10,13 @@ class ModuleDocFragment(object): options: host: description: - - IP Address or hostname of ACI Multi-Site host. + - IP Address or hostname of the ACI Multi Site Orchestrator host. type: str required: yes aliases: [ hostname ] port: description: - - Port number to be used for REST connection. + - Port number to be used for the REST connection. - The default value depends on parameter `use_ssl`. type: int username: @@ -60,6 +60,9 @@ options: - This should only set to C(no) when used on personally controlled sites using self-signed certificates. type: bool default: yes +requirements: +- Multi Site Orchestrator v2.1 or newer notes: - Please read the :ref:`aci_guide` for more detailed information on how to manage your ACI infrastructure using Ansible. +- This module was written to support ACI Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions. '''