mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-27 10:40:22 -07:00
Tidy up sanity checks (2021/Batch 3 - who's counting) (#1885)
* fixed validation-modules for plugins/modules/packaging/language/pip_package_info.py * fixed validation-modules for plugins/modules/packaging/language/maven_artifact.py * fixed validation-modules for plugins/modules/packaging/language/bundler.py * fixed validation-modules for plugins/modules/notification/pushbullet.py * fixed validation-modules for plugins/modules/monitoring/sensu/sensu_handler.py * fixed validation-modules for plugins/modules/monitoring/sensu/sensu_check.py * fixed validation-modules for plugins/modules/monitoring/sensu/sensu_client.py * fixed validation-modules for plugins/modules/monitoring/icinga2_host.py * fixed validation-modules for plugins/modules/monitoring/datadog/datadog_monitor.py * fixed validation-modules for plugins/modules/monitoring/datadog/datadog_event.py * fixed validation-modules for plugins/modules/clustering/znode.py * fixed validation-modules for plugins/modules/clustering/etcd3.py * fixed validation-modules for plugins/modules/clustering/consul/consul_session.py * fixed validation-modules for plugins/modules/clustering/consul/consul_kv.py * fixed validation-modules for plugins/modules/clustering/consul/consul.py * fixed validation-modules for plugins/modules/cloud/profitbricks/profitbricks.py * fixed validation-modules for plugins/modules/cloud/profitbricks/profitbricks_volume.py * fixed validation-modules for plugins/modules/cloud/packet/packet_sshkey.py * fixed validation-modules for plugins/modules/cloud/oneandone/oneandone_server.py * fixed validation-modules for plugins/modules/cloud/oneandone/oneandone_private_network.py * fixed validation-modules for plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py * fixed validation-modules for plugins/modules/cloud/oneandone/oneandone_load_balancer.py * fixed validation-modules for plugins/modules/cloud/oneandone/oneandone_firewall_policy.py * fixed validation-modules for plugins/modules/cloud/webfaction/webfaction_app.py * fixed validation-modules for plugins/modules/cloud/webfaction/webfaction_db.py * fixed validation-modules for plugins/modules/cloud/webfaction/webfaction_domain.py * fixed validation-modules for plugins/modules/cloud/webfaction/webfaction_mailbox.py * fixed validation-modules for plugins/modules/cloud/webfaction/webfaction_site.py * fixed validation-modules for plugins/modules/remote_management/lxca/lxca_cmms.py * fixed validation-modules for plugins/modules/remote_management/lxca/lxca_nodes.py * missed one "elements" in sensu_handler * Tidy up batch of sanity checks ignore lines * missed lines in ignore-2.9.txt * fixed validation-modules for plugins/modules/clustering/consul/consul_acl.py * Update ignore-2.9.txt Removed consul_acl.py from ignore-2.9.txt * Apply suggestions from code review Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Update plugins/modules/notification/pushbullet.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py Co-authored-by: Felix Fontein <felix@fontein.de> * added changelog fragment * Update plugins/modules/cloud/oneandone/oneandone_monitoring_policy.py * Update changelogs/fragments/1885-sanity-check-fixes-batch3.yml Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
This commit is contained in:
parent
afe9d0fdb3
commit
76d9fe4ec6
35 changed files with 299 additions and 265 deletions
|
@ -57,27 +57,32 @@ options:
|
|||
Each rule must contain protocol parameter, in addition to three optional parameters
|
||||
(port_from, port_to, and source)
|
||||
type: list
|
||||
elements: dict
|
||||
add_server_ips:
|
||||
description:
|
||||
- A list of server identifiers (id or name) to be assigned to a firewall policy.
|
||||
Used in combination with update state.
|
||||
type: list
|
||||
elements: str
|
||||
required: false
|
||||
remove_server_ips:
|
||||
description:
|
||||
- A list of server IP ids to be unassigned from a firewall policy. Used in combination with update state.
|
||||
type: list
|
||||
elements: str
|
||||
required: false
|
||||
add_rules:
|
||||
description:
|
||||
- A list of rules that will be added to an existing firewall policy.
|
||||
It is syntax is the same as the one used for rules parameter. Used in combination with update state.
|
||||
type: list
|
||||
elements: dict
|
||||
required: false
|
||||
remove_rules:
|
||||
description:
|
||||
- A list of rule ids that will be removed from an existing firewall policy. Used in combination with update state.
|
||||
type: list
|
||||
elements: str
|
||||
required: false
|
||||
description:
|
||||
description:
|
||||
|
@ -508,11 +513,11 @@ def main():
|
|||
name=dict(type='str'),
|
||||
firewall_policy=dict(type='str'),
|
||||
description=dict(type='str'),
|
||||
rules=dict(type='list', default=[]),
|
||||
add_server_ips=dict(type='list', default=[]),
|
||||
remove_server_ips=dict(type='list', default=[]),
|
||||
add_rules=dict(type='list', default=[]),
|
||||
remove_rules=dict(type='list', default=[]),
|
||||
rules=dict(type='list', elements="dict", default=[]),
|
||||
add_server_ips=dict(type='list', elements="str", default=[]),
|
||||
remove_server_ips=dict(type='list', elements="str", default=[]),
|
||||
add_rules=dict(type='list', elements="dict", default=[]),
|
||||
remove_rules=dict(type='list', elements="str", default=[]),
|
||||
wait=dict(type='bool', default=True),
|
||||
wait_timeout=dict(type='int', default=600),
|
||||
wait_interval=dict(type='int', default=5),
|
||||
|
|
|
@ -95,6 +95,7 @@ options:
|
|||
- A list of rule objects that will be set for the load balancer. Each rule must contain protocol,
|
||||
port_balancer, and port_server parameters, in addition to source parameter, which is optional.
|
||||
type: list
|
||||
elements: dict
|
||||
description:
|
||||
description:
|
||||
- Description of the load balancer. maxLength=256
|
||||
|
@ -105,22 +106,26 @@ options:
|
|||
- A list of server identifiers (id or name) to be assigned to a load balancer.
|
||||
Used in combination with update state.
|
||||
type: list
|
||||
elements: str
|
||||
required: false
|
||||
remove_server_ips:
|
||||
description:
|
||||
- A list of server IP ids to be unassigned from a load balancer. Used in combination with update state.
|
||||
type: list
|
||||
elements: str
|
||||
required: false
|
||||
add_rules:
|
||||
description:
|
||||
- A list of rules that will be added to an existing load balancer.
|
||||
It is syntax is the same as the one used for rules parameter. Used in combination with update state.
|
||||
type: list
|
||||
elements: dict
|
||||
required: false
|
||||
remove_rules:
|
||||
description:
|
||||
- A list of rule ids that will be removed from an existing load balancer. Used in combination with update state.
|
||||
type: list
|
||||
elements: str
|
||||
required: false
|
||||
wait:
|
||||
description:
|
||||
|
@ -613,11 +618,11 @@ def main():
|
|||
choices=METHODS),
|
||||
datacenter=dict(
|
||||
choices=DATACENTERS),
|
||||
rules=dict(type='list', default=[]),
|
||||
add_server_ips=dict(type='list', default=[]),
|
||||
remove_server_ips=dict(type='list', default=[]),
|
||||
add_rules=dict(type='list', default=[]),
|
||||
remove_rules=dict(type='list', default=[]),
|
||||
rules=dict(type='list', elements="dict", default=[]),
|
||||
add_server_ips=dict(type='list', elements="str", default=[]),
|
||||
remove_server_ips=dict(type='list', elements="str", default=[]),
|
||||
add_rules=dict(type='list', elements="dict", default=[]),
|
||||
remove_rules=dict(type='list', elements="str", default=[]),
|
||||
wait=dict(type='bool', default=True),
|
||||
wait_timeout=dict(type='int', default=600),
|
||||
wait_interval=dict(type='int', default=5),
|
||||
|
|
|
@ -71,6 +71,7 @@ options:
|
|||
warning alerts, critical is used to set critical alerts. alert enables alert,
|
||||
and value is used to advise when the value is exceeded.
|
||||
type: list
|
||||
elements: dict
|
||||
suboptions:
|
||||
cpu:
|
||||
description:
|
||||
|
@ -96,6 +97,7 @@ options:
|
|||
description:
|
||||
- Array of ports that will be monitoring.
|
||||
type: list
|
||||
elements: dict
|
||||
suboptions:
|
||||
protocol:
|
||||
description:
|
||||
|
@ -119,6 +121,7 @@ options:
|
|||
description:
|
||||
- Array of processes that will be monitoring.
|
||||
type: list
|
||||
elements: dict
|
||||
suboptions:
|
||||
process:
|
||||
description:
|
||||
|
@ -133,41 +136,49 @@ options:
|
|||
description:
|
||||
- Ports to add to the monitoring policy.
|
||||
type: list
|
||||
elements: dict
|
||||
required: false
|
||||
add_processes:
|
||||
description:
|
||||
- Processes to add to the monitoring policy.
|
||||
type: list
|
||||
elements: dict
|
||||
required: false
|
||||
add_servers:
|
||||
description:
|
||||
- Servers to add to the monitoring policy.
|
||||
type: list
|
||||
elements: str
|
||||
required: false
|
||||
remove_ports:
|
||||
description:
|
||||
- Ports to remove from the monitoring policy.
|
||||
type: list
|
||||
elements: str
|
||||
required: false
|
||||
remove_processes:
|
||||
description:
|
||||
- Processes to remove from the monitoring policy.
|
||||
type: list
|
||||
elements: str
|
||||
required: false
|
||||
remove_servers:
|
||||
description:
|
||||
- Servers to remove from the monitoring policy.
|
||||
type: list
|
||||
elements: str
|
||||
required: false
|
||||
update_ports:
|
||||
description:
|
||||
- Ports to be updated on the monitoring policy.
|
||||
type: list
|
||||
elements: dict
|
||||
required: false
|
||||
update_processes:
|
||||
description:
|
||||
- Processes to be updated on the monitoring policy.
|
||||
type: list
|
||||
elements: dict
|
||||
required: false
|
||||
wait:
|
||||
description:
|
||||
|
@ -197,7 +208,7 @@ author:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create a monitoring policy
|
||||
oneandone_moitoring_policy:
|
||||
community.general.oneandone_monitoring_policy:
|
||||
auth_token: oneandone_private_api_key
|
||||
name: ansible monitoring policy
|
||||
description: Testing creation of a monitoring policy with ansible
|
||||
|
@ -258,13 +269,13 @@ EXAMPLES = '''
|
|||
wait: true
|
||||
|
||||
- name: Destroy a monitoring policy
|
||||
oneandone_moitoring_policy:
|
||||
community.general.oneandone_monitoring_policy:
|
||||
auth_token: oneandone_private_api_key
|
||||
state: absent
|
||||
name: ansible monitoring policy
|
||||
|
||||
- name: Update a monitoring policy
|
||||
oneandone_moitoring_policy:
|
||||
community.general.oneandone_monitoring_policy:
|
||||
auth_token: oneandone_private_api_key
|
||||
monitoring_policy: ansible monitoring policy
|
||||
name: ansible monitoring policy updated
|
||||
|
@ -315,7 +326,7 @@ EXAMPLES = '''
|
|||
state: update
|
||||
|
||||
- name: Add a port to a monitoring policy
|
||||
oneandone_moitoring_policy:
|
||||
community.general.oneandone_monitoring_policy:
|
||||
auth_token: oneandone_private_api_key
|
||||
monitoring_policy: ansible monitoring policy updated
|
||||
add_ports:
|
||||
|
@ -328,7 +339,7 @@ EXAMPLES = '''
|
|||
state: update
|
||||
|
||||
- name: Update existing ports of a monitoring policy
|
||||
oneandone_moitoring_policy:
|
||||
community.general.oneandone_monitoring_policy:
|
||||
auth_token: oneandone_private_api_key
|
||||
monitoring_policy: ansible monitoring policy updated
|
||||
update_ports:
|
||||
|
@ -348,7 +359,7 @@ EXAMPLES = '''
|
|||
state: update
|
||||
|
||||
- name: Remove a port from a monitoring policy
|
||||
oneandone_moitoring_policy:
|
||||
community.general.oneandone_monitoring_policy:
|
||||
auth_token: oneandone_private_api_key
|
||||
monitoring_policy: ansible monitoring policy updated
|
||||
remove_ports:
|
||||
|
@ -356,7 +367,7 @@ EXAMPLES = '''
|
|||
state: update
|
||||
|
||||
- name: Add a process to a monitoring policy
|
||||
oneandone_moitoring_policy:
|
||||
community.general.oneandone_monitoring_policy:
|
||||
auth_token: oneandone_private_api_key
|
||||
monitoring_policy: ansible monitoring policy updated
|
||||
add_processes:
|
||||
|
@ -368,7 +379,7 @@ EXAMPLES = '''
|
|||
state: update
|
||||
|
||||
- name: Update existing processes of a monitoring policy
|
||||
oneandone_moitoring_policy:
|
||||
community.general.oneandone_monitoring_policy:
|
||||
auth_token: oneandone_private_api_key
|
||||
monitoring_policy: ansible monitoring policy updated
|
||||
update_processes:
|
||||
|
@ -386,7 +397,7 @@ EXAMPLES = '''
|
|||
state: update
|
||||
|
||||
- name: Remove a process from a monitoring policy
|
||||
oneandone_moitoring_policy:
|
||||
community.general.oneandone_monitoring_policy:
|
||||
auth_token: oneandone_private_api_key
|
||||
monitoring_policy: ansible monitoring policy updated
|
||||
remove_processes:
|
||||
|
@ -395,7 +406,7 @@ EXAMPLES = '''
|
|||
state: update
|
||||
|
||||
- name: Add server to a monitoring policy
|
||||
oneandone_moitoring_policy:
|
||||
community.general.oneandone_monitoring_policy:
|
||||
auth_token: oneandone_private_api_key
|
||||
monitoring_policy: ansible monitoring policy updated
|
||||
add_servers:
|
||||
|
@ -404,7 +415,7 @@ EXAMPLES = '''
|
|||
state: update
|
||||
|
||||
- name: Remove server from a monitoring policy
|
||||
oneandone_moitoring_policy:
|
||||
community.general.oneandone_monitoring_policy:
|
||||
auth_token: oneandone_private_api_key
|
||||
monitoring_policy: ansible monitoring policy updated
|
||||
remove_servers:
|
||||
|
@ -957,17 +968,17 @@ def main():
|
|||
agent=dict(type='str'),
|
||||
email=dict(type='str'),
|
||||
description=dict(type='str'),
|
||||
thresholds=dict(type='list', default=[]),
|
||||
ports=dict(type='list', default=[]),
|
||||
processes=dict(type='list', default=[]),
|
||||
add_ports=dict(type='list', default=[]),
|
||||
update_ports=dict(type='list', default=[]),
|
||||
remove_ports=dict(type='list', default=[]),
|
||||
add_processes=dict(type='list', default=[]),
|
||||
update_processes=dict(type='list', default=[]),
|
||||
remove_processes=dict(type='list', default=[]),
|
||||
add_servers=dict(type='list', default=[]),
|
||||
remove_servers=dict(type='list', default=[]),
|
||||
thresholds=dict(type='list', elements="dict", default=[]),
|
||||
ports=dict(type='list', elements="dict", default=[]),
|
||||
processes=dict(type='list', elements="dict", default=[]),
|
||||
add_ports=dict(type='list', elements="dict", default=[]),
|
||||
update_ports=dict(type='list', elements="dict", default=[]),
|
||||
remove_ports=dict(type='list', elements="str", default=[]),
|
||||
add_processes=dict(type='list', elements="dict", default=[]),
|
||||
update_processes=dict(type='list', elements="dict", default=[]),
|
||||
remove_processes=dict(type='list', elements="str", default=[]),
|
||||
add_servers=dict(type='list', elements="str", default=[]),
|
||||
remove_servers=dict(type='list', elements="str", default=[]),
|
||||
wait=dict(type='bool', default=True),
|
||||
wait_timeout=dict(type='int', default=600),
|
||||
wait_interval=dict(type='int', default=5),
|
||||
|
|
|
@ -71,10 +71,12 @@ options:
|
|||
description:
|
||||
- List of server identifiers (name or id) to be added to the private network.
|
||||
type: list
|
||||
elements: str
|
||||
remove_members:
|
||||
description:
|
||||
- List of server identifiers (name or id) to be removed from the private network.
|
||||
type: list
|
||||
elements: str
|
||||
wait:
|
||||
description:
|
||||
- wait for the instance to be in state 'running' before returning
|
||||
|
@ -394,8 +396,8 @@ def main():
|
|||
description=dict(type='str'),
|
||||
network_address=dict(type='str'),
|
||||
subnet_mask=dict(type='str'),
|
||||
add_members=dict(type='list', default=[]),
|
||||
remove_members=dict(type='list', default=[]),
|
||||
add_members=dict(type='list', elements="str", default=[]),
|
||||
remove_members=dict(type='list', elements="str", default=[]),
|
||||
datacenter=dict(
|
||||
choices=DATACENTERS),
|
||||
wait=dict(type='bool', default=True),
|
||||
|
|
|
@ -87,6 +87,7 @@ options:
|
|||
- A list of hard disks with nested "size" and "is_main" properties.
|
||||
It must be provided with vcore, cores_per_processor, and ram parameters.
|
||||
type: list
|
||||
elements: dict
|
||||
private_network:
|
||||
description:
|
||||
- The private network name or ID.
|
||||
|
@ -627,7 +628,7 @@ def main():
|
|||
vcore=dict(type='int'),
|
||||
cores_per_processor=dict(type='int'),
|
||||
ram=dict(type='float'),
|
||||
hdds=dict(type='list'),
|
||||
hdds=dict(type='list', elements='dict'),
|
||||
count=dict(type='int', default=1),
|
||||
ssh_key=dict(type='raw'),
|
||||
auto_increment=dict(type='bool', default=True),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue