Module Import alias Import alias Import alias Import alias FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Num Return NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign NameStore Call AttributeLoad Call NameLoad Str attr Str Assign NameStore Call NameLoad Str If BoolOpAnd UnaryOpNot Call AttributeLoad NameLoad attr Str UnaryOpNot Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad NameLoad NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Str BinOpAdd Str NameLoad If NameLoad body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad keyword Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Dict Str Str NameLoad NameLoad If NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad If NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore Dict Str Str Str Str Expr Call NameLoad NameLoad NameLoad Str Str NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict Str Str NameLoad NameLoad Assign NameStore Dict Str Str TryExcept body Expr Call NameLoad NameLoad NameLoad Str Str keyword NameLoad keyword NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad Return Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Dict Str Str Assign NameStore Call NameLoad NameLoad NameLoad Str NameLoad Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict Str Str NameLoad NameLoad Assign NameStore Dict Str Str Str Str Expr Call NameLoad NameLoad NameLoad Str Str NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Str NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Dict Str Str Assign NameStore Call NameLoad NameLoad NameLoad Str NameLoad Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad Num body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign NameStore Call NameLoad If BoolOpAnd NameLoad CompareIn NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str For NameStore Call NameLoad Call AttributeLoad NameLoad attr body If CompareNotEq NameLoad Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd BinOpAdd Str Call AttributeLoad NameLoad attr keyword NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args defaults body Return Dict Str Str Str Str Str Str Str NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad If CompareIn NameLoad NameLoad body Return SubscriptLoad NameLoad Index NameLoad Expr Call NameLoad keyword Num decorator_list FunctionDef arguments args NameParam defaults vararg body TryExcept body Expr Call Call NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad body Expr Call NameLoad NameLoad keyword Num decorator_list If CompareEq NameLoad Str body If CompareLt Call NameLoad AttributeLoad NameLoad attr Num body Expr Call NameLoad keyword Num Expr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Slice Num
N/A N/A json N/A os N/A sys N/A urllib2 get_env N/A N/A name N/A N/A N/A env N/A N/A N/A os environ get name N/A N/A env N/A N/A N/A N/A N/A sys stderr write N/A N/A ERROR: missing {}
 format name N/A N/A N/A sys exit 5 N/A env N/A Request N/A N/A urllib2 Request N/A __init__ N/A N/A self method N/A args kwargs N/A N/A N/A self _method method N/A N/A N/A N/A urllib2 Request __init__ self args kwargs N/A get_method N/A N/A self N/A N/A N/A N/A self _method N/A N/A proxy_request N/A N/A service_name instance_name method path body headers N/A None None N/A N/A target N/A N/A N/A get_env TSURU_TARGET rstrip / N/A token N/A get_env TSURU_TOKEN N/A N/A N/A N/A N/A target startswith http:// N/A N/A N/A target startswith https:// N/A N/A target N/A N/A http://{} format target N/A url N/A N/A {}/services/{}/proxy/{}?callback={} format target service_name instance_name path N/A body N/A N/A body N/A N/A json dumps body N/A request N/A Request method url data body N/A N/A N/A request add_header Authorization N/A bearer  token N/A headers N/A N/A N/A header value N/A N/A headers items N/A N/A N/A N/A request add_header header value N/A N/A N/A urllib2 urlopen request timeout 30 N/A add_url N/A N/A service_name name url expected_string comment N/A None None N/A N/A 
    add-url add a new url checker to the given instance. Usage:

        add-url <service-name> <instance-name> <url> [expected_string] [comment]

    expected_string is an optional parameter that represents the string that
    the healthcheck should expect to find in the body of the response. Example:

        tsuru {plugin_name} add-url hcaas mysite http://mysite.com/hc WORKING

    comment is an optional parameter that refers to what to do when a trigger
    is triggered. Example:

        tsuru {plugin_name} add-url hcaas mysite http://mysite.com/hc 'restart the app'

     N/A data N/A name url name url N/A expected_string N/A N/A N/A data N/A expected_string expected_string N/A comment N/A N/A N/A data N/A comment comment N/A headers N/A Content-Type Accept application/json text/plain N/A N/A proxy_request service_name name POST /url data headers N/A msg N/A N/A url {} successfully added!
 format url N/A N/A N/A N/A sys stdout write msg N/A remove_url N/A N/A service_name name url N/A N/A N/A 
    remove-url removes the specified url checker from the specified instance.
    Usage:

        remove-url <service_name> <name> <url>

    Example:

        tsuru {plugin_name} remove-url hcaas mysite http://mysite.com/hc
     N/A body N/A name url name url N/A headers N/A Content-Type application/json N/A N/A N/A N/A proxy_request service_name name DELETE /url body body headers headers N/A N/A N/A N/A urllib2 HTTPError N/A N/A N/A N/A N/A sys stdout write N/A URL %s not found.
 url N/A N/A msg N/A N/A url {} successfully removed!
 format url N/A N/A N/A N/A sys stdout write msg N/A list_urls N/A N/A service_name name N/A N/A N/A 
    list-urls list all urls from an instance.
    Usage:

        list-urls <service_name> <name>

    Example:

        tsuru {plugin_name} list-urls hcaas mysite
     N/A url N/A N/A /url?name={} format name N/A headers N/A Content-Type application/json N/A response N/A proxy_request service_name name GET url headers N/A urls N/A N/A response read N/A N/A N/A N/A sys stdout write N/A urls N/A add_watcher N/A N/A service_name name watcher N/A N/A N/A 
    add-watcher creates a new watcher for the given monitoring instance. A
    watcher is an email address that will receive notifications for this
    instance. Usage:

        add-watcher <service_name> <instance-name> <email>

    Example:

        tsuru {plugin_name} add-watcher hcaas mysite mysite+monit@mycompany.com
     N/A data N/A name watcher name watcher N/A headers N/A Content-Type Accept application/json text/plain N/A N/A proxy_request service_name name POST /watcher data headers N/A msg N/A N/A watcher {} successfully added!
 format watcher N/A N/A N/A N/A sys stdout write msg N/A remove_watcher N/A N/A service_name name watcher N/A N/A N/A 
    remove-watcher removes the specified watcher from the given monitoring
    instance. Usage:

        remove-watcher <service_name> <instance-name> <email>

    Example:

        tsuru {plugin_name} remove-watcher hcaas mysite mysite+monit@mycompany.com
     N/A url N/A N/A /{}/watcher/{} format name watcher N/A N/A proxy_request service_name name DELETE url N/A msg N/A N/A watcher {} successfully removed!
 format watcher N/A N/A N/A N/A sys stdout write msg N/A list_watchers N/A N/A service_name name N/A N/A N/A 
    list-watchers list all watchers from an instance.
    Usage:

        list-watchers <service_name> <name>

    Example:

        tsuru {plugin_name} list-watchers hcaas mysite
     N/A url N/A N/A /watcher?name={} format name N/A headers N/A Content-Type application/json N/A response N/A proxy_request service_name name GET url headers N/A watchers_json N/A N/A response read N/A watchers N/A N/A json loads watchers_json N/A watcher watchers N/A N/A N/A N/A N/A sys stdout write N/A watcher N/A show_help N/A N/A command_name exit N/A None 0 N/A N/A 
    help displays the help of the specified command. Usage:

        help <command-name>

    Example:

        tsuru {plugin_name} help [command-name]

    The command-name is optional, when omitted the plugin will list all
    available commands.
     N/A plugin_name N/A N/A N/A os environ get TSURU_PLUGIN_NAME hc N/A commands N/A _get_commands N/A N/A command_name N/A command_name commands N/A N/A command N/A commands N/A command_name N/A doc N/A N/A N/A command __doc__ format plugin_name plugin_name N/A N/A N/A N/A sys stderr write N/A N/A N/A doc rstrip N/A N/A N/A sys exit exit N/A msg Usage: tsuru {plugin_name} command [args]

 N/A N/A N/A N/A sys stderr write N/A N/A msg format plugin_name plugin_name N/A N/A N/A N/A sys stderr write Available commands:
 N/A name N/A sorted N/A N/A commands keys N/A N/A N/A name help N/A N/A N/A N/A N/A sys stderr write N/A N/A   {}
 format name N/A N/A N/A N/A sys stderr write   help
 N/A msg Use tsuru {plugin_name} help <commandname> to get more details. N/A N/A N/A N/A sys stderr write N/A N/A N/A N/A msg format plugin_name plugin_name N/A N/A N/A sys exit exit N/A _get_commands N/A N/A N/A N/A N/A N/A add-url remove-url list-urls add-watcher remove-watcher list-watchers help add_url remove_url list_urls add_watcher remove_watcher list_watchers show_help N/A command N/A N/A command_name N/A N/A N/A commands N/A _get_commands N/A N/A command_name commands N/A N/A N/A commands N/A command_name N/A N/A show_help exit 2 N/A main N/A N/A cmd N/A args N/A N/A N/A N/A N/A N/A command cmd args N/A N/A N/A TypeError N/A N/A N/A show_help cmd exit 2 N/A N/A N/A __name__ __main__ N/A N/A N/A N/A len N/A sys argv 2 N/A N/A N/A show_help exit 2 N/A N/A main N/A N/A sys argv N/A 1 N/A N/A sys argv N/A 2