
    Vh/                     n    d Z ddlmZmZmZ ddlmZmZ ddlm	Z	 e
ZdZdZdZed        Z G d	 d
e      Zy)z1
Test plugin file for netaddr tests: ipv6_teredo
    )absolute_importdivisionprint_function)_need_ipaddress
ip_address)_validate_argsa7  
    name: ipv6_teredo
    author: Priyam Sahoo (@priyamsahoo)
    version_added: "2.2.0"
    short_description: Test if something appears to be an IPv6 teredo address
    description:
        - This plugin checks if the provided value is a valid IPv6 teredo address
    options:
        ip:
            description:
            - A string that represents the value against which the test is going to be performed
            - 'For example: C(2001::c0a8:6301:1), C(2002::c0a8:6301:1), or C("hello_world")'
            type: str
            required: True
    notes:
aM  

#### Simple examples

- name: Check if 2001::c0a8:6301:1 is a valid IPv6 teredo address
  ansible.builtin.set_fact:
    data: "{{ '2001::c0a8:6301:1' is ansible.utils.ipv6_teredo }}"

# TASK [Check if 2001::c0a8:6301:1 is a valid IPv6 teredo address] ********************
# ok: [localhost] => {
#     "ansible_facts": {
#         "data": true
#     },
#     "changed": false
# }

- name: Check if 2002::c0a8:6301:1 is not a valid IPv6 teredo address
  ansible.builtin.set_fact:
    data: "{{ '2002::c0a8:6301:1' is not ansible.utils.ipv6_teredo }}"

# TASK [Check if 2002::c0a8:6301:1 is not a valid IPv6 teredo address] ****************
# ok: [localhost] => {
#     "ansible_facts": {
#         "data": true
#     },
#     "changed": false
# }

- name: Check if hello_world is not a valid IPv6 teredo address
  ansible.builtin.set_fact:
    data: "{{ 'hello_world' is not ansible.utils.ipv6_teredo }}"

# TASK [Check if hello_world is not a valid IPv6 teredo address] **********************
# ok: [localhost] => {
#     "ansible_facts": {
#         "data": true
#     },
#     "changed": false
# }
z
  data:
    description:
      - If jinja test satisfies plugin expression C(true)
      - If jinja test does not satisfy plugin expression C(false)
c                 z    d| i}t        dt        |       	 t        |       j                  yy# t        $ r Y yw xY w)z+Test if something is an IPv6 teredo addressipipv6_teredoFT)r   DOCUMENTATIONr   teredo	Exception)r
   paramss     j/home/dcms/DCMS/lib/python3.12/site-packages/ansible_collections/ansible/utils/plugins/test/ipv6_teredo.py_ipv6_teredor   W   sF     BZF=-8b>  ( s   . 	::c                       e Zd ZdZdeiZd Zy)
TestModuleznetwork jinja testr   c                     | j                   S )N)test_map)selfs    r   testszTestModule.testsk   s    }}    N)__name__
__module____qualname____doc__r   r   r    r   r   r   r   f   s    |,Hr   r   N)r   
__future__r   r   r   Kansible_collections.ansible.utils.plugins.plugin_utils.base.ipaddress_utilsr   r   Aansible_collections.ansible.utils.plugins.plugin_utils.base.utilsr   type__metaclass__r   EXAMPLESRETURNr   objectr   r   r   r   <module>r&      s[    A @ ] "'R
   r   