Skip to content

Commit 2a7aa16

Browse files
Adcli: Adding an update method for adcli
Adding an update method provided by adcli command. 'adcli update' used to update the computer password along with other attribute.
1 parent bf0af01 commit 2a7aa16

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

sssd_test_framework/utils/adcli.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,33 @@ def testjoin(
103103

104104
return self.host.conn.exec(["adcli", "testjoin", domain, *args], raise_on_error=False)
105105

106+
def update(
107+
self,
108+
*,
109+
domain: str,
110+
args: list[str] | None = None,
111+
password: str,
112+
login_user: str,
113+
) -> ProcessResult:
114+
"""
115+
Update a computer account's password, and other attributes.
116+
117+
:param domain: Domain.
118+
:type domain: str
119+
:param args: Additional arguments, defaults to None
120+
:type args: list[str] | None, optional
121+
:param password: Password
122+
:type password: str
123+
:param login_user: Authenticating User
124+
:type login_user: str
125+
:return: Result of called command.
126+
:rtype: ProcessResult
127+
"""
128+
if args is None:
129+
args = []
130+
131+
return self.host.conn.exec(["adcli", "update", *args, domain], raise_on_error=False)
132+
106133
def join(
107134
self,
108135
*,

0 commit comments

Comments
 (0)