Skip to content

Commit 1bdd3c3

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 1bdd3c3

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

sssd_test_framework/utils/adcli.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,45 @@ 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+
krb: bool = True,
113+
login_user: str,
114+
) -> ProcessResult:
115+
"""
116+
Update a computer account's password, and other attributes.
117+
118+
:param domain: Domain.
119+
:type domain: str
120+
:param args: Additional arguments, defaults to None
121+
:type args: list[str] | None, optional
122+
:param password: Password
123+
:type password: str
124+
:param krb: Kerberos credentials, defaults to True
125+
:type krb: bool
126+
:param login_user: Authenticating User
127+
:type login_user: str
128+
:return: Result of called command.
129+
:rtype: ProcessResult
130+
"""
131+
if args is None:
132+
args = []
133+
134+
return self._exec_adcli(
135+
subcommand="update",
136+
positional_args=[],
137+
domain=domain,
138+
password=password,
139+
login_user=login_user,
140+
krb=krb,
141+
args=args,
142+
)
143+
144+
106145
def join(
107146
self,
108147
*,

0 commit comments

Comments
 (0)