Removes bigip_snmp_trap from skip file (#32470)
This commit is contained in:
parent
e3f1198a67
commit
d5d4683047
3 changed files with 60 additions and 66 deletions
|
@ -4,13 +4,17 @@
|
||||||
# Copyright (c) 2017 F5 Networks Inc.
|
# Copyright (c) 2017 F5 Networks Inc.
|
||||||
# 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)
|
||||||
|
|
||||||
|
from __future__ import absolute_import, division, print_function
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
ANSIBLE_METADATA = {'metadata_version': '1.1',
|
ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
'status': ['preview'],
|
'status': ['preview'],
|
||||||
'supported_by': 'community'}
|
'supported_by': 'community'}
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r'''
|
||||||
module: bigip_snmp_trap
|
module: bigip_snmp_trap
|
||||||
short_description: Manipulate SNMP trap information on a BIG-IP.
|
short_description: Manipulate SNMP trap information on a BIG-IP
|
||||||
description:
|
description:
|
||||||
- Manipulate SNMP trap information on a BIG-IP.
|
- Manipulate SNMP trap information on a BIG-IP.
|
||||||
version_added: 2.4
|
version_added: 2.4
|
||||||
|
@ -67,70 +71,73 @@ author:
|
||||||
- Tim Rupp (@caphrim007)
|
- Tim Rupp (@caphrim007)
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r'''
|
||||||
- name: Create snmp v1 trap
|
- name: Create snmp v1 trap
|
||||||
bigip_snmp_trap:
|
bigip_snmp_trap:
|
||||||
community: "general"
|
community: general
|
||||||
destination: "1.2.3.4"
|
destination: 1.2.3.4
|
||||||
name: "my-trap1"
|
name: my-trap1
|
||||||
network: "management"
|
network: management
|
||||||
port: "9000"
|
port: 9000
|
||||||
snmp_version: "1"
|
snmp_version: 1
|
||||||
server: "lb.mydomain.com"
|
server: lb.mydomain.com
|
||||||
user: "admin"
|
user: admin
|
||||||
password: "secret"
|
password: secret
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Create snmp v2 trap
|
- name: Create snmp v2 trap
|
||||||
bigip_snmp_trap:
|
bigip_snmp_trap:
|
||||||
community: "general"
|
community: general
|
||||||
destination: "5.6.7.8"
|
destination: 5.6.7.8
|
||||||
name: "my-trap2"
|
name: my-trap2
|
||||||
network: "default"
|
network: default
|
||||||
port: "7000"
|
port: 7000
|
||||||
snmp_version: "2c"
|
snmp_version: 2c
|
||||||
server: "lb.mydomain.com"
|
server: lb.mydomain.com
|
||||||
user: "admin"
|
user: admin
|
||||||
password: "secret"
|
password: secret
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = r'''
|
||||||
snmp_version:
|
snmp_version:
|
||||||
description: The new C(snmp_version) configured on the remote device.
|
description: The new C(snmp_version) configured on the remote device.
|
||||||
returned: changed and success
|
returned: changed and success
|
||||||
type: string
|
type: string
|
||||||
sample: "2c"
|
sample: 2c
|
||||||
community:
|
community:
|
||||||
description: The new C(community) name for the trap destination.
|
description: The new C(community) name for the trap destination.
|
||||||
returned: changed and success
|
returned: changed and success
|
||||||
type: list
|
type: list
|
||||||
sample: "secret"
|
sample: secret
|
||||||
destination:
|
destination:
|
||||||
description: The new address for the trap destination in either IP or hostname form.
|
description: The new address for the trap destination in either IP or hostname form.
|
||||||
returned: changed and success
|
returned: changed and success
|
||||||
type: string
|
type: string
|
||||||
sample: "1.2.3.4"
|
sample: 1.2.3.4
|
||||||
port:
|
port:
|
||||||
description: The new C(port) of the trap destination.
|
description: The new C(port) of the trap destination.
|
||||||
returned: changed and success
|
returned: changed and success
|
||||||
type: string
|
type: string
|
||||||
sample: "900"
|
sample: 900
|
||||||
network:
|
network:
|
||||||
description: The new name of the network the SNMP trap is on.
|
description: The new name of the network the SNMP trap is on.
|
||||||
returned: changed and success
|
returned: changed and success
|
||||||
type: string
|
type: string
|
||||||
sample: "management"
|
sample: management
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
|
from ansible.module_utils.f5_utils import AnsibleF5Client
|
||||||
|
from ansible.module_utils.f5_utils import AnsibleF5Parameters
|
||||||
|
from ansible.module_utils.f5_utils import HAS_F5SDK
|
||||||
|
from ansible.module_utils.f5_utils import F5ModuleError
|
||||||
from distutils.version import LooseVersion
|
from distutils.version import LooseVersion
|
||||||
from ansible.module_utils.f5_utils import (
|
|
||||||
AnsibleF5Client,
|
try:
|
||||||
AnsibleF5Parameters,
|
from ansible.module_utils.f5_utils import iControlUnexpectedHTTPError
|
||||||
HAS_F5SDK,
|
except ImportError:
|
||||||
F5ModuleError,
|
HAS_F5SDK = False
|
||||||
iControlUnexpectedHTTPError
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class Parameters(AnsibleF5Parameters):
|
class Parameters(AnsibleF5Parameters):
|
||||||
|
|
|
@ -22,7 +22,6 @@ lib/ansible/modules/network/f5/bigip_pool.py
|
||||||
lib/ansible/modules/network/f5/bigip_provision.py
|
lib/ansible/modules/network/f5/bigip_provision.py
|
||||||
lib/ansible/modules/network/f5/bigip_qkview.py
|
lib/ansible/modules/network/f5/bigip_qkview.py
|
||||||
lib/ansible/modules/network/f5/bigip_snmp.py
|
lib/ansible/modules/network/f5/bigip_snmp.py
|
||||||
lib/ansible/modules/network/f5/bigip_snmp_trap.py
|
|
||||||
lib/ansible/modules/network/ios/ios_static_route.py
|
lib/ansible/modules/network/ios/ios_static_route.py
|
||||||
lib/ansible/modules/network/lenovo/cnos_backup.py
|
lib/ansible/modules/network/lenovo/cnos_backup.py
|
||||||
lib/ansible/modules/network/lenovo/cnos_bgp.py
|
lib/ansible/modules/network/lenovo/cnos_bgp.py
|
||||||
|
|
|
@ -1,21 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Copyright 2017 F5 Networks Inc.
|
# Copyright (c) 2017 F5 Networks Inc.
|
||||||
#
|
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# 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/>.
|
|
||||||
|
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
@ -41,6 +27,7 @@ try:
|
||||||
from library.bigip_snmp_trap import NetworkedManager
|
from library.bigip_snmp_trap import NetworkedManager
|
||||||
from library.bigip_snmp_trap import NonNetworkedManager
|
from library.bigip_snmp_trap import NonNetworkedManager
|
||||||
from library.bigip_snmp_trap import ArgumentSpec
|
from library.bigip_snmp_trap import ArgumentSpec
|
||||||
|
from ansible.module_utils.f5_utils import iControlUnexpectedHTTPError
|
||||||
except ImportError:
|
except ImportError:
|
||||||
try:
|
try:
|
||||||
from ansible.modules.network.f5.bigip_snmp_trap import NetworkedParameters
|
from ansible.modules.network.f5.bigip_snmp_trap import NetworkedParameters
|
||||||
|
@ -49,6 +36,7 @@ except ImportError:
|
||||||
from ansible.modules.network.f5.bigip_snmp_trap import NetworkedManager
|
from ansible.modules.network.f5.bigip_snmp_trap import NetworkedManager
|
||||||
from ansible.modules.network.f5.bigip_snmp_trap import NonNetworkedManager
|
from ansible.modules.network.f5.bigip_snmp_trap import NonNetworkedManager
|
||||||
from ansible.modules.network.f5.bigip_snmp_trap import ArgumentSpec
|
from ansible.modules.network.f5.bigip_snmp_trap import ArgumentSpec
|
||||||
|
from ansible.module_utils.f5_utils import iControlUnexpectedHTTPError
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
|
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue