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