cscmiko SDK
SDK for cisco Catalyst , Nexus, ASA, wireless lan controllers, built using Netmiko and ntc-templates,
Installing
pip install cscmiko
Getting Started
Example 1:
to get interfaces from the device:
from cscmiko.devices import CatSwitch
my_switch = CatSwitch(host='192.168.1.1', username='admin', password='admin')
my_switch.fetch_interfaces()
for interface in my_switch.interfaces :
print(interface.name , " is " , interface.link_status)
results :
GigabitEthernet1/1/1 is administratively down
GigabitEthernet1/1/2 is administratively down
GigabitEthernet1/1/3 is administratively down
TenGigabitEthernet1/1/4 is up
TenGigabitEthernet1/1/5 is up
TenGigabitEthernet1/2/1 is down
TenGigabitEthernet1/2/2 is up
you can also filter:
filtered = my_switch.filter(status = 'down') # return list of down interfaces objects
Example 2:
to add a VLAN to the device:
from cscmiko.devices import CatSwitch
my_switch = CatSwitch(host='192.168.1.1', username='admin', password='admin')
my_switch.fetch_vlans()
my_switch.vlans.add(id='911', name="Vlan911")
is_ok, msgs = my_switch.commit()
print(is_ok)
results:
True
Example 3:
Nexus switch
from cscmiko.devices import NexusSwitch
my_switch = NexusSwitch(host='192.168.1.2', username='admin', password='admin')
my_switch.fetch_vpc()
print("list of up VPCs :")
for vpc in my_switch.vpcs:
if vpc.is_up:
print("id:",vpc.id,"- port: ",vpc.port)
results:
list of up VPCs :
id: 1 - port: Po99
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Metadata
Release files for cscmiko 0.0.21
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cscmiko-0.0.21.tar.gz | 23.5 kB | Without provenance | Details for cscmiko-0.0.21.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cscmiko-0.0.21-py3-none-any.whl | Python 3 | none | any | Details for cscmiko-0.0.21-py3-none-any.whl |
Total release size: 63.8 kB
Release files / cscmiko-0.0.21.tar.gz
| Download URL | cscmiko-0.0.21.tar.gz |
|---|---|
| Size | 23.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49621baddd3032b93501ed88af98cc4e35b6da9536670578999280eae49768e2
|
|
BLAKE2b-256 checksum How to use checksums |
03753ec2f8d98acac42098fcded3d0a8c768392b81f38f35450a98d563563cc8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.15rc1
|
Release files / cscmiko-0.0.21-py3-none-any.whl
| Download URL | cscmiko-0.0.21-py3-none-any.whl |
|---|---|
| Size | 40.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3eb3d2a4c34a8a387db498a50b5d2ee74f26d54d03d4d39fa1ae0279b5b5c463
|
|
BLAKE2b-256 checksum How to use checksums |
12136682caa2fef65e1edb9f06fb02f76ef700e9ea88810823f31faae2cf4912
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.15rc1
|
Security for cscmiko 0.0.21
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.