Android-cuttlefish cvd tool
load_configs.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#pragma once
17
18#include <optional>
19#include <string>
20
30
31namespace cuttlefish {
32
33/*
34cvd load component is responsible of loading, translation and creation of
35cuttlefish instances based on input json configuration file
36*/
38 public:
39 LoadConfigsCommand(InstanceManager& instance_manager);
41
42 Result<void> Handle(const CommandRequest& request) override;
43 std::vector<std::string> CmdList() const override;
44 std::string SummaryHelp() const override;
45 std::vector<HelpParagraph> Description() const override;
47 bool RequiresHostConfiguration() const override { return true; }
48
49 static std::vector<HelpParagraph> CommonCommandDescription();
50
51 private:
53 LocalInstanceGroup& group, CvdFlags cvd_flags,
54 std::optional<Fd> in_progress_lock);
55
58};
59
60} // namespace cuttlefish
Definition: command_request.h:34
Definition: command_handler.h:28
Definition: instance_manager.h:51
Definition: load_configs.h:37
std::string SummaryHelp() const override
Definition: load_configs.cpp:252
LoadConfigsCommand(InstanceManager &instance_manager)
Definition: load_configs.cpp:115
static std::vector< HelpParagraph > CommonCommandDescription()
Definition: load_configs.cpp:271
LoadFlags flags_
Definition: load_configs.h:57
bool RequiresHostConfiguration() const override
Definition: load_configs.h:47
Result< std::vector< Flag > > Flags(const CommandRequest &) override
Definition: load_configs.cpp:342
InstanceManager & instance_manager_
Definition: load_configs.h:56
std::vector< HelpParagraph > Description() const override
Definition: load_configs.cpp:254
std::vector< std::string > CmdList() const override
Definition: load_configs.cpp:248
Result< void > Handle(const CommandRequest &request) override
Definition: load_configs.cpp:118
Result< void > LoadGroup(const CommandRequest &request, LocalInstanceGroup &group, CvdFlags cvd_flags, std::optional< Fd > in_progress_lock)
Definition: load_configs.cpp:207
Definition: local_instance_group.h:32
Definition: alloc_driver.h:21
tl::expected< T, StackTraceError< E > > Result
Definition: result_type.h:30
Definition: load_configs_parser.h:33
Definition: load_configs_parser.h:40