This Django app serves as the REST API for Salt.
Project description
This Django app serves as a REST API for Salt. It is basically a very thing wrapper around the salt-api package.
The main motivation behind creating a Django package to interface with Salt is that Django is already in our software stack. And secondly, from our tests it seems that salt-api is taking a few percent CPU all the time, even when supposedly idle. Perhaps that will be fixed in a future release of salt-api but for now this package is a good workaround for us.
This package comes with some caveats. This app compared to salt-api:
this app only supports x-www-form-urlencoded data input for the API wrapper or input snarfed from the URL, whereas salt-api supports other data formats
this app only supports JSON data output
Installation
Add django_saltapi to your INSTALLED_APPS setting in your project settings.py:
INSTALLED_APPS = ( [...] 'django_saltapi', )
Add Salt settings in your project settings.py:
SALT_CONFIG = { 'master_config': '/etc/salt/master', }
Include the package URLconf in your project urls.py like so:
url(r'^api/salt/', include('django_saltapi.urls')),
Usage
Visit http://salt/api/salt/ to view the default static HTML page.
Issue a Salt ping to all minions via the API wrapper:
django-saltapi '*' test.ping
Issue a Salt ping via explicitly exposed functions:
django-saltapi-ping all django-saltapi-echo all x
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.