Exemplo n.º 1
0
Arquivo: openvz.py Projeto: m3z/ToMaTo
	def _stopDev(self):
		host = self.host
		vmid = self.getVmid()
		state = vzctl.getState(host, vmid)
		if state == State.STARTED:
			vzctl.stop(host, vmid)
			state = vzctl.getState(host, vmid)
		self.state = State.PREPARED
		self.save()
		if self.getVncPort():
			vzctl.stopVnc(host, vmid, self.getVncPort())
			self._unassignVncPort()
Exemplo n.º 2
0
	def _stopVnc(self):
		assert self.host and self.getVmid() and self.getVncPort()
		vzctl.stopVnc(self.host, self.getVmid(), self.getVncPort())
		self.host.giveId("port", self.getVncPort())
		self.setVncPort(None)
Exemplo n.º 3
0
Arquivo: openvz.py Projeto: m3z/ToMaTo
	def _stopVnc(self):
		if not self.host or not self.getVmid() or not self.getVncPort():
			return
		vzctl.stopVnc(self.host, self.getVmid(), self.getVncPort())
		self._unassignVncPort()
Exemplo n.º 4
0
	def _stopVnc(self):
		if not self.host or not self.getVmid() or not self.getVncPort():
			return
		vzctl.stopVnc(self.host, self.getVmid(), self.getVncPort())
		self.host.giveId("port", self.getVncPort())
		self.setVncPort(None)