CA Spectrum Web Services API wrapper
Project description
spectrum-client
CA Spectrum Web Services API wrapper
Instalation
spectrum-client is distributed on PyPI and is available on Linux/macOS and Windows and supports Python 3.6+.
$ pip install -U spectrum-client
Usage
from spectrum_client import Spectrum
oc = Spectrum('http://oneclick.mydomain:8080', 'myuser', 'secret')
# Update a model attribute
oc.update_attribute(0x210afa, 0x10024, 'MySNMPSecret')
# Update multiple attributes
updates = [(0x11564, notes), (0x12db9, 'JKL002'), (0x1295d, False)]
oc.update_attributes(mh, updates)
# Get a list of devices by name (only from landscape 0xa00000)
oc.devices_by_name('^SW00', 0xa00000)
# Get a lis tof devices by specific attribute from all landscapes
return oc.devices_by_attr(0x12db9, 'XYZ001')
# Get a list of devices by multipe matchng filters
oc.devices_by_filters([(attr1, 'equals', value1), (attr2, 'has-pcre', '^foo.*bar')], landscape)
# Put a model in maintenance mode
oc.set_maintenance(model_handle, True)
# Remove a model from maintenance mode
oc.set_maintenance(model_handle, False)
If not provided, server and credentials will be read from the environment variables SPECTRUM_URL
, SPECTRUM_USERNAME
, SPECTRUM_PASSWORD
.
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
spectrum-client-0.1.2.tar.gz
(4.3 kB
view hashes)
Built Distribution
Close
Hashes for spectrum_client-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c4687b7f0394c1c2810161d6574d262cdfc5fd7ebc1764ba61696d9448a4033 |
|
MD5 | 25161cf1777fade463e35829f5a07920 |
|
BLAKE2b-256 | ccbe6efe6e5310081ea1a0c5ee6e4ede75e6915fc8046b702c9f16a54d9e4c25 |