Skip to content

Conversation

adrianlasota
Copy link
Contributor

This pull request adds support for running commands with elevated privileges (such as using sudo or runas) in the SSHConnection class. The new with_privileges parameter allows users to specify if commands should be executed with these privileges. The documentation and constructor have been updated to reflect this change.

Enhancement: Support for elevated privileges

  • Added a with_privileges parameter to the SSHConnection constructor in both the code (mfd_connect/ssh.py) and documentation (README.md), allowing users to specify whether commands should be run with elevated privileges. [1] [2]
  • Updated the docstrings in both the code and the documentation to describe the new with_privileges parameter and its purpose. [1] [2]
  • Modified the internal logic to set self.__use_sudo based on the value of with_privileges, enabling or disabling privileged command execution accordingly.

@Copilot Copilot AI review requested due to automatic review settings October 6, 2025 09:37
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds support for elevated privileges in SSH connections by introducing a with_privileges parameter that enables sudo/runas command execution.

  • Adds with_privileges boolean parameter to SSHConnection constructor
  • Updates internal __use_sudo attribute to be controlled by the new parameter
  • Updates documentation to reflect the new parameter and its purpose

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
mfd_connect/ssh.py Adds with_privileges parameter to constructor and updates __use_sudo initialization
README.md Updates constructor signature and docstring to document the new parameter

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@mfd-intel-bot
Copy link

We don't publish DEVs .whl.
To build .whl, run 'pip install git+https://github.com/intel/mfd-connect@enable_sudo'

1 similar comment
@mfd-intel-bot
Copy link

We don't publish DEVs .whl.
To build .whl, run 'pip install git+https://github.com/intel/mfd-connect@enable_sudo'

@mfd-intel-bot
Copy link

We don't publish DEVs .whl.
To build .whl, run 'pip install git+https://github.com/intel/mfd-connect@enable_sudo'

1 similar comment
@mfd-intel-bot
Copy link

We don't publish DEVs .whl.
To build .whl, run 'pip install git+https://github.com/intel/mfd-connect@enable_sudo'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants