def argument_spec(self):
     argument_spec = dict(
         app_service=dict(type="str"),
         connection_prime=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         defaults_from=dict(type="str"),
         description=dict(type="str"),
         destination_realm=dict(type="str"),
         handshake_timeout=dict(type="int", choices=range(0, 4294967296)),
         host_ip_rewrite=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         max_retransmit_attempts=dict(type="int", choices=range(0, 4294967296)),
         max_watchdog_failure=dict(type="int", choices=range(0, 4294967296)),
         origin_host_to_client=dict(type="str"),
         origin_host_to_server=dict(type="str"),
         origin_realm_to_client=dict(type="str"),
         origin_realm_to_server=dict(type="str"),
         overwrite_destination_host=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         parent_avp=dict(type="str"),
         persist_avp=dict(type="str"),
         reset_on_timeout=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         retransmit_timeout=dict(type="int", choices=range(0, 4294967296)),
         subscriber_aware=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         watchdog_timeout=dict(type="int", choices=range(0, 4294967296)),
     )
     argument_spec.update(F5_PROVIDER_ARGS)
     argument_spec.update(F5_NAMED_OBJ_ARGS)
     return argument_spec
 def argument_spec(self):
     argument_spec = dict(
         automatic_configuration_save_timeout=dict(type='int'),
         auto_discovery=dict(type='str', choices=F5_POLAR_CHOICES),
         auto_discovery_interval=dict(type='int'),
         cache_ldns_servers=dict(type='str', choices=F5_POLAR_CHOICES),
         domain_name_check=dict(type='str', choices=['allow_underscore', 'idn_compatible', 'none', 'strict']),
         drain_persistent_requests=dict(type='str', choices=F5_POLAR_CHOICES),
         forward_status=dict(type='str', choices=F5_ACTIVATION_CHOICES),
         gtm_sets_recursion=dict(type='str', choices=F5_POLAR_CHOICES),
         heartbeat_interval=dict(type='int', choices=range(0, 11)),
         monitor_disabled_objects=dict(type='str', choices=F5_POLAR_CHOICES),
         nethsm_timeout=dict(type='int'),
         peer_leader=dict(type='str'),
         send_wildcards_rrs=dict(type='str', choices=F5_ACTIVATION_CHOICES),
         static_persist_cidr_ipv4=dict(type='int'),
         static_persist_cidr_ipv6=dict(type='int'),
         synchronization=dict(type='str', choices=F5_POLAR_CHOICES),
         synchronization_group_name=dict(type='str'),
         synchronization_time_tolerance=dict(type='int', choices=[0, range(5, 601)]),
         synchronization_timeout=dict(type='int'),
         synchronize_zone_files=dict(type='str', choices=F5_POLAR_CHOICES),
         synchronize_zone_files_timeout=dict(type='int'),
         topology_allow_zero_scores=dict(type='str', choices=F5_POLAR_CHOICES),
         virtuals_depend_on_server_state=dict(type='str', choices=F5_POLAR_CHOICES)
     )
     argument_spec.update(F5_PROVIDER_ARGS)
     return argument_spec
 def argument_spec(self):
     argument_spec = dict(
         app_service=dict(type="str"),
         client_close_timeout=dict(type="int"),
         connpool_idle_timeout_override=dict(type="int"),
         connpool_max_reuse=dict(type="int"),
         connpool_max_size=dict(type="int"),
         connpool_min_size=dict(type="int"),
         connpool_replenish=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         connpool_step=dict(type="int"),
         defaults_from=dict(type="str"),
         description=dict(type="str"),
         force_http_10_response=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         hardware_syn_cookie=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         header_insert=dict(type="str"),
         http_11_close_workarounds=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         idle_timeout=dict(type="int"),
         insert_xforwarded_for=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         layer_7=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         max_header_size=dict(type="int"),
         max_requests=dict(type="int"),
         mss_override=dict(type="int", choices=range(536, 1461)),
         receive_window_size=dict(type="str"),
         reset_on_timeout=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         server_close_timeout=dict(type="int"),
         server_sack=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         server_timestamp=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         unclean_shutdown=dict(type="str", choices=["disabled", "enabled", "fast"]),
     )
     argument_spec.update(F5_PROVIDER_ARGS)
     argument_spec.update(F5_NAMED_OBJ_ARGS)
     return argument_spec
