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
def toDict(self, auth): res = Connector.toDict(self, auth) res["attrs"].update(network_type=self.network_type, network_group=self.network_group) return res