コード例 #1
0
ファイル: ssh.py プロジェクト: vish74/subiquity
 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)
コード例 #2
0
ファイル: ssh.py プロジェクト: mattlknight/subiquity
 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)
コード例 #3
0
ファイル: ssh.py プロジェクト: patrick330602/subiquity
 async def make_ui(self):
     ssh_data = await self.endpoint.GET()
     return SSHView(self, ssh_data)
コード例 #4
0
 def make_ui(self):
     ssh_data = SSHData(install_server=self.model.install_server,
                        allow_pw=self.model.pwauth)
     return SSHView(self, ssh_data)