예제 #4
0
 def argument_spec(self):
     argument_spec = dict(
         alert_timeout=dict(type="int"),
         allow_non_ssl=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         app_service=dict(type="str"),
         authenticate=dict(type="str"),
         authenticate_depth=dict(type="int"),
         ca_file=dict(type="str"),
         cache_size=dict(type="int"),
         cache_timeout=dict(type="int", choices=range(0, 86401)),
         cert=dict(type="str"),
         # cert_extension_includes=dict(type='list'),
         # cert_key_chain=dict(type='list'),
         cert_lookup_by_ipaddr_port=dict(type="str"),
         chain=dict(type="str"),
         ciphers=dict(type="str"),
         client_cert_ca=dict(type="str"),
         crl_file=dict(type="str"),
         defaults_from=dict(type="str"),
         description=dict(type="str"),
         handshake_timeout=dict(type="int"),
         key=dict(type="str"),
         mod_ssl_methods=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         mode=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         tm_options=dict(type="list"),
         passphrase=dict(type="str", no_log=True),
         peer_cert_mode=dict(type="str", choices=["ignore", "require"]),
         peer_no_renegotiate_timeout=dict(type="int"),
         proxy_ssl=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         proxy_ssl_passthrough=dict(type="str",
                                    choices=F5_ACTIVATION_CHOICES),
         proxy_ca_cert=dict(type="str"),
         proxy_ca_key=dict(type="str"),
         proxy_ca_passphrase=dict(type="str", no_log=True),
         renegotiate_max_record_delay=dict(type="str"),
         renegotiate_period=dict(type="str"),
         renegotiate_size=dict(type="str"),
         renegotiation=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         retain_certificate=dict(type="bool"),
         secure_renegotiation=dict(type="str"),
         max_renegotiations_per_minute=dict(type="int"),
         server_name=dict(type="str"),
         session_mirroring=dict(type="str"),
         session_ticket=dict(type="str"),
         sni_default=dict(type="bool"),
         sni_require=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         source_ip_blacklist=dict(type="str"),
         source_ip_whitelist=dict(type="str"),
         ssl_forward_proxy=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         ssl_forward_proxy_bypass=dict(type="str",
                                       choices=F5_ACTIVATION_CHOICES),
         strict_resume=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         unclean_shutdown=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         generic_alert=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         ssl_sign_hash=dict(type="str"),
     )
     argument_spec.update(F5_PROVIDER_ARGS)
     argument_spec.update(F5_NAMED_OBJ_ARGS)
     return argument_spec
예제 #5
0
 def argument_spec(self):
     argument_spec = dict(
         default_probe_limit=dict(type='int'),
         hops_ttl=dict(type='int'),
         hops_packet_length=dict(type='int'),
         hops_sample_count=dict(type='int'),
         hops_timeout=dict(type='int'),
         inactive_ldns_ttl=dict(type='int', choices=range(60, 4294967296)),
         ldns_update_interval=dict(type='int'),
         inactive_paths_ttl=dict(type='int', choices=range(60, 4294967296)),
         max_synchronous_monitor_requests=dict(type='int'),
         metrics_caching=dict(type='int', choices=range(0, 604801)),
         metrics_collection_protocols=dict(type='str', choices=['dns_dot', 'dns_rev', 'icmp', 'tcp', 'udp']),
         path_ttl=dict(type='int'),
         paths_retry=dict(type='int')
     )
     argument_spec.update(F5_PROVIDER_ARGS)
     return argument_spec
