Make queries to Swtoolz-Core (forked from xcme/swtoolz-core) easier than ever.
pip install swtoolz
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')
Returns admin state of port in human-readable format ('enabled'/'disabled')
Changes admin state of port to target_state
('enabled'/'disabled').