rabbitmq: Clean up parameter types (#52525)

This PR includes:
- Parameter types added
- Copyright format fixes
- Short license statement

This breaks out PR #52182
pull/52558/head
Dag Wieers 6 years ago committed by John R Barker
parent 41e2bd1df5
commit e7df487a6c

@ -27,15 +27,15 @@ except ImportError:
def rabbitmq_argument_spec(): def rabbitmq_argument_spec():
return dict( return dict(
login_user=dict(default='guest', type='str'), login_user=dict(type='str', default='guest'),
login_password=dict(default='guest', type='str', no_log=True), login_password=dict(type='str', default='guest', no_log=True),
login_host=dict(default='localhost', type='str'), login_host=dict(type='str', default='localhost'),
login_port=dict(default='15672', type='str'), login_port=dict(type='str', default='15672'),
login_protocol=dict(default='http', choices=['http', 'https'], type='str'), login_protocol=dict(type='str', default='http', choices=['http', 'https']),
cacert=dict(required=False, type='path', default=None), cacert=dict(type='path'),
cert=dict(required=False, type='path', default=None), cert=dict(type='path'),
key=dict(required=False, type='path', default=None), key=dict(type='path'),
vhost=dict(default='/', type='str'), vhost=dict(type='str', default='/'),
) )
@ -77,14 +77,14 @@ class RabbitClient():
@staticmethod @staticmethod
def rabbitmq_argument_spec(): def rabbitmq_argument_spec():
return dict( return dict(
url=dict(default=None, type='str'), url=dict(type='str'),
proto=dict(default=None, type='str', choices=['amqps', 'amqp']), proto=dict(type='str', choices=['amqp', 'amqps']),
host=dict(default=None, type='str'), host=dict(type='str'),
port=dict(default=None, type='int'), port=dict(type='int'),
username=dict(default=None, type='str'), username=dict(type='str'),
password=dict(default=None, type='str', no_log=True), password=dict(type='str', no_log=True),
vhost=dict(default=None, type='str'), vhost=dict(type='str'),
queue=dict(default=None, type='str') queue=dict(type='str')
) )
''' Consider some file size limits here ''' ''' Consider some file size limits here '''

@ -1,57 +1,57 @@
# Copyright: (c) 2016, Jorge Rodriguez <jorge.rodriguez@tiriel.eu> # -*- coding: utf-8 -*-
# Copyright: (c) 2016, Jorge Rodriguez <jorge.rodriguez@tiriel.eu>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object): class ModuleDocFragment(object):
# Parameters for RabbitMQ modules # Parameters for RabbitMQ modules
DOCUMENTATION = ''' DOCUMENTATION = r'''
options: options:
login_user: login_user:
description: description:
- rabbitMQ user for connection. - RabbitMQ user for connection.
required: false type: str
default: guest default: guest
login_password: login_password:
description: description:
- rabbitMQ password for connection. - RabbitMQ password for connection.
required: false type: str
default: false
login_host: login_host:
description: description:
- rabbitMQ host for connection. - RabbitMQ host for connection.
required: false type: str
default: localhost default: localhost
login_port: login_port:
description: description:
- rabbitMQ management API port. - RabbitMQ management API port.
required: false type: str
default: 15672 default: '15672'
login_protocol: login_protocol:
description: description:
- rabbitMQ management API protocol. - RabbitMQ management API protocol.
type: str
choices: [ http , https ] choices: [ http , https ]
required: false
default: http default: http
version_added: "2.3" version_added: "2.3"
cacert: cacert:
description: description:
- CA certificate to verify SSL connection to management API. - CA certificate to verify SSL connection to management API.
required: false type: path
version_added: "2.3" version_added: "2.3"
cert: cert:
description: description:
- Client certificate to send on SSL connections to management API. - Client certificate to send on SSL connections to management API.
required: false type: path
version_added: "2.3" version_added: "2.3"
key: key:
description: description:
- Private key matching the client certificate. - Private key matching the client certificate.
required: false type: path
version_added: "2.3" version_added: "2.3"
vhost: vhost:
description: description:
- rabbitMQ virtual host. - RabbitMQ virtual host.
required: false type: str
default: "/" default: "/"
''' '''

Loading…
Cancel
Save