| 1 | /*++ |
| 2 | |
| 3 | Copyright (c) Microsoft. All rights reserved. |
| 4 | |
| 5 | Module Name: |
| 6 | |
| 7 | ImageCommand.cpp |
| 8 | |
| 9 | Abstract: |
| 10 | |
| 11 | Implementation of command execution logic. |
| 12 | |
| 13 | --*/ |
| 14 | #include "CLIExecutionContext.h" |
| 15 | #include "ImageCommand.h" |
| 16 | |
| 17 | using namespace wsl::windows::wslc::execution; |
| 18 | using namespace wsl::shared; |
| 19 | |
| 20 | namespace wsl::windows::wslc { |
| 21 | // Image Root Command |
| 22 | std::vector<std::unique_ptr<Command>> ImageCommand::GetCommands() const |
| 23 | { |
| 24 | std::vector<std::unique_ptr<Command>> commands; |
| 25 | commands.push_back(std::make_unique<ImageBuildCommand>(FullName())); |
| 26 | commands.push_back(std::make_unique<ImageRemoveCommand>(FullName())); |
| 27 | commands.push_back(std::make_unique<ImageInspectCommand>(FullName())); |
| 28 | commands.push_back(std::make_unique<ImageListCommand>(FullName())); |
| 29 | commands.push_back(std::make_unique<ImageLoadCommand>(FullName())); |
| 30 | commands.push_back(std::make_unique<ImageImportCommand>(FullName())); |
| 31 | commands.push_back(std::make_unique<ImagePruneCommand>(FullName())); |
| 32 | commands.push_back(std::make_unique<ImagePullCommand>(FullName())); |
| 33 | commands.push_back(std::make_unique<ImagePushCommand>(FullName())); |
| 34 | commands.push_back(std::make_unique<ImageSaveCommand>(FullName())); |
| 35 | commands.push_back(std::make_unique<ImageTagCommand>(FullName())); |
| 36 | return commands; |
| 37 | } |
| 38 | |
| 39 | std::vector<Argument> ImageCommand::GetArguments() const |
| 40 | { |
| 41 | return {}; |
| 42 | } |
| 43 | |
| 44 | std::wstring ImageCommand::ShortDescription() const |
| 45 | { |
| 46 | return Localization::WSLCCLI_ImageCommandDesc(); |
| 47 | } |
| 48 | |
| 49 | std::wstring ImageCommand::LongDescription() const |
| 50 | { |
| 51 | return Localization::WSLCCLI_ImageCommandLongDesc(); |
| 52 | } |
| 53 | |
| 54 | void ImageCommand::ExecuteInternal(CLIExecutionContext& context) const |
| 55 | { |
| 56 | OutputHelp(context.Terminal); |
| 57 | } |
| 58 | } // namespace wsl::windows::wslc |