Skip to main content

spectrum-client

image image image


CA Spectrum Web Services API wrapper

Instalation

spectrum-client is distributed on PyPI and is available on Linux/macOS and Windows and supports Python 2.7, 3.4+.

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
notes = 'Some notes'
updates = [(0x11564, notes), (0x12db9, 'JKL002'), (0x1295d, False)]
oc.update_attributes(mh, updates)

# Get a list of devices by name, using regex, restricting the search to landscape 0x200000
oc.devices_by_name('^SW00', 0x200000)

# Get a lis tof devices by specific attribute from all landscapes
oc.devices_by_attr(0x12db9, 'XYZ001')

# Get a list of devices by multipe matching 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)

# Create an event of type 0x10f06 (generates a High Memory Utilization alarm) on a device with IP Address.
event = '0x10f06'
device_ip = '10.10.0.1'
var_binds = {0: 75, 1: 99, 3: 'mem_instance', 5: 'name'}

oc.generate_event_by_ip(event, device_ip, var_binds)

If not provided, server and credentials will be read from the environment variables SPECTRUM_URL, SPECTRUM_USERNAME, SPECTRUM_PASSWORD.

Metadata

Release files for spectrum-client 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spectrum-client 0.4.1
File Size Uploaded
spectrum-client-0.4.1.tar.gz 6.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for spectrum-client 0.4.1
File Interpreter ABI Platform
spectrum_client-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 13.5 kB

Release files / spectrum-client-0.4.1.tar.gz

Download URL spectrum-client-0.4.1.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c76fff2030fdfebcc78a74b18ac9d6682b4ec0d00baf0a9a139659eed1b86241
BLAKE2b-256 checksum
How to use checksums
2cb2a082212de9ffd8789b3868f41bc83fb352f49cbfa57ae9ae6bc081210c94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Release files / spectrum_client-0.4.1-py3-none-any.whl

Download URL spectrum_client-0.4.1-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a6a36167995ac998dd8027d22dba33f380259856c51aecd841a4b6051ba8eb19
BLAKE2b-256 checksum
How to use checksums
a4c2e6f574d8fc71692a9e6c008ec56558d2449bc0d0e9fe7068f72caa5c0662
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files

0.3.0

3 release files

0.2.4

3 release files

0.2.2

3 release files

0.2.1

3 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page