예제 #6
0
 def argument_spec(self):
     argument_spec = dict(
         alert_timeout=dict(type="int"),
         app_service=dict(type="str"),
         authenticate=dict(type="str"),
         authenticate_depth=dict(type="int"),
         authenticate_name=dict(type="str"),
         ca_file=dict(type="str"),
         cache_size=dict(type="int"),
         cache_timeout=dict(type="int", choices=range(0, 86401)),
         cert=dict(type="str"),
         chain=dict(type="str"),
         ciphers=dict(type="str"),
         crl_file=dict(type="str"),
         defaults_from=dict(type="str"),
         description=dict(type="str"),
         expire_cert_response_control=dict(type="str", choices=["drop", "ignore"]),
         handshake_timeout=dict(type="int"),
         key=dict(type="str"),
         mod_ssl_methods=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         mode=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         tm_options=dict(type="list"),
         passphrase=dict(type="str", no_log=True),
         peer_cert_mode=dict(type="str", choices=["ignore", "require"]),
         proxy_ssl=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         proxy_ssl_passthrough=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         renegotiate_period=dict(type="str"),
         renegotiate_size=dict(type="str"),
         renegotiation=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         retain_certificate=dict(type="bool"),
         generic_alert=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         secure_renegotiation=dict(
             type="str", choices=["request", "require", "require-strict"]
         ),
         server_name=dict(type="str"),
         session_mirroring=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         session_ticket=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         sni_default=dict(type="bool"),
         sni_require=dict(type="bool"),
         ssl_forward_proxy=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         ssl_forward_proxy_bypass=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         ssl_sign_hash=dict(type="str"),
         strict_resume=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         unclean_shutdown=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         untrusted_cert_response_control=dict(
             type="str", choices=["drop", "ignore"]
         ),
     )
     argument_spec.update(F5_PROVIDER_ARGS)
     argument_spec.update(F5_NAMED_OBJ_ARGS)
     return argument_spec
예제 #7
0
 def argument_spec(self):
     argument_spec = dict(
         comment=dict(type='str'),
         configsync_ip=dict(type='str'),
         contact=dict(type='str'),
         description=dict(type='str'),
         ha_capacity=dict(type='int', choices=range(0, 100000)),
         hostname=dict(type='str'),
         location=dict(type='str'),
         mirror_ip=dict(type='str'),
         mirror_secondary_ip=dict(type='str'),
         multicast_interface=dict(type='str'),
         multicast_ip=dict(type='str'),
         multicast_port=dict(type='int'),
         unicast_address=dict(type='list')
     )
     argument_spec.update(F5_PROVIDER_ARGS)
     argument_spec.update(F5_NAMED_OBJ_ARGS)
     return argument_spec
 def argument_spec(self):
     argument_spec = dict(app_service=dict(type='str'),
                          applications=dict(type='list'),
                          cache_aging_rate=dict(type='int',
                                                choices=range(0, 10)),
                          cache_client_cache_control_mode=dict(
                              type='str',
                              choices=['all', 'max-age', 'none']),
                          cache_insert_age_header=dict(
                              type='str', choices=F5_ACTIVATION_CHOICES),
                          cache_max_age=dict(type='int'),
                          cache_max_entries=dict(type='int'),
                          cache_object_max_size=dict(type='int'),
                          cache_object_min_size=dict(type='int'),
                          cache_size=dict(type='int'),
                          cache_uri_exclude=dict(type='list'),
                          cache_uri_include=dict(type='list'),
                          cache_uri_include_override=dict(type='list'),
                          cache_uri_pinned=dict(type='list'),
                          defaults_from=dict(type='str'),
                          metadata_cache_max_size=dict(type='int'))
     argument_spec.update(F5_PROVIDER_ARGS)
     argument_spec.update(F5_NAMED_OBJ_ARGS)
     return argument_spec
예제 #9
0
        from jinja2 import Environment
        from jinja2.utils import concat as j2_concat
        display.warning(
            'jinja2_native requires Jinja 2.10 and above. '
            'Version detected: %s. Falling back to default.' % j2_version
        )
else:
    from jinja2 import Environment
    from jinja2.utils import concat as j2_concat


JINJA2_BEGIN_TOKENS = frozenset(('variable_begin', 'block_begin', 'comment_begin', 'raw_begin'))
JINJA2_END_TOKENS = frozenset(('variable_end', 'block_end', 'comment_end', 'raw_end'))


