def ApplyConf(client, ports): common.SendCommand(client, "conf t") file = open('switchport.txt') configurations = file.readlines() for port in ports: common.Print("Configuring " + port.Name) common.SendCommand(client, "default int " + port.Name) common.Loading(1) common.SendCommand(client, "int " + port.Name) common.SendCommands(client, configurations) common.Loading(2) print('') common.SaveConfig(client)
def ApplyConf(client): file = open('shrun.txt') configurations = file.readlines() common.Print("Getting Information from Device") common.SendCommands(client, configurations) common.Loading(5, '', True) return client.recv(100000)
def ApplyConf(client): file = open('conf.txt') configurations = file.readlines() common.SendCommand(client, "conf t") common.Print("Apply Configuration") common.SendCommands(client, configurations) common.Loading(3, '', True) common.SaveConfig(client)