Exemplo n.º 1
0
 def configureIPAddr(self):
     logger.info("configureIPAddr")
     psCmd = util.CmdTemplate.format(
         "connectAndAddIP -start {} -end {}".format(
             self.cfg.json[self.testName]["startvm"],
             self.cfg.json[self.testName]["endvm"]))
     logger.info(psCmd)
     util.execPSCommand(psCmd)
Exemplo n.º 2
0
 def _removeInterfaceFromVM(self):
     logger.info("removeInterfaceFromVM")
     psCmd = util.CmdTemplate.format(
         "removeInterfacesFromLinuxVM -start {} -end {} -numOfInf {} {}".
         format(self.cfg.json[self.testName]["startvm"],
                self.cfg.json[self.testName]["endvm"],
                self.cfg.json[self.testName]["numOfIntf"],
                self.cfg.json[self.testName]["VDSwithName"]))
     logger.info(psCmd)
     util.execPSCommand(psCmd)
Exemplo n.º 3
0
 def _addInterfaceToVM(self):
     logger.info("addInterfaceToVM")
     print(self.testName)
     psCmd = util.CmdTemplate.format(
         "AddInterfacesToLinuxVM -start {} -end {} -numOfInf {} {}".format(
             self.cfg.json[self.testName]["startvm"],
             self.cfg.json[self.testName]["endvm"],
             self.cfg.json[self.testName]["numOfIntf"],
             self.cfg.json[self.testName]["VDSwithName"]))
     logger.info(psCmd)
     util.execPSCommand(psCmd)
Exemplo n.º 4
0
 def _powerIXIA(self, action):
     if action == "ON":
         psCmd = util.CmdTemplate.format("powerOnIxia")
     elif action == "OFF":
         psCmd = util.CmdTemplate.format("shutDownIxia")
     else:
         raise CertException("action = " + action)
     logger.info(psCmd)
     util.execPSCommand(psCmd)
     if action == "OFF":
         psCmd = util.CmdTemplate.format("deleteIxia")
         logger.info(psCmd)
         util.execPSCommand(psCmd)
Exemplo n.º 5
0
 def _Infrastructure(self, action):
     logger.info("{} Infrastructure".format(action))
     if action == "SETUP":
         psCmd = util.CmdTemplate.format(
             "prepareInfra -perfClusterName \"{}\"".format(
                 self.cfg.json["ClusterName"]))
     elif action == "CLEAR":
         psCmd = util.CmdTemplate.format(
             "clearInfraConfig -perfClusterName \"{}\"".format(
                 self.cfg.json["ClusterName"]))
     else:
         raise CertException("action = " + action)
     logger.info(psCmd)
     util.execPSCommand(psCmd)
Exemplo n.º 6
0
 def _powerVM(self, action):
     logger.info("_powerVM: " + action)
     if action == "ON":
         psCmd = util.CmdTemplate.format(
             "powerOnLinuxVM -start {} -end {}".format(
                 self.cfg.json[self.testName]["startvm"],
                 self.cfg.json[self.testName]["endvm"]))
     elif action == "OFF":
         psCmd = util.CmdTemplate.format(
             "shutDownLinuxVMs -start {} -end {}".format(
                 self.cfg.json[self.testName]["startvm"],
                 self.cfg.json[self.testName]["endvm"]))
     else:
         raise CertException("action = " + action)
     logger.info(psCmd)
     util.execPSCommand(psCmd)
Exemplo n.º 7
0
 def _VM(self, action):
     logger.info("_VM: " + action)
     if action == "ADD":
         psCmd = util.CmdTemplate.format(
             "prepareVerticalScale -start {} -end {}".format(
                 self.cfg.json[self.testName]["startvm"],
                 self.cfg.json[self.testName]["endvm"]))
     elif action == "DELETE":
         psCmd = util.CmdTemplate.format(
             "deleteLinuxVMs -start {} -end {}".format(
                 self.cfg.json[self.testName]["startvm"],
                 self.cfg.json[self.testName]["endvm"]))
     else:
         raise CertException("action = " + action)
     logger.info(psCmd)
     util.execPSCommand(psCmd)
Exemplo n.º 8
0
 def _getAllVM_IPAddr(self):
     logger.info("_getAllVM_IPAddr")
     cmd = "C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\powershell.exe " \
           " -F ..\\testscripts\\CallbackScale362\\GetAllVM_IPAddr.ps1 "
     util.execPSCommand(cmd)