master
cpp 53 lines 1.19 KB
Raw
1 /*++
2
3 Copyright (c) Microsoft. All rights reserved.
4
5 Module Name:
6
7 ImagePullCommand.cpp
8
9 Abstract:
10
11 Implementation of command execution logic.
12
13 --*/
14
15 #include "ImageCommand.h"
16 #include "CLIExecutionContext.h"
17 #include "ImageTasks.h"
18 #include "SessionTasks.h"
19 #include "Task.h"
20
21 using namespace wsl::windows::wslc::execution;
22 using namespace wsl::windows::wslc::task;
23 using namespace wsl::shared;
24
25 namespace wsl::windows::wslc {
26 // Image Pull Command
27 std::vector<Argument> ImagePullCommand::GetArguments() const
28 {
29 return {
30 Argument::Create(ArgType::ImageId, {.Required = true}),
31 Argument::Create(ArgType::Quiet, {.Desc = Localization::WSLCCLI_PullQuietArgDescription()}),
32 // Argument::Create(ArgType::Scheme),
33 // Argument::Create(ArgType::Progress),
34 };
35 }
36
37 std::wstring ImagePullCommand::ShortDescription() const
38 {
39 return Localization::WSLCCLI_ImagePullDesc();
40 }
41
42 std::wstring ImagePullCommand::LongDescription() const
43 {
44 return Localization::WSLCCLI_ImagePullLongDesc();
45 }
46
47 void ImagePullCommand::ExecuteInternal(CLIExecutionContext& context) const
48 {
49 context //
50 << ResolveSession //
51 << PullImage;
52 }
53 } // namespace wsl::windows::wslc