Esempio n. 1
0
def main():
    argument_specs = dict(
        state=dict(default='present', choices=['absent', 'present']),
        avi_api_update_method=dict(default='put', choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        app_cookie_persistence_profile=dict(type='dict', ),
        description=dict(type='str', ),
        hdr_persistence_profile=dict(type='dict', ),
        http_cookie_persistence_profile=dict(type='dict', ),
        ip_persistence_profile=dict(type='dict', ),
        is_federated=dict(type='bool', ),
        name=dict(type='str', required=True),
        persistence_type=dict(type='str', required=True),
        server_hm_down_recovery=dict(type='str', ),
        tenant_ref=dict(type='str', ),
        url=dict(type='str', ),
        uuid=dict(type='str', ),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(argument_spec=argument_specs,
                           supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'applicationpersistenceprofile', set([]))
Esempio n. 2
0
def main():
    argument_specs = dict(
        state=dict(default='present', choices=['absent', 'present']),
        avi_api_update_method=dict(default='put', choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        auto_disable_old_prod_pools=dict(type='bool', ),
        description=dict(type='str', ),
        evaluation_duration=dict(type='int', ),
        name=dict(type='str', required=True),
        rules=dict(type='list', ),
        scheme=dict(type='str', ),
        target_test_traffic_ratio=dict(type='int', ),
        tenant_ref=dict(type='str', ),
        test_traffic_ratio_rampup=dict(type='int', ),
        url=dict(type='str', ),
        uuid=dict(type='str', ),
        webhook_ref=dict(type='str', ),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(argument_spec=argument_specs,
                           supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'poolgroupdeploymentpolicy', set([]))
def main():
    argument_specs = dict(
        state=dict(default='present', choices=['absent', 'present']),
        avi_api_update_method=dict(default='put', choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        cloud_config_cksum=dict(type='str', ),
        created_by=dict(type='str', ),
        description=dict(type='str', ),
        dns_service_profile=dict(type='dict', ),
        dos_rl_profile=dict(type='dict', ),
        http_profile=dict(type='dict', ),
        name=dict(type='str', required=True),
        preserve_client_ip=dict(type='bool', ),
        preserve_client_port=dict(type='bool', ),
        sip_service_profile=dict(type='dict', ),
        tcp_app_profile=dict(type='dict', ),
        tenant_ref=dict(type='str', ),
        type=dict(type='str', required=True),
        url=dict(type='str', ),
        uuid=dict(type='str', ),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(argument_spec=argument_specs,
                           supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'applicationprofile', set([]))
Esempio n. 4
0
def main():
    argument_specs = dict(
        state=dict(default='present', choices=['absent', 'present']),
        avi_api_update_method=dict(default='put', choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        bgp_profile=dict(type='dict', ),
        cloud_ref=dict(type='str', ),
        debugvrfcontext=dict(type='dict', ),
        description=dict(type='str', ),
        gateway_mon=dict(type='list', ),
        internal_gateway_monitor=dict(type='dict', ),
        name=dict(type='str', required=True),
        static_routes=dict(type='list', ),
        system_default=dict(type='bool', ),
        tenant_ref=dict(type='str', ),
        url=dict(type='str', ),
        uuid=dict(type='str', ),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(argument_spec=argument_specs,
                           supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'vrfcontext', set([]))
Esempio n. 5
0
def main():
    argument_specs = dict(
        state=dict(default='present', choices=['absent', 'present']),
        avi_api_update_method=dict(default='put', choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        description=dict(type='str', ),
        dns_monitor=dict(type='dict', ),
        external_monitor=dict(type='dict', ),
        failed_checks=dict(type='int', ),
        http_monitor=dict(type='dict', ),
        https_monitor=dict(type='dict', ),
        is_federated=dict(type='bool', ),
        monitor_port=dict(type='int', ),
        name=dict(type='str', required=True),
        radius_monitor=dict(type='dict', ),
        receive_timeout=dict(type='int', ),
        send_interval=dict(type='int', ),
        sip_monitor=dict(type='dict', ),
        successful_checks=dict(type='int', ),
        tcp_monitor=dict(type='dict', ),
        tenant_ref=dict(type='str', ),
        type=dict(type='str', required=True),
        udp_monitor=dict(type='dict', ),
        url=dict(type='str', ),
        uuid=dict(type='str', ),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(argument_spec=argument_specs,
                           supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'healthmonitor', set([]))
Esempio n. 6
0
def main():
    argument_specs = dict(
        state=dict(default='present',
                   choices=['absent', 'present']),
        avi_api_update_method=dict(default='put',
                                   choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        cloud_ref=dict(type='str',),
        dns_info=dict(type='list',),
        east_west_placement=dict(type='bool',),
        name=dict(type='str', required=True),
        tenant_ref=dict(type='str',),
        url=dict(type='str',),
        use_standard_alb=dict(type='bool',),
        uuid=dict(type='str',),
        vip=dict(type='list',),
        vrf_context_ref=dict(type='str',),
        vsvip_cloud_config_cksum=dict(type='str',),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(
        argument_spec=argument_specs, supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'vsvip',
                           set([]))
Esempio n. 7
0
def main():
    argument_specs = dict(
        state=dict(default='present', choices=['absent', 'present']),
        avi_api_update_method=dict(default='put', choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        description=dict(type='str', ),
        http=dict(type='dict', ),
        ldap=dict(type='dict', ),
        name=dict(type='str', required=True),
        pa_agent_ref=dict(type='str', ),
        saml=dict(type='dict', ),
        tacacs_plus=dict(type='dict', ),
        tenant_ref=dict(type='str', ),
        type=dict(type='str', required=True),
        url=dict(type='str', ),
        uuid=dict(type='str', ),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(argument_spec=argument_specs,
                           supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'authprofile', set([]))
Esempio n. 8
0
def main():
    argument_specs = dict(
        state=dict(default='present', choices=['absent', 'present']),
        avi_api_update_method=dict(default='put', choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        description=dict(type='str', ),
        intelligent_autoscale=dict(type='bool', ),
        intelligent_scalein_margin=dict(type='int', ),
        intelligent_scaleout_margin=dict(type='int', ),
        max_scalein_adjustment_step=dict(type='int', ),
        max_scaleout_adjustment_step=dict(type='int', ),
        max_size=dict(type='int', ),
        min_size=dict(type='int', ),
        name=dict(type='str', required=True),
        scalein_alertconfig_refs=dict(type='list', ),
        scalein_cooldown=dict(type='int', ),
        scaleout_alertconfig_refs=dict(type='list', ),
        scaleout_cooldown=dict(type='int', ),
        tenant_ref=dict(type='str', ),
        url=dict(type='str', ),
        use_predicted_load=dict(type='bool', ),
        uuid=dict(type='str', ),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(argument_spec=argument_specs,
                           supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'serverautoscalepolicy', set([]))
def main():
    argument_specs = dict(
        state=dict(default='present',
                   choices=['absent', 'present']),
        avi_api_update_method=dict(default='put',
                                   choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        aws_access_key=dict(type='str', no_log=True,),
        aws_bucket_id=dict(type='str',),
        aws_secret_access=dict(type='str', no_log=True,),
        backup_file_prefix=dict(type='str',),
        backup_passphrase=dict(type='str', no_log=True,),
        maximum_backups_stored=dict(type='int',),
        name=dict(type='str', required=True),
        remote_directory=dict(type='str',),
        remote_hostname=dict(type='str',),
        save_local=dict(type='bool',),
        ssh_user_ref=dict(type='str',),
        tenant_ref=dict(type='str',),
        upload_to_remote_host=dict(type='bool',),
        upload_to_s3=dict(type='bool',),
        url=dict(type='str',),
        uuid=dict(type='str',),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(
        argument_spec=argument_specs, supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'backupconfiguration',
                           set(['backup_passphrase', 'aws_access_key', 'aws_secret_access']))
Esempio n. 10
0
def main():
    argument_specs = dict(
        state=dict(default='present', choices=['absent', 'present']),
        avi_api_update_method=dict(default='put', choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        backup_config_ref=dict(type='str', ),
        enabled=dict(type='bool', ),
        end_date_time=dict(type='str', ),
        frequency=dict(type='int', ),
        frequency_unit=dict(type='str', ),
        name=dict(type='str', required=True),
        run_mode=dict(type='str', ),
        run_script_ref=dict(type='str', ),
        scheduler_action=dict(type='str', ),
        start_date_time=dict(type='str', ),
        tenant_ref=dict(type='str', ),
        url=dict(type='str', ),
        uuid=dict(type='str', ),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(argument_spec=argument_specs,
                           supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'scheduler', set([]))
Esempio n. 11
0
def main():
    argument_specs = dict(
        state=dict(default='present',
                   choices=['absent', 'present']),
        avi_api_update_method=dict(default='put',
                                   choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        addrs=dict(type='list',),
        apic_epg_name=dict(type='str',),
        country_codes=dict(type='list',),
        description=dict(type='str',),
        ip_ports=dict(type='list',),
        marathon_app_name=dict(type='str',),
        marathon_service_port=dict(type='int',),
        name=dict(type='str', required=True),
        prefixes=dict(type='list',),
        ranges=dict(type='list',),
        tenant_ref=dict(type='str',),
        url=dict(type='str',),
        uuid=dict(type='str',),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(
        argument_spec=argument_specs, supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'ipaddrgroup',
                           set([]))
def main():
    argument_specs = dict(
        state=dict(default='present',
                   choices=['absent', 'present']),
        avi_api_update_method=dict(default='put',
                                   choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        created_by=dict(type='str',),
        datascript=dict(type='list',),
        description=dict(type='str',),
        ipgroup_refs=dict(type='list',),
        name=dict(type='str', required=True),
        pool_group_refs=dict(type='list',),
        pool_refs=dict(type='list',),
        protocol_parser_refs=dict(type='list',),
        string_group_refs=dict(type='list',),
        tenant_ref=dict(type='str',),
        url=dict(type='str',),
        uuid=dict(type='str',),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(
        argument_spec=argument_specs, supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'vsdatascriptset',
                           set([]))
Esempio n. 13
0
def main():
    argument_specs = dict(
        state=dict(default='present', choices=['absent', 'present']),
        avi_api_update_method=dict(default='put', choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        cloud_config_cksum=dict(type='str', ),
        cloud_ref=dict(type='str', ),
        created_by=dict(type='str', ),
        deployment_policy_ref=dict(type='str', ),
        description=dict(type='str', ),
        fail_action=dict(type='dict', ),
        implicit_priority_labels=dict(type='bool', ),
        members=dict(type='list', ),
        min_servers=dict(type='int', ),
        name=dict(type='str', required=True),
        priority_labels_ref=dict(type='str', ),
        service_metadata=dict(type='str', ),
        tenant_ref=dict(type='str', ),
        url=dict(type='str', ),
        uuid=dict(type='str', ),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(argument_spec=argument_specs,
                           supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'poolgroup', set([]))
Esempio n. 14
0
def main():
    argument_specs = dict(
        state=dict(default='present', choices=['absent', 'present']),
        avi_api_update_method=dict(default='put', choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        azure_serviceprincipal=dict(type='dict', ),
        azure_userpass=dict(type='dict', ),
        gcp_credentials=dict(type='dict', ),
        name=dict(type='str', required=True),
        oci_credentials=dict(type='dict', ),
        private_key=dict(
            type='str',
            no_log=True,
        ),
        public_key=dict(type='str', ),
        tenant_ref=dict(type='str', ),
        tencent_credentials=dict(type='dict', ),
        url=dict(type='str', ),
        uuid=dict(type='str', ),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(argument_spec=argument_specs,
                           supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'cloudconnectoruser', set(['private_key']))
Esempio n. 15
0
def main():
    argument_specs = dict(
        state=dict(default='present', choices=['absent', 'present']),
        avi_api_update_method=dict(default='put', choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        admin_auth_configuration=dict(type='dict', ),
        default_license_tier=dict(type='str', ),
        dns_configuration=dict(type='dict', ),
        dns_virtualservice_refs=dict(type='list', ),
        docker_mode=dict(type='bool', ),
        email_configuration=dict(type='dict', ),
        global_tenant_config=dict(type='dict', ),
        linux_configuration=dict(type='dict', ),
        mgmt_ip_access_control=dict(type='dict', ),
        ntp_configuration=dict(type='dict', ),
        portal_configuration=dict(type='dict', ),
        proxy_configuration=dict(type='dict', ),
        secure_channel_configuration=dict(type='dict', ),
        snmp_configuration=dict(type='dict', ),
        ssh_ciphers=dict(type='list', ),
        ssh_hmacs=dict(type='list', ),
        url=dict(type='str', ),
        uuid=dict(type='str', ),
        welcome_workflow_complete=dict(type='bool', ),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(argument_spec=argument_specs,
                           supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'systemconfiguration', set([]))
def main():
    argument_specs = dict(
        state=dict(default='present', choices=['absent', 'present']),
        avi_api_update_method=dict(default='put', choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        allocate_ip_in_vrf=dict(type='bool', ),
        aws_profile=dict(type='dict', ),
        azure_profile=dict(type='dict', ),
        custom_profile=dict(type='dict', ),
        gcp_profile=dict(type='dict', ),
        infoblox_profile=dict(type='dict', ),
        internal_profile=dict(type='dict', ),
        name=dict(type='str', required=True),
        oci_profile=dict(type='dict', ),
        openstack_profile=dict(type='dict', ),
        proxy_configuration=dict(type='dict', ),
        tenant_ref=dict(type='str', ),
        tencent_profile=dict(type='dict', ),
        type=dict(type='str', required=True),
        url=dict(type='str', ),
        uuid=dict(type='str', ),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(argument_spec=argument_specs,
                           supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'ipamdnsproviderprofile', set([]))
def main():
    argument_specs = dict(
        state=dict(default='present',
                   choices=['absent', 'present']),
        avi_api_update_method=dict(default='put',
                                   choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        account_lock_timeout=dict(type='int',),
        credentials_timeout_threshold=dict(type='int',),
        max_concurrent_sessions=dict(type='int',),
        max_login_failure_count=dict(type='int',),
        max_password_history_count=dict(type='int',),
        name=dict(type='str', required=True),
        url=dict(type='str',),
        uuid=dict(type='str',),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(
        argument_spec=argument_specs, supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'useraccountprofile',
                           set([]))
def main():
    argument_specs = dict(
        state=dict(default='present', choices=['absent', 'present']),
        avi_api_update_method=dict(default='put', choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        action_script_config_ref=dict(type='str', ),
        autoscale_trigger_notification=dict(type='bool', ),
        description=dict(type='str', ),
        email_config_ref=dict(type='str', ),
        external_only=dict(type='bool', required=True),
        level=dict(type='str', required=True),
        name=dict(type='str', required=True),
        snmp_trap_profile_ref=dict(type='str', ),
        syslog_config_ref=dict(type='str', ),
        tenant_ref=dict(type='str', ),
        url=dict(type='str', ),
        uuid=dict(type='str', ),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(argument_spec=argument_specs,
                           supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'actiongroupconfig', set([]))
def main():
    argument_specs = dict(
        state=dict(default='present', choices=['absent', 'present']),
        avi_api_update_method=dict(default='put', choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        accepted_ciphers=dict(type='str', ),
        accepted_versions=dict(type='list', ),
        cipher_enums=dict(type='list', ),
        description=dict(type='str', ),
        dhparam=dict(type='str', ),
        enable_ssl_session_reuse=dict(type='bool', ),
        name=dict(type='str', required=True),
        prefer_client_cipher_ordering=dict(type='bool', ),
        send_close_notify=dict(type='bool', ),
        ssl_rating=dict(type='dict', ),
        ssl_session_timeout=dict(type='int', ),
        tags=dict(type='list', ),
        tenant_ref=dict(type='str', ),
        type=dict(type='str', ),
        url=dict(type='str', ),
        uuid=dict(type='str', ),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(argument_spec=argument_specs,
                           supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'sslprofile', set([]))
Esempio n. 20
0
def main():
    argument_specs = dict(
        state=dict(default='present', choices=['absent', 'present']),
        avi_api_update_method=dict(default='put', choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        action_group_ref=dict(type='str', ),
        alert_rule=dict(type='dict', required=True),
        autoscale_alert=dict(type='bool', ),
        category=dict(type='str', required=True),
        description=dict(type='str', ),
        enabled=dict(type='bool', ),
        expiry_time=dict(type='int', ),
        name=dict(type='str', required=True),
        obj_uuid=dict(type='str', ),
        object_type=dict(type='str', ),
        recommendation=dict(type='str', ),
        rolling_window=dict(type='int', ),
        source=dict(type='str', required=True),
        summary=dict(type='str', ),
        tenant_ref=dict(type='str', ),
        threshold=dict(type='int', ),
        throttle=dict(type='int', ),
        url=dict(type='str', ),
        uuid=dict(type='str', ),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(argument_spec=argument_specs,
                           supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'alertconfig', set([]))
Esempio n. 21
0
def main():
    argument_specs = dict(
        state=dict(default='present',
                   choices=['absent', 'present']),
        avi_api_update_method=dict(default='put',
                                   choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        availability_zone=dict(type='str',),
        cloud_ref=dict(type='str',),
        container_mode=dict(type='bool',),
        container_type=dict(type='str',),
        controller_created=dict(type='bool',),
        controller_ip=dict(type='str',),
        data_vnics=dict(type='list',),
        enable_state=dict(type='str',),
        flavor=dict(type='str',),
        host_ref=dict(type='str',),
        hypervisor=dict(type='str',),
        mgmt_vnic=dict(type='dict',),
        name=dict(type='str',),
        resources=dict(type='dict',),
        se_group_ref=dict(type='str',),
        tenant_ref=dict(type='str',),
        url=dict(type='str',),
        uuid=dict(type='str',),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(
        argument_spec=argument_specs, supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'serviceengine',
                           set([]))
Esempio n. 22
0
def main():
    argument_specs = dict(
        state=dict(default='present', choices=['absent', 'present']),
        avi_api_update_method=dict(default='put', choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        cloud_ref=dict(type='str', ),
        configured_subnets=dict(type='list', ),
        dhcp_enabled=dict(type='bool', ),
        exclude_discovered_subnets=dict(type='bool', ),
        ip6_autocfg_enabled=dict(type='bool', ),
        name=dict(type='str', required=True),
        synced_from_se=dict(type='bool', ),
        tenant_ref=dict(type='str', ),
        url=dict(type='str', ),
        uuid=dict(type='str', ),
        vcenter_dvs=dict(type='bool', ),
        vimgrnw_ref=dict(type='str', ),
        vrf_context_ref=dict(type='str', ),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(argument_spec=argument_specs,
                           supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'network', set([]))
Esempio n. 23
0
def main():
    argument_specs = dict(
        state=dict(default='present', choices=['absent', 'present']),
        avi_api_update_method=dict(default='put', choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        ca_certs=dict(type='list', ),
        created_by=dict(type='str', ),
        crl_check=dict(type='bool', ),
        crls=dict(type='list', ),
        ignore_peer_chain=dict(type='bool', ),
        is_federated=dict(type='bool', ),
        name=dict(type='str', required=True),
        tenant_ref=dict(type='str', ),
        url=dict(type='str', ),
        uuid=dict(type='str', ),
        validate_only_leaf_crl=dict(type='bool', ),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(argument_spec=argument_specs,
                           supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'pkiprofile', set([]))
Esempio n. 24
0
def main():
    argument_specs = dict(
        state=dict(default='present', choices=['absent', 'present']),
        avi_api_update_method=dict(default='put', choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        apic_configuration=dict(type='dict', ),
        apic_mode=dict(type='bool', ),
        autoscale_polling_interval=dict(type='int', ),
        aws_configuration=dict(type='dict', ),
        azure_configuration=dict(type='dict', ),
        cloudstack_configuration=dict(type='dict', ),
        custom_tags=dict(type='list', ),
        dhcp_enabled=dict(type='bool', ),
        dns_provider_ref=dict(type='str', ),
        docker_configuration=dict(type='dict', ),
        east_west_dns_provider_ref=dict(type='str', ),
        east_west_ipam_provider_ref=dict(type='str', ),
        enable_vip_static_routes=dict(type='bool', ),
        gcp_configuration=dict(type='dict', ),
        ip6_autocfg_enabled=dict(type='bool', ),
        ipam_provider_ref=dict(type='str', ),
        license_tier=dict(type='str', ),
        license_type=dict(type='str', ),
        linuxserver_configuration=dict(type='dict', ),
        mesos_configuration=dict(type='dict', ),
        mtu=dict(type='int', ),
        name=dict(type='str', required=True),
        nsx_configuration=dict(type='dict', ),
        obj_name_prefix=dict(type='str', ),
        openstack_configuration=dict(type='dict', ),
        oshiftk8s_configuration=dict(type='dict', ),
        prefer_static_routes=dict(type='bool', ),
        proxy_configuration=dict(type='dict', ),
        rancher_configuration=dict(type='dict', ),
        state_based_dns_registration=dict(type='bool', ),
        tenant_ref=dict(type='str', ),
        url=dict(type='str', ),
        uuid=dict(type='str', ),
        vca_configuration=dict(type='dict', ),
        vcenter_configuration=dict(type='dict', ),
        vtype=dict(type='str', required=True),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(argument_spec=argument_specs,
                           supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'cloud', set([]))
Esempio n. 25
0
def main():
    argument_specs = dict(
        state=dict(default='present', choices=['absent', 'present']),
        avi_api_update_method=dict(default='put', choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        se_agent_properties=dict(type='dict', ),
        se_bootup_properties=dict(type='dict', ),
        se_runtime_properties=dict(type='dict', ),
        url=dict(type='str', ),
        uuid=dict(type='str', ),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(argument_spec=argument_specs,
                           supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'seproperties', set([]))
def main():
    argument_specs = dict(
        state=dict(default='present', choices=['absent', 'present']),
        avi_api_update_method=dict(default='put', choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        ca_certs=dict(type='list', ),
        certificate=dict(type='dict', required=True),
        certificate_base64=dict(type='bool', ),
        certificate_management_profile_ref=dict(type='str', ),
        created_by=dict(type='str', ),
        dynamic_params=dict(type='list', ),
        enckey_base64=dict(type='str', ),
        enckey_name=dict(type='str', ),
        format=dict(type='str', ),
        hardwaresecuritymodulegroup_ref=dict(type='str', ),
        key=dict(
            type='str',
            no_log=True,
        ),
        key_base64=dict(type='bool', ),
        key_params=dict(type='dict', ),
        key_passphrase=dict(
            type='str',
            no_log=True,
        ),
        name=dict(type='str', required=True),
        status=dict(type='str', ),
        tenant_ref=dict(type='str', ),
        type=dict(type='str', ),
        url=dict(type='str', ),
        uuid=dict(type='str', ),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(argument_spec=argument_specs,
                           supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'sslkeyandcertificate',
                           set(['key_passphrase', 'key']))
Esempio n. 27
0
def main():
    argument_specs = dict(
        state=dict(default='present', choices=['absent', 'present']),
        avi_api_update_method=dict(default='put', choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        name=dict(type='str', required=True),
        nodes=dict(type='list', ),
        rejoin_nodes_automatically=dict(type='bool', ),
        tenant_ref=dict(type='str', ),
        url=dict(type='str', ),
        uuid=dict(type='str', ),
        virtual_ip=dict(type='dict', ),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(argument_spec=argument_specs,
                           supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'cluster', set([]))
Esempio n. 28
0
def main():
    argument_specs = dict(
        state=dict(default='present',
                   choices=['absent', 'present']),
        avi_api_update_method=dict(default='put',
                                   choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        application_persistence_profile_ref=dict(type='str',),
        controller_health_status_enabled=dict(type='bool',),
        created_by=dict(type='str',),
        description=dict(type='str',),
        domain_names=dict(type='list',),
        down_response=dict(type='dict',),
        enabled=dict(type='bool',),
        groups=dict(type='list',),
        health_monitor_refs=dict(type='list',),
        health_monitor_scope=dict(type='str',),
        hm_off=dict(type='bool',),
        is_federated=dict(type='bool',),
        min_members=dict(type='int',),
        name=dict(type='str', required=True),
        num_dns_ip=dict(type='int',),
        pool_algorithm=dict(type='str',),
        site_persistence_enabled=dict(type='bool',),
        tenant_ref=dict(type='str',),
        ttl=dict(type='int',),
        url=dict(type='str',),
        use_edns_client_subnet=dict(type='bool',),
        uuid=dict(type='str',),
        wildcard_match=dict(type='bool',),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(
        argument_spec=argument_specs, supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'gslbservice',
                           set([]))
Esempio n. 29
0
def main():
    argument_specs = dict(
        state=dict(default='present', choices=['absent', 'present']),
        avi_api_update_method=dict(default='put', choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        async_interval=dict(type='int', ),
        clear_on_max_retries=dict(type='int', ),
        client_ip_addr_group=dict(type='dict', ),
        description=dict(type='str', ),
        dns_configs=dict(type='list', ),
        is_federated=dict(type='bool', ),
        leader_cluster_uuid=dict(type='str', required=True),
        maintenance_mode=dict(type='bool', ),
        name=dict(type='str', required=True),
        send_interval=dict(type='int', ),
        send_interval_prior_to_maintenance_mode=dict(type='int', ),
        sites=dict(type='list', ),
        tenant_ref=dict(type='str', ),
        third_party_sites=dict(type='list', ),
        url=dict(type='str', ),
        uuid=dict(type='str', ),
        view_id=dict(type='int', ),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(argument_spec=argument_specs,
                           supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    api_method = module.params['avi_api_update_method']
    if str(api_method).lower() == 'patch':
        patch_op = module.params['avi_api_patch_op']
        # Create controller session
        api_creds = AviCredentials()
        api_creds.update_from_ansible_module(module)
        api = ApiSession.get_session(api_creds.controller,
                                     api_creds.username,
                                     password=api_creds.password,
                                     timeout=api_creds.timeout,
                                     tenant=api_creds.tenant,
                                     tenant_uuid=api_creds.tenant_uuid,
                                     token=api_creds.token,
                                     port=api_creds.port)
        # Get existing gslb objects
        rsp = api.get('gslb', api_version=api_creds.api_version)
        existing_gslb = rsp.json()
        gslb = existing_gslb['results']
        sites = module.params['gslb_sites_config']
        for gslb_obj in gslb:
            # Update/Delete domain names in dns_configs fields in gslb object.
            if 'dns_configs' in module.params:
                if gslb_obj['leader_cluster_uuid'] == module.params[
                        'leader_cluster_uuid']:
                    if str(patch_op).lower() == 'delete':
                        gslb_obj['dns_configs'] = []
                    elif str(patch_op).lower() == 'add':
                        if module.params['dns_configs'] not in gslb_obj[
                                'dns_configs']:
                            gslb_obj['dns_configs'].extend(
                                module.params['dns_configs'])
                    else:
                        gslb_obj['dns_configs'] = module.params['dns_configs']
            # Update/Delete sites configuration
            if sites:
                for site_obj in gslb_obj['sites']:
                    dns_vses = site_obj.get('dns_vses', [])
                    for obj in sites:
                        config_for = obj.get('ip_addr', None)
                        if not config_for:
                            return module.fail_json(msg=(
                                "ip_addr of site in a configuration is mandatory. "
                                "Please provide ip_addr i.e. gslb site's ip."))
                        if config_for == site_obj['ip_addresses'][0]['addr']:
                            if str(patch_op).lower() == 'delete':
                                site_obj['dns_vses'] = []
                            else:
                                # Modify existing gslb sites object
                                for key, val in obj.items():
                                    if key == 'dns_vses' and str(
                                            patch_op).lower() == 'add':
                                        found = False
                                        # Check dns_vses field already exists on the controller
                                        for v in dns_vses:
                                            if val[0]['dns_vs_uuid'] != v[
                                                    'dns_vs_uuid']:
                                                found = True
                                                break
                                        if not found:
                                            dns_vses.extend(val)
                                    else:
                                        site_obj[key] = val
                                if str(patch_op).lower() == 'add':
                                    site_obj['dns_vses'] = dns_vses
            uni_dns_configs = [
                dict(tupleized) for tupleized in set(
                    tuple(item.items()) for item in gslb_obj['dns_configs'])
            ]
            gslb_obj['dns_configs'] = uni_dns_configs
            module.params.update(gslb_obj)
        module.params.update({
            'avi_api_update_method': 'put',
            'state': 'present'
        })
    return avi_ansible_api(module, 'gslb', set([]))
Esempio n. 30
0
def main():
    argument_specs = dict(
        state=dict(default='present', choices=['absent', 'present']),
        avi_api_update_method=dict(default='put', choices=['put', 'patch']),
        avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
        active_standby_se_tag=dict(type='str', ),
        allow_invalid_client_cert=dict(type='bool', ),
        analytics_policy=dict(type='dict', ),
        analytics_profile_ref=dict(type='str', ),
        apic_contract_graph=dict(type='str', ),
        application_profile_ref=dict(type='str', ),
        auto_allocate_floating_ip=dict(type='bool', ),
        auto_allocate_ip=dict(type='bool', ),
        availability_zone=dict(type='str', ),
        avi_allocated_fip=dict(type='bool', ),
        avi_allocated_vip=dict(type='bool', ),
        azure_availability_set=dict(type='str', ),
        bulk_sync_kvcache=dict(type='bool', ),
        client_auth=dict(type='dict', ),
        close_client_conn_on_config_update=dict(type='bool', ),
        cloud_config_cksum=dict(type='str', ),
        cloud_ref=dict(type='str', ),
        cloud_type=dict(type='str', ),
        connections_rate_limit=dict(type='dict', ),
        content_rewrite=dict(type='dict', ),
        created_by=dict(type='str', ),
        delay_fairness=dict(type='bool', ),
        description=dict(type='str', ),
        discovered_network_ref=dict(type='list', ),
        discovered_networks=dict(type='list', ),
        discovered_subnet=dict(type='list', ),
        dns_info=dict(type='list', ),
        dns_policies=dict(type='list', ),
        east_west_placement=dict(type='bool', ),
        enable_autogw=dict(type='bool', ),
        enable_rhi=dict(type='bool', ),
        enable_rhi_snat=dict(type='bool', ),
        enabled=dict(type='bool', ),
        error_page_profile_ref=dict(type='str', ),
        floating_ip=dict(type='dict', ),
        floating_subnet_uuid=dict(type='str', ),
        flow_dist=dict(type='str', ),
        flow_label_type=dict(type='str', ),
        fqdn=dict(type='str', ),
        host_name_xlate=dict(type='str', ),
        http_policies=dict(type='list', ),
        ign_pool_net_reach=dict(type='bool', ),
        ip_address=dict(type='dict', ),
        ipam_network_subnet=dict(type='dict', ),
        l4_policies=dict(type='list', ),
        limit_doser=dict(type='bool', ),
        max_cps_per_client=dict(type='int', ),
        microservice_ref=dict(type='str', ),
        min_pools_up=dict(type='int', ),
        name=dict(type='str', required=True),
        network_profile_ref=dict(type='str', ),
        network_ref=dict(type='str', ),
        network_security_policy_ref=dict(type='str', ),
        nsx_securitygroup=dict(type='list', ),
        performance_limits=dict(type='dict', ),
        pool_group_ref=dict(type='str', ),
        pool_ref=dict(type='str', ),
        port_uuid=dict(type='str', ),
        remove_listening_port_on_vs_down=dict(type='bool', ),
        requests_rate_limit=dict(type='dict', ),
        saml_sp_config=dict(type='dict', ),
        scaleout_ecmp=dict(type='bool', ),
        se_group_ref=dict(type='str', ),
        security_policy_ref=dict(type='str', ),
        server_network_profile_ref=dict(type='str', ),
        service_metadata=dict(type='str', ),
        service_pool_select=dict(type='list', ),
        services=dict(type='list', ),
        sideband_profile=dict(type='dict', ),
        snat_ip=dict(type='list', ),
        sp_pool_refs=dict(type='list', ),
        ssl_key_and_certificate_refs=dict(type='list', ),
        ssl_profile_ref=dict(type='str', ),
        ssl_profile_selectors=dict(type='list', ),
        ssl_sess_cache_avg_size=dict(type='int', ),
        sso_policy=dict(type='dict', ),
        sso_policy_ref=dict(type='str', ),
        static_dns_records=dict(type='list', ),
        subnet=dict(type='dict', ),
        subnet_uuid=dict(type='str', ),
        tenant_ref=dict(type='str', ),
        topology_policies=dict(type='list', ),
        traffic_clone_profile_ref=dict(type='str', ),
        traffic_enabled=dict(type='bool', ),
        type=dict(type='str', ),
        url=dict(type='str', ),
        use_bridge_ip_as_vip=dict(type='bool', ),
        use_vip_as_snat=dict(type='bool', ),
        uuid=dict(type='str', ),
        vh_domain_name=dict(type='list', ),
        vh_parent_vs_uuid=dict(type='str', ),
        vip=dict(type='list', ),
        vrf_context_ref=dict(type='str', ),
        vs_datascripts=dict(type='list', ),
        vsvip_cloud_config_cksum=dict(type='str', ),
        vsvip_ref=dict(type='str', ),
        waf_policy_ref=dict(type='str', ),
        weight=dict(type='int', ),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(argument_spec=argument_specs,
                           supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) or requests is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'virtualservice', set([]))