- if self.get("bridge_name") and self.get("virtual_ip_pref"):
- bridge_name = self.get("bridge_name")
- virtual_ip_pref = self.get("virtual_ip_pref")
- self.info(" Creating the bridge %s and assigning %s" %\
- (bridge_name, virtual_ip_pref) )
- cmd = "sliver-ovs create-bridge '%s' '%s'" %\
- (bridge_name, virtual_ip_pref)
- out = err = ""
- (out, err), proc = self.node.run_and_wait(cmd, self.ovs_checks,
- shfile = "create_br.sh",
- pidfile = "create_br_pidfile",
- ecodefile = "create_br_exitcode",
- sudo = True,
- stdout = "create_br_stdout",
- stderr = "create_br_stderr")
- (out, err), proc = self.node.check_output(self.ovs_checks, 'create_br_exitcode')
- if out != "0\n":
- msg = "No such pltap netdev\novs-appctl: ovs-vswitchd: server returned an error"
- self.debug("Check again the virtual IP")
- raise RuntimeError, msg
- self.info("Bridge %s created" % bridge_name)
-
- else: