diff --git a/src/frostfs_testlib/s3/aws_cli_client.py b/src/frostfs_testlib/s3/aws_cli_client.py index a373dfb..01fb183 100644 --- a/src/frostfs_testlib/s3/aws_cli_client.py +++ b/src/frostfs_testlib/s3/aws_cli_client.py @@ -1308,16 +1308,14 @@ class AwsCliClient(S3ClientWrapper): return response @reporter.step("Lists the MFA devices for an IAM user") - def iam_list_virtual_mfa_devices(self, user_name: Optional[str] = None) -> dict: + def iam_list_virtual_mfa_devices(self) -> dict: cmd = f"aws {self.common_flags} iam list-virtual-mfa-devices --endpoint {self.iam_endpoint}" - if user_name: - cmd += f" --user-name {user_name}" if self.profile: cmd += f" --profile {self.profile}" output = self.local_shell.exec(cmd).stdout response = self._to_json(output) - assert response.get("MFADevices"), f"Expected MFADevices in response:\n{response}" + assert response.get("VirtualMFADevices"), f"Expected VirtualMFADevices in response:\n{response}" return response diff --git a/src/frostfs_testlib/s3/boto3_client.py b/src/frostfs_testlib/s3/boto3_client.py index b5f9aac..74e9ecd 100644 --- a/src/frostfs_testlib/s3/boto3_client.py +++ b/src/frostfs_testlib/s3/boto3_client.py @@ -976,9 +976,9 @@ class Boto3ClientWrapper(S3ClientWrapper): return response @reporter.step("Lists the MFA devices for an IAM user") - def iam_list_virtual_mfa_devices(self, user_name: Optional[str] = None) -> dict: - response = self.boto3_iam_client.list_virtual_mfa_devices(UserName="/") - assert response.get("MFADevices"), f"Expected MFADevices in response:\n{response}" + def iam_list_virtual_mfa_devices(self) -> dict: + response = self.boto3_iam_client.list_virtual_mfa_devices() + assert response.get("VirtualMFADevices"), f"Expected VirtualMFADevices in response:\n{response}" return response diff --git a/src/frostfs_testlib/s3/interfaces.py b/src/frostfs_testlib/s3/interfaces.py index 8a62527..b430b9e 100644 --- a/src/frostfs_testlib/s3/interfaces.py +++ b/src/frostfs_testlib/s3/interfaces.py @@ -583,7 +583,7 @@ class S3ClientWrapper(HumanReadableABC): """Enables the specified MFA device and associates it with the specified IAM user""" @abstractmethod - def iam_list_virtual_mfa_devices(self, user_name: Optional[str] = None) -> dict: + def iam_list_virtual_mfa_devices(self) -> dict: """Lists the MFA devices for an IAM user""" @abstractmethod