Fix sanity checks (#62782)

This PR fixes all new ACI sanity issues.
pull/62786/head
Dag Wieers 5 years ago committed by ansibot
parent d4ec9422a3
commit 7fa1e4f70f

@ -3,6 +3,9 @@
# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from copy import deepcopy
from ansible.module_utils.basic import AnsibleModule, json
from ansible.module_utils.six import PY3

@ -40,6 +40,7 @@ options:
leaf_port_blk_description:
description:
- The description to assign to the C(leaf_port_blk).
type: str
from_port:
description:
- The beginning (from-range) of the port range block for the leaf access port block.

@ -46,6 +46,7 @@ options:
leaf_port_blk_description:
description:
- The description to assign to the C(leaf_port_blk).
type: str
from_port:
description:
- The beginning (from-range) of the port range block for the leaf access port block.

@ -354,9 +354,6 @@ def main():
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
vrf=dict(type='str', aliases=['vrf_name']),
gateway_ip=dict(type='str', removed_in_version='2.4'), # Deprecated starting from v2.4
scope=dict(type='str', removed_in_version='2.4'), # Deprecated starting from v2.4
subnet_mask=dict(type='str', removed_in_version='2.4'), # Deprecated starting from v2.4
)
module = AnsibleModule(
@ -398,11 +395,6 @@ def main():
tenant = module.params['tenant']
vrf = module.params['vrf']
# Give warning when fvSubnet parameters are passed as those have been moved to the aci_subnet module
if module.params['gateway_ip'] or module.params['subnet_mask'] or module.params['scope']:
module._warnings = ["The support for managing Subnets has been moved to its own module, aci_subnet. \
The new modules still supports 'gateway_ip' and 'subnet_mask' along with more features"]
aci.construct_url(
root_class=dict(
aci_class='fvTenant',

@ -271,8 +271,6 @@ def main():
consumer_match=dict(type='str', choices=['all', 'at_least_one', 'at_most_one', 'none']),
provider_match=dict(type='str', choices=['all', 'at_least_one', 'at_most_one', 'none']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
directive=dict(type='str', removed_in_version='2.4'), # Deprecated starting from v2.4
filter=dict(type='str', aliases=['filter_name'], removed_in_version='2.4'), # Deprecated starting from v2.4
)
module = AnsibleModule(
@ -293,7 +291,6 @@ def main():
dscp = module.params['dscp']
description = module.params['description']
filter_name = module.params['filter']
directive = module.params['directive']
consumer_match = module.params['consumer_match']
if consumer_match is not None:
consumer_match = MATCH_MAPPING[consumer_match]
@ -303,9 +300,6 @@ def main():
state = module.params['state']
tenant = module.params['tenant']
if directive is not None or filter_name is not None:
module.fail_json(msg="Managing Contract Subjects to Filter bindings has been moved to module 'aci_subject_bind_filter'")
aci.construct_url(
root_class=dict(
aci_class='fvTenant',

@ -27,11 +27,13 @@ options:
name:
description:
- The name of the Scheduler.
type: str
required: yes
aliases: [ name, scheduler_name ]
description:
description:
- Description for the Scheduler.
type: str
aliases: [ descr ]
recurring:
description:
@ -43,6 +45,7 @@ options:
windowname:
description:
- This is the name for your what recurring or oneTime execution
type: str
concurCap:
description:
- This is the amount of devices that can be executed on at a time
@ -50,24 +53,30 @@ options:
maxTime:
description:
- This is the amount MAX amount of time a process can be executed
type: str
date:
description:
- This is the date and time that the scheduler will execute
type: str
hour:
description:
- This set the hour of execution
type: int
minute:
description:
- This sets the minute of execution, used in conjunction with hour
type: int
day:
description:
- This sets the day when execution will take place
type: str
default: "every-day"
choices: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday','Sunday', 'even-day', 'odd-day', 'every-day']
state:
description:
- Use C(present) or C(absent) for adding or removing.
- Use C(query) for listing an object or multiple objects.
type: str
default: present
choices: [ absent, present, query ]

@ -25,16 +25,18 @@ options:
group:
description:
- This the name of the firmware group
type: str
required: true
firmwarepol:
description:
- This is the name of the firmware policy, which was create by aci_firmware_policy. It is important that
- you use the same name as the policy created with aci_firmware_policy
required: false
type: str
state:
description:
- Use C(present) or C(absent) for adding or removing.
- Use C(query) for listing an object or multiple objects.
type: str
default: present
choices: [ absent, present, query ]

@ -27,15 +27,18 @@ options:
group:
description:
- This is the name of the firmware group
type: str
required: true
node:
description:
- The node to be added to the firmware group - the value equals the NodeID
type: str
required: true
state:
description:
- Use C(present) or C(absent) for adding or removing.
- Use C(query) for listing an object or multiple objects.
type: str
default: present
choices: [ absent, present, query ]

@ -29,6 +29,7 @@ options:
name:
description:
- Name of the firmware policy
type: str
required: true
version:
description:
@ -36,17 +37,19 @@ options:
- it correctly. The syntax for this field is n9000-xx.x. If you look at the firmware repository using the UI
- each version will have a "Full Version" column, this is the value you need to use. So, if the Full Version
- is 13.1(1i), the value for this field would be n9000-13.1(1i)
type: str
required: true
ignoreCompat:
description:
- Check if compatibility checks should be ignored
required: false
type: bool
state:
description:
- Use C(present) or C(absent) for adding or removing.
- Use C(query) for listing an object or multiple objects.
type: str
choices: [absent, present, query]
default: present
choices: ['absent', 'present', 'query']
extends_documentation_fragment:
- aci
@ -184,7 +187,7 @@ def main():
argument_spec.update(
name=dict(type='str', aliases=['name']), # Not required for querying all objects
version=dict(type='str', aliases=['version']),
ignoreCompat=dict(type=bool),
ignoreCompat=dict(type='bool'),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
)

@ -24,17 +24,20 @@ options:
group:
description:
- This is the name of the group
type: str
required: true
policy:
description:
- This is the name of the policy that was created using aci_maintenance_policy
type: str
required: true
state:
description:
- Use C(present) or C(absent) for adding or removing.
- Use C(query) for listing an object or multiple objects.
type: str
choices: [absent, present, query]
default: present
choices: ['absent', 'present', 'query']
extends_documentation_fragment:
- aci
author:

@ -22,18 +22,21 @@ options:
group:
description:
- The maintenance group name that you want to add the node to.
type: str
required: true
node:
description:
- The node to be added to the maintenance group.
- The value equals the nodeid.
type: str
required: true
state:
description:
- Use C(present) or C(absent) for adding or removing.
- Use C(query) for listing an object or multiple objects.
default: present
type: str
choices: [ absent, present, query ]
default: present
extends_documentation_fragment:
- aci
author:

@ -23,12 +23,14 @@ options:
name:
description:
- The name for the maintenance policy.
type: str
required: true
aliases: [ maintenance_policy ]
runmode:
description:
- Whether the system pauses on error or just continues through it.
choices: ['pauseOnlyOnFailures', 'pauseNever']
type: str
choices: [ pauseOnlyOnFailures, pauseNever ]
default: pauseOnlyOnFailures
graceful:
description:
@ -43,6 +45,7 @@ options:
adminst:
description:
- Will trigger an immediate upgrade for nodes if adminst is set to triggered.
type: str
choices: [ triggered, untriggered ]
default: untriggered
ignoreCompat:
@ -54,6 +57,7 @@ options:
description:
- Use C(present) or C(absent) for adding or removing.
- Use C(query) for listing an object or multiple objects.
type: str
choices: [ absent, present, query ]
default: present
extends_documentation_fragment:

@ -93,11 +93,12 @@ options:
- The subnets associated to this ANP.
type: list
suboptions:
ip:
subnet:
description:
- The IP range in CIDR notation.
type: str
required: true
aliases: [ ip ]
description:
description:
- The description of this subnet.

@ -48,7 +48,7 @@ options:
suboptions:
name:
description:
- The name of the COntract to associate with.
- The name of the Contract to associate with.
required: true
type: str
schema:

@ -50,16 +50,27 @@ options:
- The name of the VRF to associate with.
required: true
type: str
schema:
description:
- The schema that defines the referenced VRF.
- If this parameter is unspecified, it defaults to the current schema.
type: str
template:
description:
- The template that defines the referenced VRF.
- If this parameter is unspecified, it defaults to the current template.
type: str
subnets:
description:
- The subnets associated to this BD.
type: list
suboptions:
ip:
subnet:
description:
- The IP range in CIDR notation.
type: str
required: true
aliases: [ ip ]
description:
description:
- The description of this subnet.

@ -44,6 +44,22 @@ options:
description:
- The VRF associated to this ANP.
type: dict
suboptions:
name:
description:
- The name of the VRF to associate with.
required: true
type: str
schema:
description:
- The schema that defines the referenced VRF.
- If this parameter is unspecified, it defaults to the current schema.
type: str
template:
description:
- The template that defines the referenced VRF.
- If this parameter is unspecified, it defaults to the current template.
type: str
state:
description:
- Use C(present) or C(absent) for adding or removing.

@ -44,6 +44,22 @@ options:
description:
- The VRF associated to this L3out.
type: dict
suboptions:
name:
description:
- The name of the VRF to associate with.
required: true
type: str
schema:
description:
- The schema that defines the referenced VRF.
- If this parameter is unspecified, it defaults to the current schema.
type: str
template:
description:
- The template that defines the referenced VRF.
- If this parameter is unspecified, it defaults to the current schema.
type: str
state:
description:
- Use C(present) or C(absent) for adding or removing.

@ -51,6 +51,7 @@ options:
location:
description:
- Location of the site.
type: dict
suboptions:
latitude:
description:

@ -4,6 +4,9 @@
# Copyright: (c) 2017, Swetha Chunduri (@schunduri)
# 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
class ModuleDocFragment(object):
# Standard files documentation fragment

@ -3,6 +3,9 @@
# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
# 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
class ModuleDocFragment(object):
# Standard files documentation fragment

@ -280,8 +280,6 @@ lib/ansible/module_utils/netapp_module.py future-import-boilerplate
lib/ansible/module_utils/netapp_module.py metaclass-boilerplate
lib/ansible/module_utils/network/a10/a10.py future-import-boilerplate
lib/ansible/module_utils/network/a10/a10.py metaclass-boilerplate
lib/ansible/module_utils/network/aci/mso.py future-import-boilerplate
lib/ansible/module_utils/network/aci/mso.py metaclass-boilerplate
lib/ansible/module_utils/network/aireos/aireos.py future-import-boilerplate
lib/ansible/module_utils/network/aireos/aireos.py metaclass-boilerplate
lib/ansible/module_utils/network/aos/aos.py future-import-boilerplate
@ -2499,28 +2497,6 @@ lib/ansible/modules/network/a10/a10_server_axapi3.py validate-modules:parameter-
lib/ansible/modules/network/a10/a10_service_group.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/network/a10/a10_virtual_server.py validate-modules:doc-default-does-not-match-spec
lib/ansible/modules/network/a10/a10_virtual_server.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/network/aci/aci_access_port_block_to_access_port.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/network/aci/aci_access_sub_port_block_to_access_port.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/network/aci/aci_bd.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/network/aci/aci_contract_subject.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/network/aci/aci_fabric_scheduler.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/network/aci/aci_firmware_group.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/network/aci/aci_firmware_group_node.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/network/aci/aci_firmware_policy.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/network/aci/aci_maintenance_group.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/network/aci/aci_maintenance_group_node.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/network/aci/aci_maintenance_policy.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/network/aci/mso_schema_template_anp_epg.py validate-modules:undocumented-parameter
lib/ansible/modules/network/aci/mso_schema_template_anp_epg.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/network/aci/mso_schema_template_bd.py validate-modules:undocumented-parameter
lib/ansible/modules/network/aci/mso_schema_template_bd.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/network/aci/mso_schema_template_externalepg.py validate-modules:undocumented-parameter
lib/ansible/modules/network/aci/mso_schema_template_externalepg.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/network/aci/mso_schema_template_externalepg.py validate-modules:missing-suboption-docs
lib/ansible/modules/network/aci/mso_schema_template_l3out.py validate-modules:undocumented-parameter
lib/ansible/modules/network/aci/mso_schema_template_l3out.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/network/aci/mso_schema_template_l3out.py validate-modules:missing-suboption-docs
lib/ansible/modules/network/aci/mso_site.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/network/aireos/aireos_command.py validate-modules:doc-default-does-not-match-spec
lib/ansible/modules/network/aireos/aireos_command.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/network/aireos/aireos_command.py validate-modules:doc-missing-type
@ -5709,8 +5685,6 @@ lib/ansible/plugins/callback/hipchat.py pylint:blacklisted-name
lib/ansible/plugins/connection/lxc.py pylint:blacklisted-name
lib/ansible/plugins/doc_fragments/a10.py future-import-boilerplate
lib/ansible/plugins/doc_fragments/a10.py metaclass-boilerplate
lib/ansible/plugins/doc_fragments/aci.py future-import-boilerplate
lib/ansible/plugins/doc_fragments/aci.py metaclass-boilerplate
lib/ansible/plugins/doc_fragments/aireos.py future-import-boilerplate
lib/ansible/plugins/doc_fragments/aireos.py metaclass-boilerplate
lib/ansible/plugins/doc_fragments/alicloud.py future-import-boilerplate
@ -5835,8 +5809,6 @@ lib/ansible/plugins/doc_fragments/manageiq.py future-import-boilerplate
lib/ansible/plugins/doc_fragments/manageiq.py metaclass-boilerplate
lib/ansible/plugins/doc_fragments/meraki.py future-import-boilerplate
lib/ansible/plugins/doc_fragments/meraki.py metaclass-boilerplate
lib/ansible/plugins/doc_fragments/mso.py future-import-boilerplate
lib/ansible/plugins/doc_fragments/mso.py metaclass-boilerplate
lib/ansible/plugins/doc_fragments/mysql.py future-import-boilerplate
lib/ansible/plugins/doc_fragments/mysql.py metaclass-boilerplate
lib/ansible/plugins/doc_fragments/netapp.py future-import-boilerplate
@ -6156,8 +6128,6 @@ test/units/module_utils/hwc/test_hwc_utils.py metaclass-boilerplate
test/units/module_utils/json_utils/test_filter_non_json_lines.py future-import-boilerplate
test/units/module_utils/net_tools/test_netbox.py future-import-boilerplate
test/units/module_utils/net_tools/test_netbox.py metaclass-boilerplate
test/units/module_utils/network/aci/test_aci.py future-import-boilerplate
test/units/module_utils/network/aci/test_aci.py metaclass-boilerplate
test/units/module_utils/network/avi/test_avi_api_utils.py future-import-boilerplate
test/units/module_utils/network/avi/test_avi_api_utils.py metaclass-boilerplate
test/units/module_utils/network/ftd/test_common.py future-import-boilerplate

@ -1,22 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Dag Wieers <dag@wieers.com>
# This file is part of Ansible by Red Hat
#
# 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/>.
# Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com>
# 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
import sys

Loading…
Cancel
Save