Metadata-Version: 2.1
Name: swtoolz
Version: 0.2.0
Summary: SWToolz-Core API wrapper.
Home-page: https://github.com/MXMP/swtoolz-api-wrapper
Author: Kirill Belyaev
Author-email: bandoftoys@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Telecommunications Industry
Classifier: Natural Language :: Russian
Description-Content-Type: text/markdown
Requires-Dist: requests

# SWToolz-Core API wrapper

Make queries to [Swtoolz-Core](https://github.com/MXMP/swtoolz-core) (forked from [xcme/swtoolz-core](https://github.com/xcme/swtoolz-core)) easier than ever.

## Install

```bash
pip install swtoolz
```

## Examples

### Enable port 10 on switch 10.90.90.90

```python
from swtoolz import SWToolz

swtoolz_community_number = 2
swtoolz_port = 7377

swt = SWToolz('swtoolz_url', 'swtoolz_user', swtoolz_community_number, swtoolz_port)
swt.change_port_admin_state('10.90.90.90', 10, 'enabled')
```

## Available methods

### get_port_admin_state(device_ip, port_num, media='copper')

Returns admin state of port in human-readable format ('enabled'/'disabled')

### change_port_admin_state(device_ip, port_num, target_state)

Changes admin state of port to `target_state` ('enabled'/'disabled').


