mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 22:11:36 -05:00
* feat(datasync): add the DataSync management plane Emulates the AWS DataSync management API over JSON (X-Amz-Target FmrsService.<Action>, signing name datasync): agents, the eleven CreateLocation/DescribeLocation/UpdateLocation trios plus the shared ListLocations and DeleteLocation, tasks, and resource tagging. Each DescribeLocation* projects the create request that produced the location, so the configuration that went in is the configuration that comes back, and LocationUri is derived from that request per the scheme AWS documents for the type. DescribeAgent reports ONLINE and DescribeTask reports AVAILABLE from the first read, which is what the Terraform provider's aws_datasync_task waits on. Credential members (Password, SecretKey, SasConfiguration, the Kerberos files and the nested Protocol.SMB.Password) are dropped before the configuration is stored, as AWS never reads them back either. Errors use InvalidRequestException, the only client error the DataSync model declares. The task-execution data plane (StartTaskExecution, DescribeTaskExecution, ListTaskExecutions, CancelTaskExecution, UpdateTaskExecution) transfers real bytes between real storage systems and keeps raising UnknownOperationException rather than a stub success. * fix(datasync): default VerifyMode from the task mode The DataSync model documents two VerifyMode defaults, not one: POINT_IN_TIME_CONSISTENT for a BASIC task and ONLY_FILES_TRANSFERRED for an ENHANCED one, which also cannot use POINT_IN_TIME_CONSISTENT at all. CreateTask applied the BASIC default to every task, so an ENHANCED task created without an explicit VerifyMode read back wrong. The default now follows TaskMode, and a VerifyMode the mode does not support is rejected with InvalidRequestException, the only client error this API declares. UpdateTaskRequest carries no TaskMode, so a task keeps the mode it was created with and UpdateTask applies the same rule against the stored mode. An unrecognized TaskMode is rejected rather than silently treated as BASIC. * test(datasync): add the SDK compatibility test Drives an agent, an S3 and an NFS location, both task modes and the tag round trip through the AWS SDK v2 DataSync client, which is the one piece of real-SDK verification the RestAssured tests do not cover. It asserts the VerifyMode default for a BASIC and an ENHANCED task, and that an ENHANCED task rejects POINT_IN_TIME_CONSISTENT on create and on update. --------- Co-authored-by: lex00 <artigues.dev@gmail.com>