RANGE_TYPE = type(range(0))


def generate_ansible_template_vars(path, dest_path=None):
    b_path = to_bytes(path)
    try:
        template_uid = pwd.getpwuid(os.stat(b_path).st_uid).pw_name
    except (KeyError, TypeError):
        template_uid = os.stat(b_path).st_uid

    temp_vars = {
        'template_host': to_text(os.uname()[1]),
        'template_path': path,
        'template_mtime': datetime.datetime.fromtimestamp(os.path.getmtime(b_path)),
        'template_uid': to_text(template_uid),
        'template_fullpath': os.path.abspath(path),
예제 #10
0
 def argument_spec(self):
     argument_spec = dict(
         abc=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         ack_on_push=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         app_service=dict(type="str"),
         close_wait_timeout=dict(type="int"),
         cmetrics_cache=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         congestion_control=dict(
             type="str",
             choices=[
                 "cdg",
                 "chd",
                 "cubic",
                 "high-speed",
                 "illinois",
                 "new-reno",
                 "none",
                 "reno",
                 "scalable",
                 "vegas",
                 "westwood",
                 "woodside",
             ],
         ),
         defaults_from=dict(type="str"),
         deferred_accept=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         delay_window_control=dict(type="str",
                                   choices=F5_ACTIVATION_CHOICES),
         delayed_acks=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         description=dict(type="str"),
         dsack=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         early_retransmit=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         ecn=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         fin_wait_timeout=dict(type="int"),
         hardware_syn_cookie=dict(type="str",
                                  choices=F5_ACTIVATION_CHOICES),
         idle_timeout=dict(type="int"),
         init_cwnd=dict(type="int", choices=range(0, 17)),
         init_rwnd=dict(type="int", choices=range(0, 17)),
         ip_tos_to_client=dict(type="int"),
         keep_alive_interval=dict(type="int"),
         limited_transmit=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         link_qos_to_client=dict(type="int"),
         max_retrans=dict(type="int"),
         md5_signature=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         md5_signature_passphrase=dict(type="str", no_log=True),
         minimum_rto=dict(type="int"),
         mptcp=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         mptcp_csum=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         mptcp_csum_verify=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         mptcp_debug=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         mptcp_fallback=dict(
             type="str",
             choices=["accept", "active-accept", "reset", "retransmit"]),
         mptcp_joinmax=dict(type="int"),
         mptcp_nojoindssack=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         mptcp_rtomax=dict(type="int"),
         mptcp_rxmitmin=dict(type="int"),
         mptcp_subflowmax=dict(type="int"),
         mptcp_makeafterbreak=dict(type="str",
                                   choices=F5_ACTIVATION_CHOICES),
         mptcp_timeout=dict(type="int"),
         mptcp_fastjoin=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         nagle=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         pkt_loss_ignore_burst=dict(type="int", choices=range(0, 33)),
         pkt_loss_ignore_rate=dict(type="int", choices=range(0, 1000001)),
         proxy_buffer_high=dict(type="int"),
         proxy_buffer_low=dict(type="int"),
         proxy_mss=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         proxy_options=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         rate_pace=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         receive_window_size=dict(type="int"),
         reset_on_timeout=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         selective_acks=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         selective_nack=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         send_buffer_size=dict(type="int"),
         slow_start=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         syn_cookie_whitelist=dict(type="str",
                                   choices=F5_ACTIVATION_CHOICES),
         syn_max_retrans=dict(type="int"),
         syn_rto_base=dict(type="int"),
         tail_loss_probe=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         time_wait_recycle=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         time_wait_timeout=dict(type="int", choices=range(0, 600001)),
         timestamps=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         verified_accept=dict(type="str", choices=F5_ACTIVATION_CHOICES),
         zero_window_timeout=dict(type="int"),
     )
     argument_spec.update(F5_PROVIDER_ARGS)
     argument_spec.update(F5_NAMED_OBJ_ARGS)
     return argument_spec