def cping(src,dest): ping_device = device('ping_device','cisco',src) for address in dest: ping_results = ping_device.cli('ping '+ address).split('\n')[-1].split(',')[0] print '-----------------------------------------------------' print 'SOURCE: ' + src + ' DESTINATION: ' + address print ping_results print '-----------------------------------------------------'
from cpal.core.main import device r1 = device('r1', 'cisco', '10.1.1.110') r1.getBaseMAC() r1.native.disconnect()
from cpal.core.main import device r1 = device('r1','cisco','10.1.1.110') r1.getBaseMAC() r1.native.disconnect()