Sanity fixes to parameter types (#52325)

This commit is contained in:
Dag Wieers 2019-02-15 16:58:58 +01:00 committed by GitHub
commit 677c04c01d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 445 additions and 404 deletions

View file

@ -1,23 +1,7 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Cisco and/or its affiliates.
#
# 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/>.
#
# Copyright: (c) 2017, Cisco and/or its affiliates.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from ansible.module_utils.basic import env_fallback
from ansible.module_utils.urls import open_url
@ -35,10 +19,10 @@ except NameError:
nso_argument_spec = dict(
url=dict(required=True),
username=dict(fallback=(env_fallback, ['ANSIBLE_NET_USERNAME']), required=True),
password=dict(fallback=(env_fallback, ['ANSIBLE_NET_PASSWORD']), required=True, no_log=True),
timeout=dict(default=300, type=int)
url=dict(type='str', required=True),
username=dict(type='str', required=True, fallback=(env_fallback, ['ANSIBLE_NET_USERNAME'])),
password=dict(type='str', required=True, no_log=True, fallback=(env_fallback, ['ANSIBLE_NET_PASSWORD'])),
timeout=dict(type='int', default=300),
)