本文整理汇总了Golang中github.com/contiv/systemtests-utils.TestbedNode.GetName方法的典型用法代码示例。如果您正苦于以下问题:Golang TestbedNode.GetName方法的具体用法?Golang TestbedNode.GetName怎么用?Golang TestbedNode.GetName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/contiv/systemtests-utils.TestbedNode
的用法示例。
在下文中一共展示了TestbedNode.GetName方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: startVolmaster
func startVolmaster(node utils.TestbedNode) error {
log.Infof("Starting the volmaster on %s", node.GetName())
_, err := node.RunCommandBackground("sudo -E nohup `which volmaster` --debug </dev/null &>/tmp/volmaster.log &")
log.Infof("Waiting for volmaster startup")
time.Sleep(10 * time.Millisecond)
return err
}
示例2: restartDockerHost
func restartDockerHost(node utils.TestbedNode) error {
log.Infof("Restarting docker on %q", node.GetName())
// note that for all these restart tasks we error out quietly to avoid other
// hosts being cleaned up
node.RunCommand("sudo service docker restart")
return nil
}
示例3: DumpNetpluginLogs
// DumpNetpluginLogs prints netplugin logs from the specified testbed node
func DumpNetpluginLogs(node stu.TestbedNode) {
cmdStr := fmt.Sprintf("sudo cat /tmp/netplugin.log")
output, err := node.RunCommandWithOutput(cmdStr)
if err == nil {
log.Debugf("logs on node %s: \n%s\n", node.GetName(), output)
}
}
示例4: startVolplugin
func startVolplugin(node utils.TestbedNode) error {
log.Infof("Starting the volplugin on %q", node.GetName())
defer time.Sleep(10 * time.Millisecond)
// FIXME this is hardcoded because it's simpler. If we move to
// multimaster or change the monitor subnet, we will have issues.
_, err := node.RunCommandBackground("sudo -E `which volplugin` --debug &>/tmp/volplugin.log &")
return err
}
示例5: clearVolumeHost
func (s *systemtestSuite) clearVolumeHost(node utils.TestbedNode) error {
log.Infof("Clearing volumes on %q", node.GetName())
node.RunCommand("docker volume ls | tail -n +2 | awk '{ print $2 }' | xargs docker volume rm")
return nil
}
示例6: clearContainerHost
func (s *systemtestSuite) clearContainerHost(node utils.TestbedNode) error {
log.Infof("Clearing containers on %q", node.GetName())
node.RunCommand("docker ps -aq | xargs docker rm -f")
return nil
}
示例7: stopVolplugin
func stopVolplugin(node utils.TestbedNode) error {
log.Infof("Stopping the volplugin on %q", node.GetName())
return node.RunCommand("sudo pkill volplugin")
}
示例8: stopVolmaster
func stopVolmaster(node utils.TestbedNode) error {
log.Infof("Stopping the volmaster on %s", node.GetName())
return node.RunCommand("sudo pkill volmaster")
}
示例9: startVolsupervisor
func startVolsupervisor(node utils.TestbedNode) error {
log.Infof("Starting the volsupervisor on %s", node.GetName())
_, err := node.RunCommandBackground("sudo -E nohup `which volsupervisor` --debug </dev/null &>/tmp/volsupervisor.log &")
return err
}
示例10: volpluginStop
func (s *systemtestSuite) volpluginStop(node utils.TestbedNode) error {
log.Infof("Stopping the volplugin on %q", node.GetName())
return node.RunCommand("sudo pkill volplugin")
}
示例11: OvsDumpInfo
// OvsDumpInfo dumps the ovs state on the specified testbed node
func OvsDumpInfo(node stu.TestbedNode) {
cmdStr := "sudo ovs-vsctl show"
output, _ := node.RunCommandWithOutput(cmdStr)
log.Debugf("ovs-vsctl on node %s: \n%s\n", node.GetName(), output)
}