コード例 #1
0
ファイル: openvz.py プロジェクト: joanmarkt/ToMaTo
	def getIdUsage(self, host):
		ids = Device.getIdUsage(self, host)
		if self.vnc_port and self.host == host:
			ids["port"] = ids.get("port", set()) | set((self.vnc_port,))
		if self.vmid and self.host == host:
			ids["vmid"] = ids.get("vmid", set()) | set((self.vmid,))
		if self.hasAttribute("migration"):
			migration = self.getAttribute("migration")
			if host.name in migration:
				ids["vmid"] |= set((migration[host.name],))
		return ids
コード例 #2
0
ファイル: prog.py プロジェクト: david-hock/ToMaTo
	def getIdUsage(self, host):
		ids = Device.getIdUsage(self, host)
		if self.vnc_port and self.host == host:
			ids["port"] = ids.get("port", set()) | set((self.vnc_port,))
		return ids