| 1 | /*++ |
| 2 | |
| 3 | Copyright (c) Microsoft. All rights reserved. |
| 4 | |
| 5 | Module Name: |
| 6 | |
| 7 | VolumeCommand.cpp |
| 8 | |
| 9 | Abstract: |
| 10 | |
| 11 | Implementation of command execution logic. |
| 12 | |
| 13 | --*/ |
| 14 | #include "CLIExecutionContext.h" |
| 15 | #include "VolumeCommand.h" |
| 16 | |
| 17 | using namespace wsl::windows::wslc::execution; |
| 18 | using namespace wsl::shared; |
| 19 | |
| 20 | namespace wsl::windows::wslc { |
| 21 | // Volume Root Command |
| 22 | std::vector<std::unique_ptr<Command>> VolumeCommand::GetCommands() const |
| 23 | { |
| 24 | std::vector<std::unique_ptr<Command>> commands; |
| 25 | commands.push_back(std::make_unique<VolumeCreateCommand>(FullName())); |
| 26 | commands.push_back(std::make_unique<VolumeRemoveCommand>(FullName())); |
| 27 | commands.push_back(std::make_unique<VolumeInspectCommand>(FullName())); |
| 28 | commands.push_back(std::make_unique<VolumeListCommand>(FullName())); |
| 29 | commands.push_back(std::make_unique<VolumePruneCommand>(FullName())); |
| 30 | return commands; |
| 31 | } |
| 32 | |
| 33 | std::vector<Argument> VolumeCommand::GetArguments() const |
| 34 | { |
| 35 | return {}; |
| 36 | } |
| 37 | |
| 38 | std::wstring VolumeCommand::ShortDescription() const |
| 39 | { |
| 40 | return Localization::WSLCCLI_VolumeCommandDesc(); |
| 41 | } |
| 42 | |
| 43 | std::wstring VolumeCommand::LongDescription() const |
| 44 | { |
| 45 | return Localization::WSLCCLI_VolumeCommandLongDesc(); |
| 46 | } |
| 47 | |
| 48 | void VolumeCommand::ExecuteInternal(CLIExecutionContext& context) const |
| 49 | { |
| 50 | OutputHelp(context.Terminal); |
| 51 | } |
| 52 | } // namespace wsl::windows::wslc |