�
�Udac @` s� d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d
Z d d l
m Z d d l m
Z
m Z d
� Z e d k r� e � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust communityt supported_bysK
---
module: ucs_vlan_find
short_description: Find VLANs on Cisco UCS Manager
description:
- Find VLANs on Cisco UCS Manager based on different criteria.
extends_documentation_fragment: ucs
options:
pattern:
description:
- Regex pattern to find within the name property of the fabricVlan class.
- This is required if C(vlanid) parameter is not supplied.
type: str
fabric:
description:
- "The fabric configuration of the VLAN. This can be one of the following:"
- "common - The VLAN applies to both fabrics and uses the same configuration parameters in both cases."
- "A — The VLAN only applies to fabric A."
- "B — The VLAN only applies to fabric B."
choices: [common, A, B]
default: common
type: str
vlanid:
description:
- The unique string identifier assigned to the VLAN.
- A VLAN ID can be between '1' and '3967', or between '4048' and '4093'.
- This is required if C(pattern) parameter is not supplied.
type: str
requirements:
- ucsmsdk
author:
- David Martinez (@dx0xm)
- CiscoUcs (@CiscoUcs)
version_added: '2.9'
s-
- name: Get all vlans in fabric A
ucs_vlan_find:
hostname: 172.16.143.150
username: admin
password: password
fabric: 'A'
pattern: '.'
- name: Confirm if vlan 15 is present
ucs_vlan_find:
hostname: 172.16.143.150
username: admin
password: password
vlanid: '15'
s�
vlan_list:
description: basic details of vlans found
returned: on success
type: list
sample: [
{
"id": "0",
"name": "vlcloud1"
}
]
( t
AnsibleModule( t UCSModulet ucs_argument_specc C` s� t } | j d t d d d d d d d d g � d t d d � d
t d d � � t d | d t d
d d
g g � } t | � } d g } | j d d k r� | j d | j d d � n | j d
r� | j d | j d
d � n | j d | j d d � | j j d d d j
| � �} | d k rE| j d d � n g } x0 | D]( } | j t d | j
d | j � � qRW| j d t d | � d S( Nt fabrict typet strt defaultt commont choicest At Bt patternt vlanidt
argument_spect supports_check_modet required_one_ofs (cloud,"ethlan")s (switch_id,"s ")s (id,"s (name,"t
fabricVlant
filter_strs and t msgs Failed to query vlan objectst namet idt changedt vlan_list( R
t updatet dictR t TrueR t paramst appendt login_handlet
query_classidt joint Nonet fail_jsonR R t exit_jsont False( R t modulet ucst filtlst object_dictt vlnlistt ob( ( sW /usr/lib/python2.7/site-packages/ansible/modules/remote_management/ucs/ucs_vlan_find.pyt mainS s0 $
!
&t __main__N( t
__future__R R R R t
__metaclass__t ANSIBLE_METADATAt
DOCUMENTATIONt EXAMPLESt RETURNt ansible.module_utils.basicR t* ansible.module_utils.remote_management.ucsR R
R1 t __name__( ( ( sW /usr/lib/python2.7/site-packages/ansible/modules/remote_management/ucs/ucs_vlan_find.pyt <module> s
$
%
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]