Updates custom options on the current host based on the listbox content.
(self)
| 1118 | self.current_host.remove_option(key) |
| 1119 | |
| 1120 | def _update_custom_options(self): |
| 1121 | """Updates custom options on the current host based on the listbox content.""" |
| 1122 | common_options = { |
| 1123 | "HostName", |
| 1124 | "User", |
| 1125 | "Port", |
| 1126 | "IdentityFile", |
| 1127 | "ForwardAgent", |
| 1128 | "ProxyJump", |
| 1129 | "ProxyCommand", |
| 1130 | "LocalForward", |
| 1131 | "RemoteForward", |
| 1132 | "Compression", |
| 1133 | "ServerAliveInterval", |
| 1134 | "ServerAliveCountMax", |
| 1135 | "TCPKeepAlive", |
| 1136 | "StrictHostKeyChecking", |
| 1137 | "PubkeyAuthentication", |
| 1138 | "PasswordAuthentication", |
| 1139 | "KbdInteractiveAuthentication", |
| 1140 | "GSSAPIAuthentication", |
| 1141 | "AddKeysToAgent", |
| 1142 | "PreferredAuthentications", |
| 1143 | "IdentityAgent", |
| 1144 | "ConnectTimeout", |
| 1145 | "RequestTTY", |
| 1146 | "LogLevel", |
| 1147 | "VerifyHostKeyDNS", |
| 1148 | "CanonicalizeHostname", |
| 1149 | "CanonicalDomains", |
| 1150 | "ControlMaster", |
| 1151 | "ControlPersist", |
| 1152 | "ControlPath", |
| 1153 | } |
| 1154 | |
| 1155 | self.current_host.options = [ |
| 1156 | opt for opt in self.current_host.options if opt.key in common_options |
| 1157 | ] |
| 1158 | |
| 1159 | if hasattr(self, "custom_options_list") and self.custom_options_list: |
| 1160 | for action_row in self.custom_options_list: |
| 1161 | if hasattr(action_row, "key_entry") and hasattr( |
| 1162 | action_row, "value_entry" |
| 1163 | ): |
| 1164 | key_entry = action_row.key_entry |
| 1165 | value_entry = action_row.value_entry |
| 1166 | if key_entry and value_entry: |
| 1167 | key = key_entry.get_text().strip() |
| 1168 | value = value_entry.get_text().strip() |
| 1169 | if key and value: |
| 1170 | self.current_host.set_option(key, value) |
| 1171 | |
| 1172 | def _on_identity_file_clicked(self, button): |
| 1173 | dialog = Gtk.FileChooserDialog( |
nothing calls this directly
no test coverage detected