Skip to content

Conversation

@shridhargadekar
Copy link
Contributor

Adding an update method provided by adcli command. 'adcli update' used to update the computer password along with other attribute.

@gemini-code-assist
Copy link

Summary of Changes

Hello @shridhargadekar, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new update method to the adcli utility module, providing a direct interface to the adcli update command. This enhancement allows for the automated management of computer account passwords and other attributes, thereby improving the framework's capabilities for Active Directory computer object administration.

Highlights

  • New update method: A new update method has been added to the adcli utility class within the sssd_test_framework.
  • adcli update command wrapper: This method provides a Pythonic wrapper for the adcli update command, allowing for programmatic execution.
  • Computer password management: The primary function of this new method is to facilitate updating computer account passwords and other related attributes in Active Directory.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds a new update method to the AdcliUtils class, providing a wrapper for the adcli update command. The implementation is straightforward and aligns with the existing structure of the class. I've provided a couple of suggestions to enhance documentation accuracy and improve code conciseness.

Copy link
Contributor

@spoore1 spoore1 left a comment

Choose a reason for hiding this comment

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

Overall Looks good. One quick question while I look into testing this.

@shridhargadekar shridhargadekar force-pushed the adcli_upd branch 2 times, most recently from 4a837c7 to 1e804cc Compare December 18, 2025 16:12
spoore1
spoore1 previously approved these changes Dec 18, 2025
Copy link
Contributor

@spoore1 spoore1 left a comment

Choose a reason for hiding this comment

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

LGTM

sumit-bose
sumit-bose previously approved these changes Dec 19, 2025
Copy link
Contributor

@sumit-bose sumit-bose left a comment

Choose a reason for hiding this comment

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

Hi,

thank you for the update, ACK.

@spoore1, do you agree with the changes as well?

bye,
Sumit

@spoore1
Copy link
Contributor

spoore1 commented Dec 19, 2025

Hi,

thank you for the update, ACK.

@spoore1, do you agree with the changes as well?

bye, Sumit

I'm not sure. I tried a quick test (maybe I missed something) like this:

    client.realm.join(provider.host.domain, krb=False, user=provider.host.adminuser, password=provider.host.adminpw)

    client.adcli.update(
        domain=provider.host.domain,
        args=["-v", "--add-service-principal=HTTP/client.test"],
    )

Before when it was using the _exec_adcli, I could see the service principal added by running:

adcli show-computer --stdin-password --login-user=administrator --domain=ad.test --domain-controller=dc.ad.test

Now, I'm not seeing HTTPS/client.test show up in the output:

...
dNSHostName:                                                                                                                                                                                                        
 client.test                                                                                              
servicePrincipalName:                                
 RestrictedKrbHost/client.test                       
 RestrictedKrbHost/CLIENT                            
 host/client.test                                    
 host/CLIENT                                         
operatingSystem:                                     
 redhat-linux-gnu                                    
...

Is it something that I could fix in my test, or is this a real issue with dropping the other cli options?

@sumit-bose
Copy link
Contributor

Hi,

@spoore1 thanks for testing and having a close look at the results. @shridhargadekar, the issue is that the domain name is currently added to the command line on its own but is has to be part of the --domain=.... option.

bye,
Sumit

Adding an update method provided by adcli command.
'adcli update' used to update the computer password along
with other attribute.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants