master
cpp 50 lines 1 KB
Raw
1 /*++
2
3 Copyright (c) Microsoft. All rights reserved.
4
5 Module Name:
6
7 ImagePushCommand.cpp
8
9 Abstract:
10
11 Implementation of the image push command.
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 Push Command
27 std::vector<Argument> ImagePushCommand::GetArguments() const
28 {
29 return {
30 Argument::Create(ArgType::ImageId, {.Required = true}),
31 };
32 }
33
34 std::wstring ImagePushCommand::ShortDescription() const
35 {
36 return Localization::WSLCCLI_ImagePushDesc();
37 }
38
39 std::wstring ImagePushCommand::LongDescription() const
40 {
41 return Localization::WSLCCLI_ImagePushLongDesc();
42 }
43
44 void ImagePushCommand::ExecuteInternal(CLIExecutionContext& context) const
45 {
46 context //
47 << ResolveSession //
48 << PushImage;
49 }
50 } // namespace wsl::windows::wslc