Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/notification/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/notification/flowdock.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zdd
l	m
Z
ddlmZddl
mZd
�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys�
---
module: flowdock
version_added: "1.2"
author: "Matt Coddington (@mcodd)"
short_description: Send a message to a flowdock
description:
   - Send a message to a flowdock team inbox or chat using the push API (see https://www.flowdock.com/api/team-inbox and https://www.flowdock.com/api/chat)
options:
  token:
    description:
      - API token.
    required: true
  type:
    description:
      - Whether to post to 'inbox' or 'chat'
    required: true
    choices: [ "inbox", "chat" ]
  msg:
    description:
      - Content of the message
    required: true
  tags:
    description:
      - tags of the message, separated by commas
    required: false
  external_user_name:
    description:
      - (chat only - required) Name of the "user" sending the message
    required: false
  from_address:
    description:
      - (inbox only - required) Email address of the message sender
    required: false
  source:
    description:
      - (inbox only - required) Human readable identifier of the application that uses the Flowdock API
    required: false
  subject:
    description:
      - (inbox only - required) Subject line of the message
    required: false
  from_name:
    description:
      - (inbox only) Name of the message sender
    required: false
  reply_to:
    description:
      - (inbox only) Email address for replies
    required: false
  project:
    description:
      - (inbox only) Human readable identifier for more detailed message categorization
    required: false
  link:
    description:
      - (inbox only) Link associated with the message. This will be used to link the message subject in Team Inbox.
    required: false
  validate_certs:
    description:
      - If C(no), SSL certificates will not be validated. This should only be used
        on personally controlled sites using self-signed certificates.
    required: false
    default: 'yes'
    type: bool
    version_added: 1.5.1

requirements: [ ]
s"
- flowdock:
    type: inbox
    token: AAAAAA
    from_address: [email protected]
    source: my cool app
    msg: test from ansible
    subject: test subject

- flowdock:
    type: chat
    token: AAAAAA
    external_user_name: testuser
    msg: test from ansible
    tags: tag1,tag2,tag3
(t
AnsibleModule(t	urlencode(t	fetch_urlc	!C`s8tdtdtdtdt�dtdt�dtdtddd	g�d
tdt�dtdt�dtdt�d
tdt�dtdt�dtdt�dtdt�dtdt�dtdt�dtdddd��
dt�}|jd}|jd}|dkr&d|}n
d|}i}|jd|d<|jd
r�|dkrs|jdd�q�|jd
|d
<n|d	kr�|jdd�nx~ddd
gD]m}|j|r|d	kr�|jdd|�q#|j|||<q�|dkr�|jdd|�q�q�W|jdrH|jd|d<nx^ddddgD]J}|j|r[|d	kr�|jdd|�q�|j|||<q[q[W|jr�|jdt�nt|�}t	||d |�\}}|d!d"kr|jdd#|d�n|jdtd|jd�dS($Nt
argument_specttokentrequiredtno_logtmsgttypetchoicestinboxtchattexternal_user_nametfrom_addresstsourcetsubjectt	from_nametreply_totprojectttagstlinktvalidate_certstdefaulttyestbooltsupports_check_modes2https://api.flowdock.com/v1/messages/team_inbox/%ss,https://api.flowdock.com/v1/messages/chat/%stcontents4external_user_name is not valid for the 'inbox' types2external_user_name is required for the 'chat' types#%s is not valid for the 'chat' types#%s is required for the 'inbox' typetchangedtdataRi�sunable to send msg: %s(
RtdicttTruetFalsetparamst	fail_jsont
check_modet	exit_jsonR	R
(	tmoduleRRturlR(titemR$tresponsetinfo((sI/usr/lib/python2.7/site-packages/ansible/modules/notification/flowdock.pytmainpsd	







	t__main__N(t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStansible.module_utils.basicRt+ansible.module_utils.six.moves.urllib.parseR	tansible.module_utils.urlsR
R1t__name__(((sI/usr/lib/python2.7/site-packages/ansible/modules/notification/flowdock.pyt<module>s


G	M

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