Esempio n. 1
0
def main():
    module = AnsibleModule(argument_spec=dict(
        session=dict(required=True, type="dict"),
        blueprint=dict(required=True),
        name=dict(required=False),
        content=dict(required=False, type="json"),
        state=dict(choices=['present', 'absent'], default='present')),
                           mutually_exclusive=[('name', 'content')],
                           required_one_of=[('name', 'content')],
                           supports_check_mode=True)

    # Check if aos-pyez is present and match the minimum version
    check_aos_version(module, '0.6.0')

    blueprint_virtnet(module)
Esempio n. 2
0
def main():
    module = AnsibleModule(
        argument_spec=dict(server=dict(required=True),
                           port=dict(default='443', type="int"),
                           user=dict(default='admin'),
                           passwd=dict(default='admin', no_log=True)))

    if not HAS_AOS_PYEZ:
        module.fail_json(msg='aos-pyez is not installed.  Please see details '
                         'here: https://github.com/Apstra/aos-pyez')

    # Check if aos-pyez is present and match the minimum version
    check_aos_version(module, '0.6.1')

    aos_login(module)
Esempio n. 3
0
def main():
    module = AnsibleModule(
        argument_spec=dict(
            server=dict(required=True),
            port=dict(default='443', type="int"),
            user=dict(default='admin'),
            passwd=dict(default='admin', no_log=True)))

    if not HAS_AOS_PYEZ:
        module.fail_json(msg='aos-pyez is not installed.  Please see details '
                             'here: https://github.com/Apstra/aos-pyez')

    # Check if aos-pyez is present and match the minimum version
    check_aos_version(module, '0.6.1')

    aos_login(module)
Esempio n. 4
0
def main():
    module = AnsibleModule(argument_spec=dict(
        session=dict(required=True, type="dict"),
        name=dict(required=False),
        id=dict(required=False),
        state=dict(choices=['present', 'absent', 'build-ready'],
                   default='present'),
        timeout=dict(type="int", default=5),
        template=dict(required=False),
        reference_arch=dict(required=False)),
                           mutually_exclusive=[('name', 'id')],
                           required_one_of=[('name', 'id')],
                           supports_check_mode=True)

    # Check if aos-pyez is present and match the minimum version
    check_aos_version(module, '0.6.0')

    aos_blueprint(module)
def main():
    module = AnsibleModule(argument_spec=dict(
        session=dict(required=True, type="dict"),
        blueprint=dict(required=True),
        get_param_list=dict(required=False, type="bool"),
        name=dict(required=False),
        value=dict(required=False, type="dict"),
        param_map=dict(required=False),
        state=dict(choices=['present', 'absent'], default='present')),
                           supports_check_mode=True)

    # Check if aos-pyez is present and match the minimum version
    check_aos_version(module, '0.6.0')

    # aos-pyez availability has been verify already by "check_aos_version"
    # but this module requires few more object
    if not HAS_AOS_PYEZ_MAPPER:
        module.fail_json(msg='unable to load the Mapper library from aos-pyez')

    blueprint_param(module)
Esempio n. 6
0
def main():

    module = AnsibleModule(argument_spec=dict(session=dict(required=True,
                                                           type="dict"),
                                              name=dict(required=False),
                                              id=dict(required=False),
                                              state=dict(choices=['normal'],
                                                         default='normal'),
                                              approve=dict(required=False,
                                                           type='bool'),
                                              location=dict(required=False,
                                                            default='')),
                           mutually_exclusive=[('name', 'id')],
                           required_one_of=[('name', 'id')],
                           supports_check_mode=True)

    # Check if aos-pyez is present and match the minimum version
    check_aos_version(module, '0.6.0')

    aos_device(module)
Esempio n. 7
0
def main():
    module = AnsibleModule(
        argument_spec=dict(
            session=dict(required=True, type="dict"),
            name=dict(required=False ),
            id=dict(required=False ),
            content=dict(required=False, type="json"),
            state=dict( required=False,
                        choices=['present', 'absent'],
                        default="present")
        ),
        mutually_exclusive = [('name', 'id', 'content')],
        required_one_of=[('name', 'id', 'content')],
        supports_check_mode=True
    )

    # Check if aos-pyez is present and match the minimum version
    check_aos_version(module, '0.6.0')

    logical_device_map(module)
Esempio n. 8
0
def main():

    module = AnsibleModule(
        argument_spec=dict(
            session=dict(required=True, type="dict"),
            name=dict(required=False),
            id=dict(required=False),
            state=dict( choices=['normal'],
                        default='normal'),
            approve=dict( required=False, type='bool' ),
            location=dict( required=False, default='')
        ),
        mutually_exclusive = [('name', 'id')],
        required_one_of=[('name', 'id')],
        supports_check_mode=True
    )

    # Check if aos-pyez is present and match the minimum version
    check_aos_version(module, '0.6.0')

    aos_device(module)
Esempio n. 9
0
def main():
    module = AnsibleModule(
        argument_spec=dict(
            session=dict(required=True, type="dict"),
            name=dict(required=False),
            id=dict(required=False ),
            state=dict(choices=[
                'present', 'absent', 'build-ready'],
                default='present'),
            timeout=dict(type="int", default=5),
            template=dict(required=False),
            reference_arch=dict(required=False)
        ),
        mutually_exclusive = [('name', 'id')],
        required_one_of=[('name', 'id')],
        supports_check_mode=True
    )

    # Check if aos-pyez is present and match the minimum version
    check_aos_version(module, '0.6.0')

    aos_blueprint(module)
Esempio n. 10
0
def main():
    module = AnsibleModule(
        argument_spec=dict(
            session=dict(required=True, type="dict"),
            blueprint=dict(required=True),
            get_param_list=dict(required=False, type="bool"),
            name=dict(required=False),
            value=dict(required=False, type="dict"),
            param_map=dict(required=False),
            state=dict( choices=['present', 'absent'], default='present')
        ),
        supports_check_mode=True
    )

    # Check if aos-pyez is present and match the minimum version
    check_aos_version(module, '0.6.0')

    # aos-pyez availability has been verify already by "check_aos_version"
    # but this module requires few more object
    if not HAS_AOS_PYEZ_MAPPER:
        module.fail_json(msg='unable to load the Mapper library from aos-pyez')

    blueprint_param(module)