�
�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 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_bys}
---
module: mso_schema_template_bd_subnet
short_description: Manage BD subnets in schema templates
description:
- Manage BD subnets in schema templates on Cisco ACI Multi-Site.
author:
- Dag Wieers (@dagwieers)
version_added: '2.8'
options:
schema:
description:
- The name of the schema.
type: str
required: yes
template:
description:
- The name of the template to change.
type: str
required: yes
bd:
description:
- The name of the BD to manage.
type: str
required: yes
subnet:
description:
- The IP range in CIDR notation.
type: str
required: true
aliases: [ ip ]
description:
description:
- The description of this subnet.
type: str
scope:
description:
- The scope of the subnet.
type: str
choices: [ private, public ]
shared:
description:
- Whether this subnet is shared between VRFs.
type: bool
no_default_gateway:
description:
- Whether this subnet has a default gateway.
type: bool
state:
description:
- Use C(present) or C(absent) for adding or removing.
- Use C(query) for listing an object or multiple objects.
type: str
choices: [ absent, present, query ]
default: present
notes:
- Due to restrictions of the MSO REST API concurrent modifications to BD subnets can be dangerous and corrupt data.
extends_documentation_fragment: mso
s<
- name: Add a new subnet to a BD
mso_schema_template_bd_subnet:
host: mso_host
username: admin
password: SomeSecretPassword
schema: Schema 1
template: Template 1
bd: BD 1
subnet: 10.0.0.0/24
state: present
delegate_to: localhost
- name: Remove a subset from a BD
mso_schema_template_bd_subnet:
host: mso_host
username: admin
password: SomeSecretPassword
schema: Schema 1
template: Template 1
bd: BD 1
subnet: 10.0.0.0/24
state: absent
delegate_to: localhost
- name: Query a specific BD subnet
mso_schema_template_bd_subnet:
host: mso_host
username: admin
password: SomeSecretPassword
schema: Schema 1
template: Template 1
bd: BD 1
subnet: 10.0.0.0/24
state: query
delegate_to: localhost
register: query_result
- name: Query all BD subnets
mso_schema_template_bd_subnet:
host: mso_host
username: admin
password: SomeSecretPassword
schema: Schema 1
template: Template 1
bd: BD 1
state: query
delegate_to: localhost
register: query_result
t
( t
AnsibleModule( t MSOModulet mso_argument_spect mso_reference_spect mso_subnet_specc C` s� t � } | j d t d d d t � d t d d d t � d t d d d t � d t d d d d d
d d d g � � | j t � � t d
| d t d d d d g g d d d g g g � } | j d } | j d } | j d } | j d } | j d } | j d } | j d } | j d } | j d }
t | � } | j d d | �} | sw| j d d j
| � � n d j
| � }
g | d D] } | d ^ q�} | | k r�| j d d j
| d j | � � � n | j | � } g | d | d D] } | d ^ q�} | | k rG| j d d j
| d j | � � � n | j | � } g | d | d | d D] } | d! ^ qq} | | k r�| j | � } d"