Create a handler for an interactive session. Instantiate shell_cls according to the remote OS specifics. Args: shell_cls: The class of the shell. timeout: Timeout for reading output from the SSH channel. If you are reading from the buffer and
(
self,
shell_cls: Type[InteractiveShellType],
timeout: float = SETTINGS.timeout,
privileged: bool = False,
app_args: str = "",
)
| 143 | return connection |
| 144 | |
| 145 | def create_interactive_shell( |
| 146 | self, |
| 147 | shell_cls: Type[InteractiveShellType], |
| 148 | timeout: float = SETTINGS.timeout, |
| 149 | privileged: bool = False, |
| 150 | app_args: str = "", |
| 151 | ) -> InteractiveShellType: |
| 152 | """Create a handler for an interactive session. |
| 153 | |
| 154 | Instantiate shell_cls according to the remote OS specifics. |
| 155 | |
| 156 | Args: |
| 157 | shell_cls: The class of the shell. |
| 158 | timeout: Timeout for reading output from the SSH channel. If you are |
| 159 | reading from the buffer and don't receive any data within the timeout |
| 160 | it will throw an error. |
| 161 | privileged: Whether to run the shell with administrative privileges. |
| 162 | app_args: The arguments to be passed to the application. |
| 163 | Returns: |
| 164 | Instance of the desired interactive application. |
| 165 | """ |
| 166 | if not shell_cls.dpdk_app: |
| 167 | shell_cls.path = self.main_session.join_remote_path(shell_cls.path) |
| 168 | |
| 169 | return self.main_session.create_interactive_shell( |
| 170 | shell_cls, |
| 171 | app_args, |
| 172 | timeout, |
| 173 | privileged, |
| 174 | ) |
| 175 | |
| 176 | def filter_lcores( |
| 177 | self, |