Skip to content

Commit 0e7bb69

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 0e7bb69

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

sssd_test_framework/utils/adcli.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,27 @@ 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+
) -> ProcessResult:
112+
"""
113+
Update a computer account's password, and other attributes.
114+
115+
:param domain: Domain.
116+
:type domain: str
117+
:param args: Additional arguments, defaults to None
118+
:type args: list[str] | None, optional
119+
:return: Result of called command.
120+
:rtype: ProcessResult
121+
"""
122+
if args is None:
123+
args = []
124+
125+
return self.host.conn.exec(["adcli", "update", *args, domain], raise_on_error=False)
126+
106127
def join(
107128
self,
108129
*,

0 commit comments

Comments
 (0)