Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/network/skydive/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/network/skydive/skydive_capture.pyc

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddlm
Z
d
�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatustnetworktsupported_bys�
---
module: skydive_capture
version_added: "2.8"
author:
  - "Sumit Jaiswal (@sjaiswal)"
short_description: Module which manages flow capture on interfaces
description:
  - This module manages flow capture on interfaces. The Gremlin
    expression is continuously evaluated which means that it is
    possible to define a capture on nodes that do not exist yet.
  - It is useful when you want to start a capture on all OpenvSwitch
    whatever the number of Skydive agents you will start.
  - While starting the capture, user can specify the capture name,
    capture description and capture type optionally.
requirements:
  - skydive-client
extends_documentation_fragment: skydive
options:
  query:
    description:
      - It's the complete gremlin query which the users can input,
        I(G.V().Has('Name', 'eth0', 'Type', 'device')), to create
        the capture. And, if the user directly inputs the gremlin
        query then user is not required to input any other module
        parameter as gremlin query takes care of creating the flow
        capture.
    required: false
  interface_name:
    description:
      - To define flow capture interface name.
    required: false
  type:
    description:
      - To define flow capture interface type.
    required: false
  capture_name:
    description:
      - To define flow capture name.
    required: false
    default: ""
  description:
    description:
      - Configures a text string to be associated with the instance
        of this object.
    default: ""
  extra_tcp_metric:
    description:
      - To define flow capture ExtraTCPMetric.
    type: bool
    default: false
  ip_defrag:
    description:
      - To define flow capture IPDefrag.
    type: bool
    default: false
  reassemble_tcp:
    description:
      - To define flow capture ReassembleTCP.
    type: bool
    default: false
  layer_key_mode:
    description:
      - To define flow capture Layer KeyMode.
    type: str
    default: L2
  state:
    description:
      - State of the flow capture. If value is I(present) flow capture
        will be created else if it is I(absent) it will be deleted.
    default: present
    choices:
      - present
      - absent
s�
- name: start a new flow capture directly from gremlin query
  skydive_capture:
    query: G.V().Has('Name', 'eth0', 'Type', 'device')
    state: present
    provider:
      endpoint: localhost:8082
      username: admin
      password: admin

- name: stop the flow capture directly from gremlin query
  skydive_capture:
    query: G.V().Has('Name', 'eth0', 'Type', 'device')
    state: absent
    provider:
      endpoint: localhost:8082
      username: admin
      password: admin

- name: start a new flow capture from user's input
  skydive_capture:
    interface_name: Node1
    type: myhost
    capture_name: test_capture
    description: test description
    extra_tcp_metric: true
    ip_defrag: true
    reassemble_tcp: true
    state: present
    provider:
      endpoint: localhost:8082
      username: admin
      password: admin

- name: stop the flow capture
  skydive_capture:
    interface_name: Node1
    type: myhost
    capture_name: test_capture
    description: test description
    extra_tcp_metric: true
    ip_defrag: true
    reassemble_tcp: true
    state: absent
    provider:
      endpoint: localhost:8082
      username: admin
      password: admin
s # (t
AnsibleModule(tskydive_flow_capturecC`s�tdtdtdt�dtdtdt�dtdtdt�dtdtdddt�d	tdddt�d
tdddtdtdt�dtdddtdtdt�d
tdddtdtdt�dtdtdtdd��	}tdtdt�dtdddddg��}|j|�|jtj�td|dt�}t|�}|j|�}|j|�dS(s+ Main entry point for module execution
    tquerytrequiredtib_reqtinterface_namettypetcapture_nametdefaultttdescriptiontextra_tcp_metrictboolt	ip_defragtreassemble_tcptlayer_key_modetL2tprovidertstatetpresenttchoicestabsentt
argument_spectsupports_check_modeN(	tdicttFalsetTruetupdateR	t
provider_specRtrunt	exit_json(tib_specRtmoduletskydive_objtresult((sS/usr/lib/python2.7/site-packages/ansible/modules/network/skydive/skydive_capture.pytmain�s(!!!
	t__main__N(t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRt(ansible.module_utils.network.skydive.apiR	R+t__name__(((sS/usr/lib/python2.7/site-packages/ansible/modules/network/skydive/skydive_capture.pyt<module>s


L2	 

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]