Commit Graph

19 Commits

Author SHA1 Message Date
Fedor Korotkov 4a454a3115
Allow to choose IP resolution strategy (#446)
Haven't seen any reports of the `arp` vs DHCP issues so I think it's reasonable to remove the warning and allow to customize the resolution strategy.
2023-03-16 17:41:54 +04:00
Nikolay Edigaryev ad9c3c661e
Reformat code idents and introduce the SwiftFormat linter (#339)
* Package.swift: add SwiftFormat

Can be invoked with "swift package plugin swiftformat".

* $ swift package plugin swiftformat

* .cirrus.yml: run SwiftFormat

* SwiftFormat: exclude Sources/tart/OCI/Reference/Generated
2022-11-29 15:56:13 +00:00
Nikolay Edigaryev 44650e9713
Improve RemoteName parser (#225) (#269)
* Improve RemoteName parser

* Remove Parsing import

* Permit namespace components to contain separators, but no more than one

* Add testNoPathTraversal
2022-10-11 22:59:44 +04:00
Nikolay Edigaryev 166e3e570f
Ditch AsyncHTTPClient in favor of URLSession (#260) 2022-10-05 00:39:36 +04:00
Nikolay Edigaryev 625d431d10
Revert "Improve RemoteName parser (#225)" (#230)
This reverts commit ae7018c31f.
2022-09-06 22:13:30 +04:00
Nikolay Edigaryev 4648e1aea1
tart clone: clone VM and generate MAC under a file lock (#215)
* tart clone: clone VM and generate MAC under a file lock

* Lock concurrent "tart pull"'s for the same host

* Config: ensure Tart's home and cache directories always exist
2022-09-06 21:33:51 +04:00
Nikolay Edigaryev ae7018c31f
Improve RemoteName parser (#225)
* Improve RemoteName parser

* Remove Parsing import

* Permit namespace components to contain separators, but no more than one

* Add testNoPathTraversal
2022-09-06 17:28:49 +04:00
Nikolay Edigaryev 440681320a
Introduce "tart prune" command (#164) 2022-08-12 16:43:04 +03:00
Fedor Korotkov e2b7f12388
Support chunked uploads (#159)
* Support chunked uploads

* Rebase fixes

* Bump swift http client
2022-08-08 10:16:47 -04:00
Nikolay Edigaryev 52abb7589c
OCI: support Basic authentication scheme (#145)
* OCI: support Basic authentication scheme

* .isValid → .isValid()

* tart login: make --username optional
2022-07-08 16:36:00 +03:00
Nikolay Edigaryev 85429cea0a
Retrieve IP from DHCPD leases file instead of ARP cache (#141)
* Retrieve IP from DHCPD leases file instead of ARP cache

* Reference PLCache_read() from the retrieveRawLeases() parsing function
2022-06-30 17:58:52 +03:00
Nikolay Edigaryev 384abcd0bd
OCI: make sure annotations are sorted (#138) 2022-06-27 16:25:52 +03:00
Nikolay Edigaryev 5446164a36
tart pull: introduce --populate-cache flag (#103)
* tart pull: introduce --populate-cache flag

* VMStorageOCI: introduce cache() method

* Review comments (#107)

* Rename SetCommand back to Set

Co-authored-by: Fedor Korotkov <fedor.korotkov@gmail.com>
2022-05-28 23:20:24 -04:00
Fedor Korotkov 35904dc637
Async http client for pull/push (#95)
* Use async http client for pull/push

* Don't update progress too frequently

* Removed unused variable

* Rebased after added tests
2022-05-20 11:04:21 -04:00
Nikolay Edigaryev fec803277d
Registry functional/integration tests (#96)
* Registry functional/integration tests

* Remove DockerClientSwift import

* Encodable, Decodable → Codable
2022-05-20 09:52:37 -04:00
Fedor Korotkov 63a2793c32
Support upper case in remote names (#79) 2022-05-16 18:14:42 +03:00
Nikolay Edigaryev 8554e56e4b
Registry: use issued_at field in the token response message (#65)
* Registry: use issued_at field in the token response message

* Configure JSONDecoder instead of the Decodable itself
2022-05-12 22:33:02 +03:00
Nikolay Edigaryev a4db60d656
Registry: don't loose query parameters on URL absolutization (#47)
* Registry: don't loose query parameters on URL absolutization

* Registry: throw a proper exception when Location header parsing fails
2022-05-06 09:03:58 -04:00
Nikolay Edigaryev 95316c0d67
Support pulling/pushing VMs to OCI-compatible registries (#32)
* Support pulling/pushing VMs to OCI-compatible registries

* Registry: rename request() to endpointRequest() for clarity

* Registry: include JSON details on HTTP status code mismatch errors

* .cirrus.yml: run tests

* Fix testDigest

* Registry: set Content-{Length,Type} headers when pushing blob

* Refactor Registry.auth() and enrich RegistryError.AuthFailed

* Remove useless comment

* Fix WWWAuthenticate a bit and add tests

* WWWAuthenticate: expect a Bearer scheme

* Registry.auth(): document the passing of ["scope", "service"] parameters

* Clarify unexpected HTTP code error when retrieving auth token

* Make RemoteName parser more relaxed for now

* tart clone: pull the VM if it's OCI-based first

* VMStorageOCI: ensure the old symbolic link is overwritten

* tart push: support multiple remote VM names

* Logging: push/pull progress

* Use 500 MB chunks (instead of 500 MiB) to evenly cut disk

...which also uses powers of 10.

* Credentials: only read credentials labeled "Tart Credentials"
2022-05-03 14:30:26 -04:00