Skip to content

Commit 4a837c7

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 4a837c7

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

sssd_test_framework/utils/adcli.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,43 @@ 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+
:param krb: Use Kerberos credentials, defaults to False
126+
:type krb: bool, optional
127+
:return: Result of called command.
128+
:rtype: ProcessResult
129+
"""
130+
if args is None:
131+
args = []
132+
133+
return self._exec_adcli(
134+
subcommand="update",
135+
positional_args=[],
136+
domain=domain,
137+
password=password,
138+
login_user=login_user,
139+
krb=True,
140+
args=args,
141+
)
142+
106143
def join(
107144
self,
108145
*,

0 commit comments

Comments
 (0)