Esempio n. 1
0
File: vpn.py Progetto: m3z/ToMaTo
	def toDict(self, auth):
		res = Connector.toDict(self, auth)
		res["attrs"].update(external_access=self.getExternalAccess(), mode=self.mode)
		if auth:
			if self.getExternalAccess():
				if self.getExternalAccessPort():
					res["attrs"]["external_access_host"] = self.getExternalAccessHost().name
					res["attrs"]["external_access_port"] = self.getExternalAccessPort()
					res["attrs"]["external_access_password"] = self.getExternalAccessPassword()
		return res
Esempio n. 2
0
	def toDict(self, auth):
		res = Connector.toDict(self, auth)
		res["attrs"].update(network_type=self.network_type, network_group=self.network_group)
		return res