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.
Source Distribution
File details
Details for the file django-saltapi-0.7.5.tar.gz
.
File metadata
- Download URL: django-saltapi-0.7.5.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d157236aff511eafca339eca0538ec79b839a221ce2a666cde7468fe4066243 |
|
MD5 | a9499f0b49349e36c37a50c35c8476e7 |
|
BLAKE2b-256 | 2666a525fafc2531d6de83b0630c606947bf6bd72dcdb1af0eeec690b7fc741b |