def default(self): self.ui.set_body(SSHView(self.model, self)) if self.answers: d = { "install_server": self.answers.get("install_server", False), "authorized_keys": self.answers.get("authorized_keys", []), "pwauth": self.answers.get("pwauth", True), } self.done(d) elif 'ssh-import-id' in self.all_answers.get('Identity', {}): import_id = self.all_answers['Identity']['ssh-import-id'] d = { "install_server": True, "pwauth": True, } self.fetch_ssh_keys(d, import_id)
def start_ui(self): self.ui.set_body(SSHView(self.model, self)) if self.answers: d = { "install_server": self.answers.get("install_server", False), "authorized_keys": self.answers.get("authorized_keys", []), "pwauth": self.answers.get("pwauth", True), } self.done(d) elif 'ssh-import-id' in self.app.answers.get('Identity', {}): import_id = self.app.answers['Identity']['ssh-import-id'] d = { "ssh_import_id": import_id.split(":", 1)[0], "import_username": import_id.split(":", 1)[1], "install_server": True, "pwauth": True, } self.fetch_ssh_keys(d)
async def make_ui(self): ssh_data = await self.endpoint.GET() return SSHView(self, ssh_data)
def make_ui(self): ssh_data = SSHData(install_server=self.model.install_server, allow_pw=self.model.pwauth) return SSHView(self, ssh_data)