| 1 | /*++ |
| 2 | |
| 3 | Copyright (c) Microsoft. All rights reserved. |
| 4 | |
| 5 | Module Name: |
| 6 | |
| 7 | ContainerCommand.cpp |
| 8 | |
| 9 | Abstract: |
| 10 | |
| 11 | Implementation of command execution logic. |
| 12 | |
| 13 | --*/ |
| 14 | #include "CLIExecutionContext.h" |
| 15 | #include "ContainerCommand.h" |
| 16 | |
| 17 | using namespace wsl::windows::wslc::execution; |
| 18 | using namespace wsl::shared; |
| 19 | |
| 20 | namespace wsl::windows::wslc { |
| 21 | // Container Root Command |
| 22 | std::vector<std::unique_ptr<Command>> ContainerCommand::GetCommands() const |
| 23 | { |
| 24 | std::vector<std::unique_ptr<Command>> commands; |
| 25 | commands.push_back(std::make_unique<ContainerAttachCommand>(FullName())); |
| 26 | commands.push_back(std::make_unique<ContainerCpCommand>(FullName())); |
| 27 | commands.push_back(std::make_unique<ContainerCreateCommand>(FullName())); |
| 28 | commands.push_back(std::make_unique<ContainerExecCommand>(FullName())); |
| 29 | commands.push_back(std::make_unique<ContainerExportCommand>(FullName())); |
| 30 | commands.push_back(std::make_unique<ContainerInspectCommand>(FullName())); |
| 31 | commands.push_back(std::make_unique<ContainerKillCommand>(FullName())); |
| 32 | commands.push_back(std::make_unique<ContainerLogsCommand>(FullName())); |
| 33 | commands.push_back(std::make_unique<ContainerListCommand>(FullName())); |
| 34 | commands.push_back(std::make_unique<ContainerPruneCommand>(FullName())); |
| 35 | commands.push_back(std::make_unique<ContainerRemoveCommand>(FullName())); |
| 36 | commands.push_back(std::make_unique<ContainerRestartCommand>(FullName())); |
| 37 | commands.push_back(std::make_unique<ContainerRunCommand>(FullName())); |
| 38 | commands.push_back(std::make_unique<ContainerStartCommand>(FullName())); |
| 39 | commands.push_back(std::make_unique<ContainerStatsCommand>(FullName())); |
| 40 | commands.push_back(std::make_unique<ContainerStopCommand>(FullName())); |
| 41 | return commands; |
| 42 | } |
| 43 | |
| 44 | std::vector<Argument> ContainerCommand::GetArguments() const |
| 45 | { |
| 46 | return {}; |
| 47 | } |
| 48 | |
| 49 | std::wstring ContainerCommand::ShortDescription() const |
| 50 | { |
| 51 | return Localization::WSLCCLI_ContainerCommandDesc(); |
| 52 | } |
| 53 | |
| 54 | std::wstring ContainerCommand::LongDescription() const |
| 55 | { |
| 56 | return Localization::WSLCCLI_ContainerCommandLongDesc(); |
| 57 | } |
| 58 | |
| 59 | void ContainerCommand::ExecuteInternal(CLIExecutionContext& context) const |
| 60 | { |
| 61 | OutputHelp(context.Terminal); |
| 62 | } |
| 63 | } // namespace wsl::windows::wslc |