Esempio n. 1
0
 def test(self):
     commands = ["sudo ifconfig eth1 netmask 255.255.0.0", \
         "sudo ifconfig eth2 netmask 255.255.0.0", \
         "sudo ifconfig eth3 netmask 255.255.0.0", \
         "sudo ifconfig eth4 netmask 255.255.0.0", \
         "sudo ifconfig eth5 netmask 255.255.0.0"]
     gl.exec_ssh_commands(self.targets, commands)
Esempio n. 2
0
 def test(self):
     commands = ["sudo ifconfig eth1 netmask 255.255.0.0", \
         "sudo ifconfig eth2 netmask 255.255.0.0", \
         "sudo ifconfig eth3 netmask 255.255.0.0", \
         "sudo ifconfig eth4 netmask 255.255.0.0", \
         "sudo ifconfig eth5 netmask 255.255.0.0"]
     gl.exec_ssh_commands(self.targets, commands)
Esempio n. 3
0
 def getinfo(self):
     gl.exec_ssh_commands(self.targets,
         ["route > route-log",
         "ifconfig > ifconfig-log"])
     log_filename = self.log_formatname.format(target="{target}",logfile="route-log")
     command = "scp {target}:route-log " + log_filename
     gl.exec_command(self.targets, command)
     log_filename = self.log_formatname.format(target="{target}",logfile="ifconfig-log")
     command = "scp {target}:ifconfig-log " + log_filename
     gl.exec_command(self.targets, command)
Esempio n. 4
0
 def getinfo(self):
     gl.exec_ssh_commands(self.targets,
                          ["route > route-log", "ifconfig > ifconfig-log"])
     log_filename = self.log_formatname.format(target="{target}",
                                               logfile="route-log")
     command = "scp {target}:route-log " + log_filename
     gl.exec_command(self.targets, command)
     log_filename = self.log_formatname.format(target="{target}",
                                               logfile="ifconfig-log")
     command = "scp {target}:ifconfig-log " + log_filename
     gl.exec_command(self.targets, command)
Esempio n. 5
0
 def stop(self):
     commands = ["sudo /etc/init.d/quagga stop"]
     gl.exec_ssh_commands(self.targets, commands)
Esempio n. 6
0
 def restart(self):
     commands = ["sudo /etc/init.d/quagga restart"]
     gl.exec_ssh_commands(self.targets, commands)
Esempio n. 7
0
 def configure(self):
     command = "scp routeconfig.sh {target}:."
     gl.exec_command(self.targets, command)
     commands = ["sudo chmod +x routeconfig.sh"]
     gl.exec_ssh_commands(self.targets, commands)
Esempio n. 8
0
 def stop(self):
     commands = ["sudo /etc/init.d/quagga stop"]
     gl.exec_ssh_commands(self.targets, commands)
Esempio n. 9
0
 def restart(self):
     commands = ["sudo /etc/init.d/quagga restart"]
     gl.exec_ssh_commands(self.targets, commands)
Esempio n. 10
0
 def configure(self):
     command = "scp routeconfig.sh {target}:."
     gl.exec_command(self.targets, command)
     commands = ["sudo chmod +x routeconfig.sh"]
     gl.exec_ssh_commands(self.targets, commands)