summaryrefslogtreecommitdiffstats
path: root/src/commands/endpoint.rs
AgeCommit message (Collapse)Author
2021-11-19Update Copyright string to 2020-2022Matthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-08-12Fix clippy: Replace map-collect-to-result with try_for_each()Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-06-23Add implementation of "endpoint images" subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-06-02Refactor: move get_date_filter() helper fn to commands:util moduleMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-20Update dependency: indicatif 0.15 -> 0.16.1Matthias Beyer
0.16.1 has been published which fixes the bug introduced by 0.16.0, hence update this dependency. This reverts commit ddbd9629b3188c9f08d023829683c40ab9e1448b. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-17Revert "Update dependency: indicatif 0.15 -> 0.16"Matthias Beyer
This reverts the dependency update because indicatif 0.16 introduced a reachable `unreachable!()` statement in their sourcecode that we actually hit if we `--hide-bars`. This reverts commit 6ceccb679d9c2d19389c6c6eef792d8db9086f31. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-05-11Add module-level docsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-05-11Refactor: Use human readable time formatMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-11Add subcommand: endpoint containers stopMatthias Beyer
Implementation of the "endpoint containers stop" subcommand. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-11Add subcommand to get top output of containersMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-11Update dependency: indicatif 0.15 -> 0.16Matthias Beyer
Because the interfaces of indicatif have changed, this PR changes a lot of calls in the codebase. (Yay, moving all the things!) Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-22Fix: If no, returnMatthias Beyer
Fixes a bug where the return value of the function was not used. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-11Endpoint configuration as MapMatthias Beyer
This patch rewrites the endpoint configuration format to be a map. The problem here is, that a list of endpoints cannot easily be used with layered configuration, where a part of the configuration lives in the XDG config home of the user and the rest lives in the repository. With this patch, the endpoints are configured with a map instead of an array, which makes it less complicated to overwrite. The name of an endpoint is now the key in the map. A type `EndpointName` was introduced to take advantage of strong typing. Thus, the patch touches a bit more code to adapt to the new type in use. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-10Clippy fix: Remove unneeded to_string() callMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-08Refactor filter building into helper functionMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-08Add "containers prune" subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-07Move container subcommand to own fileMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-07Implement container exec subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-07Implement container stop subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-07Implement container start subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-07Implement container delete subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-07Add container kill subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-07Add container CLI interfaceMatthias Beyer
This patch starts the implementation of a CLI interface to work with a single container from one endpoint. The "top" functionality is implemented by now, nothing more. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-07Add filters for listing containers on endpointsMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-07Add subcommand "endpoint container list" for listing containersMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-07Outsource connecting to endpointsMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-07Use the bytesize crate to format size of memory nicelyMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-07Add "endpoint stats" subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-07Add subcommand "endpoint <ENDPOINT> ping"Matthias Beyer
This is the first "endpoint" subcommand implementation, which adds a "ping" subcommand, that can be used to ping all endpoints. This is the first step towards a CLI interface for endpoint maintenance commands. "ping" is the least complex one to implement and the docker crate ("shiplift") offers that functionality where one can ping the docker endpoints for availability, thus this is chosen as first implementation. Later, container cleanup and so on will be added as well, based on this work. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>