Python API Doc

Setup

api.set_araalictl_path(new_path)

set the location of araalictl on this node.

Parameters:

new_path (string) – araalictl path

api.auth(token)

authorize araalictl for api use. This operation is idempotent and can be run multiple times without any side effect App.

Parameters:

token (string) – token is generated from a manually authenticated araalictl

api.deauth()

deauth araalictl from this node.

App

class api.App

A class representing an application

Usage:

>>> import api
>>> app = api.App("nightly", "bendvm")
>>> for link in app.iterlinks():
...    link.accept()
...
>>> app.review()
>>> app.commit()
Parameters:
  • zone (string) – name of the zone

  • app (string) – name of the app

An iterator for all links of the app

Return type:

iterator of api.Link

review()

Review edits made to links in the app. Links can be accepted, denied or snoozed.

commit()

Commit changes made to links in the app.

LinkTable

class api.LinkTable

Class representing an arbitrary table/collection of links (policies), that allows action on multiple links at the same time. Links can be filtered at init, so only filtered links enter the table.

Subsequently action can be taken on all links in the filtered table, or by specifying specific indices. Links can be committed back on a per app basis or for the entire runtime (which essentially iterates over every app in the runtime).

Usage:

>>> links = api.LinkTable(app.iterlinks())
>>> links = links.accept(0,2)
>>> app.review()
>>> app.commit()
Parameters:
  • links (list of api.Link) – a list of link objects

  • *filters (lambda returning boolean) – filter to be applied on the input (of links). An arbitrary number of filters can be specified. There are some predefined filters in the api for common use: api.f.*

accept(*args)

Accept link by index number. If no index is provided, all links in the table will be accepted.

Parameters:

args (any number of int's) – Multiple indices can be passed

deny(*args)

Deny link by index number. If no index is provided, all links in the table will be denied.

Parameters:

args (any number of int's) – Multiple indices can be passed

snooze(*args)

Snooze link by index number. If no index is provided, all links in the table will be snoozed.

Parameters:

args (any number of int's) – Multiple indices can be passed