cscmiko-0.0.9
توضیحات
cisco devices SDK based on netmiko
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | cscmiko-0.0.9 |
| نام | cscmiko |
| نسخه کتابخانه | 0.0.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | ali aqrabawi |
| ایمیل نویسنده | ali_aqrabawi@yahoo.com |
| آدرس صفحه اصلی | https://github.com/Ali-aqrabawi/cscmiko |
| آدرس اینترنتی | https://pypi.org/project/cscmiko/ |
| مجوز | - |
# 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](https://github.com/Ali-aqrabawi/cscmiko/blob/master/CONTRIBUTION.md) for details on our code of conduct, and the process for submitting pull requests to us.
نیازمندی
| مقدار | نام |
|---|---|
| - | jinja2 |
| - | netmiko |
نحوه نصب
نصب پکیج whl cscmiko-0.0.9:
pip install cscmiko-0.0.9.whl
نصب پکیج tar.gz cscmiko-0.0.9:
pip install cscmiko-0.0.9.tar.gz