Skip to content

Commit

Permalink
Reorganize cvd file structure
Browse files Browse the repository at this point in the history
It looks like this now:

cvd
 |-acloud -> contains the acloud translator
 |-cli -> Tools for parsing command line and handling commands
 |  |-commands -> Command handlers
 |  |-parser -> The load configs parser
 |  |-selector -> Tools related to selector parsing
 |-doc
 |-fetch
 |-instances -> Code related to the cvd instances, groups and database,
 |              including actions to be performed over the instances
 |              (i.e start, stop, etc)
 |-legacy -> Legacy code, mostly concerning the cvd server
 |-metrics
 |-unittests
 |-utils

Only the files are in their right location, code is still spread all
over the place and will be moved gradually in future commits.
  • Loading branch information
jemoreira committed Oct 28, 2024
1 parent 6c01d79 commit 776ac99
Show file tree
Hide file tree
Showing 246 changed files with 804 additions and 885 deletions.
496 changes: 247 additions & 249 deletions base/cvd/cuttlefish/host/commands/cvd/BUILD.bazel

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions base/cvd/cuttlefish/host/commands/cvd/acloud/converter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
#include "common/libs/utils/subprocess.h"
#include "host/commands/cvd/acloud/config.h"
#include "host/commands/cvd/acloud/create_converter_parser.h"
#include "host/commands/cvd/common_utils.h"
#include "host/commands/cvd/lock_file.h"
#include "host/commands/cvd/selector/instance_database_utils.h"
#include "host/commands/cvd/selector/selector_constants.h"
#include "host/commands/cvd/command_request.h"
#include "host/commands/cvd/server_command/utils.h"
#include "host/commands/cvd/utils/common.h"
#include "host/commands/cvd/instances/lock_file.h"
#include "host/commands/cvd/instances/instance_database_utils.h"
#include "host/commands/cvd/cli/selector/selector_constants.h"
#include "host/commands/cvd/cli/command_request.h"
#include "host/commands/cvd/cli/utils.h"
#include "host/libs/config/config_constants.h"

namespace cuttlefish {
Expand Down
2 changes: 1 addition & 1 deletion base/cvd/cuttlefish/host/commands/cvd/acloud/converter.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <string>
#include <vector>

#include "host/commands/cvd/command_request.h"
#include "host/commands/cvd/cli/command_request.h"

#include "common/libs/utils/result.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <string>

#include "common/libs/utils/result.h"
#include "host/commands/cvd/types.h"
#include "host/commands/cvd/cli/types.h"

namespace cuttlefish {
namespace acloud_impl {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
* limitations under the License.
*/

#include "host/commands/cvd/command_request.h"
#include "host/commands/cvd/cli/command_request.h"

#include <string>
#include <vector>

#include "common/libs/utils/result.h"
#include "host/commands/cvd/command_request.h"
#include "host/commands/cvd/selector/selector_common_parser.h"
#include "host/commands/cvd/cli/command_request.h"
#include "host/commands/cvd/cli/selector/selector_common_parser.h"

namespace cuttlefish {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@

#include <google/protobuf/map.h>

#include "cuttlefish/host/commands/cvd/cvd_server.pb.h"
#include "cuttlefish/host/commands/cvd/legacy/cvd_server.pb.h"

#include "common/libs/fs/shared_fd.h"
#include "common/libs/utils/result.h"
#include "host/commands/cvd/selector/selector_common_parser.h"
#include "host/commands/cvd/types.h"
#include "host/commands/cvd/cli/selector/selector_common_parser.h"
#include "host/commands/cvd/cli/types.h"

namespace cuttlefish {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "host/commands/cvd/command_sequence.h"
#include "host/commands/cvd/cli/command_sequence.h"

#include <memory>

#include <android-base/strings.h>

#include "common/libs/utils/environment.h"
#include "host/commands/cvd/request_context.h"
#include "host/commands/cvd/command_request.h"
#include "host/commands/cvd/types.h"
#include "host/commands/cvd/cli/request_context.h"
#include "host/commands/cvd/cli/command_request.h"
#include "host/commands/cvd/cli/types.h"

namespace cuttlefish {
namespace {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#include <ostream>
#include <vector>

#include "cuttlefish/host/commands/cvd/cvd_server.pb.h"
#include "host/commands/cvd/command_request.h"
#include "host/commands/cvd/server_command/server_handler.h"
#include "cuttlefish/host/commands/cvd/legacy/cvd_server.pb.h"
#include "host/commands/cvd/cli/command_request.h"
#include "host/commands/cvd/cli/commands/server_handler.h"

namespace cuttlefish {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "host/commands/cvd/server_command/acloud_command.h"
#include "host/commands/cvd/cli/commands/acloud_command.h"

#include <thread>

Expand All @@ -26,14 +26,14 @@
#include "common/libs/utils/environment.h"
#include "common/libs/utils/files.h"
#include "common/libs/utils/result.h"
#include "cuttlefish/host/commands/cvd/cvd_server.pb.h"
#include "cuttlefish/host/commands/cvd/legacy/cvd_server.pb.h"
#include "host/commands/cvd/acloud/converter.h"
#include "host/commands/cvd/acloud/create_converter_parser.h"
#include "host/commands/cvd/command_sequence.h"
#include "host/commands/cvd/server_command/acloud_common.h"
#include "host/commands/cvd/server_command/server_handler.h"
#include "host/commands/cvd/server_command/utils.h"
#include "host/commands/cvd/types.h"
#include "host/commands/cvd/cli/command_sequence.h"
#include "host/commands/cvd/cli/commands/acloud_common.h"
#include "host/commands/cvd/cli/commands/server_handler.h"
#include "host/commands/cvd/cli/utils.h"
#include "host/commands/cvd/cli/types.h"

namespace cuttlefish {
namespace {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include <memory>

#include "host/commands/cvd/command_sequence.h"
#include "host/commands/cvd/cli/command_sequence.h"

namespace cuttlefish {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

#include "host/commands/cvd/server_command/acloud_common.h"
#include "host/commands/cvd/cli/commands/acloud_common.h"

#include "host/commands/cvd/server_command/utils.h"
#include "host/commands/cvd/cli/utils.h"

namespace cuttlefish {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#pragma once

#include "host/commands/cvd/command_request.h"
#include "host/commands/cvd/cli/command_request.h"

namespace cuttlefish {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
#include "common/libs/utils/files.h"
#include "common/libs/utils/flag_parser.h"
#include "common/libs/utils/result.h"
#include "cuttlefish/host/commands/cvd/cvd_server.pb.h"
#include "host/commands/cvd/command_request.h"
#include "host/commands/cvd/server_command/acloud_mixsuperimage.h"
#include "host/commands/cvd/server_command/server_handler.h"
#include "host/commands/cvd/server_command/utils.h"
#include "host/commands/cvd/types.h"
#include "cuttlefish/host/commands/cvd/legacy/cvd_server.pb.h"
#include "host/commands/cvd/cli/command_request.h"
#include "host/commands/cvd/cli/commands/acloud_mixsuperimage.h"
#include "host/commands/cvd/cli/commands/server_handler.h"
#include "host/commands/cvd/cli/utils.h"
#include "host/commands/cvd/cli/types.h"
#include "host/libs/config/config_utils.h"

namespace cuttlefish {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include <memory>

#include "host/commands/cvd/server_command/server_handler.h"
#include "host/commands/cvd/cli/commands/server_handler.h"

namespace cuttlefish {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
* limitations under the License.
*/

#include "host/commands/cvd/server_command/acloud_translator.h"
#include "host/commands/cvd/cli/commands/acloud_translator.h"

#include "common/libs/utils/flag_parser.h"
#include "common/libs/utils/result.h"
#include "cuttlefish/host/commands/cvd/cvd_server.pb.h"
#include "host/commands/cvd/command_request.h"
#include "host/commands/cvd/server_command/server_handler.h"
#include "host/commands/cvd/server_command/utils.h"
#include "host/commands/cvd/types.h"
#include "cuttlefish/host/commands/cvd/legacy/cvd_server.pb.h"
#include "host/commands/cvd/cli/command_request.h"
#include "host/commands/cvd/cli/commands/server_handler.h"
#include "host/commands/cvd/cli/utils.h"
#include "host/commands/cvd/cli/types.h"

namespace cuttlefish {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#include <memory>

#include "host/commands/cvd/instance_manager.h"
#include "host/commands/cvd/server_command/server_handler.h"
#include "host/commands/cvd/instances/instance_manager.h"
#include "host/commands/cvd/cli/commands/server_handler.h"

namespace cuttlefish {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "host/commands/cvd/server_command/bugreport.h"
#include "host/commands/cvd/cli/commands/bugreport.h"

#include <sys/types.h>

Expand All @@ -29,14 +29,14 @@
#include "common/libs/utils/result.h"
#include "common/libs/utils/subprocess.h"
#include "common/libs/utils/users.h"
#include "cuttlefish/host/commands/cvd/cvd_server.pb.h"
#include "host/commands/cvd/common_utils.h"
#include "host/commands/cvd/group_selector.h"
#include "host/commands/cvd/instance_manager.h"
#include "host/commands/cvd/interruptible_terminal.h"
#include "host/commands/cvd/server_command/server_handler.h"
#include "host/commands/cvd/server_command/utils.h"
#include "host/commands/cvd/types.h"
#include "cuttlefish/host/commands/cvd/legacy/cvd_server.pb.h"
#include "host/commands/cvd/utils/common.h"
#include "host/commands/cvd/cli/group_selector.h"
#include "host/commands/cvd/instances/instance_manager.h"
#include "host/commands/cvd/cli/interruptible_terminal.h"
#include "host/commands/cvd/cli/commands/server_handler.h"
#include "host/commands/cvd/cli/utils.h"
#include "host/commands/cvd/cli/types.h"

namespace cuttlefish {
namespace {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#include <memory>

#include "host/commands/cvd/instance_manager.h"
#include "host/commands/cvd/server_command/server_handler.h"
#include "host/commands/cvd/instances/instance_manager.h"
#include "host/commands/cvd/cli/commands/server_handler.h"

namespace cuttlefish {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "host/commands/cvd/server_command/clear.h"
#include "host/commands/cvd/cli/commands/clear.h"

#include <sys/types.h>

Expand All @@ -23,11 +23,11 @@
#include <android-base/scopeguard.h>

#include "common/libs/utils/result.h"
#include "cuttlefish/host/commands/cvd/cvd_server.pb.h"
#include "host/commands/cvd/instance_manager.h"
#include "host/commands/cvd/server_command/server_handler.h"
#include "host/commands/cvd/server_command/utils.h"
#include "host/commands/cvd/types.h"
#include "cuttlefish/host/commands/cvd/legacy/cvd_server.pb.h"
#include "host/commands/cvd/instances/instance_manager.h"
#include "host/commands/cvd/cli/commands/server_handler.h"
#include "host/commands/cvd/cli/utils.h"
#include "host/commands/cvd/cli/types.h"

namespace cuttlefish {
namespace {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#include <memory>

#include "host/commands/cvd/instance_manager.h"
#include "host/commands/cvd/server_command/server_handler.h"
#include "host/commands/cvd/instances/instance_manager.h"
#include "host/commands/cvd/cli/commands/server_handler.h"

namespace cuttlefish {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
* limitations under the License.
*/

#include "host/commands/cvd/server_command/cmd_list.h"
#include "host/commands/cvd/cli/commands/cmd_list.h"

#include <vector>

#include <android-base/strings.h>
#include <json/value.h>

#include "host/commands/cvd/server_command/server_handler.h"
#include "host/commands/cvd/server_command/utils.h"
#include "host/commands/cvd/types.h"
#include "host/commands/cvd/cli/commands/server_handler.h"
#include "host/commands/cvd/cli/utils.h"
#include "host/commands/cvd/cli/types.h"

namespace cuttlefish {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#include <memory>

#include "host/commands/cvd/command_sequence.h"
#include "host/commands/cvd/server_command/server_handler.h"
#include "host/commands/cvd/cli/command_sequence.h"
#include "host/commands/cvd/cli/commands/server_handler.h"

namespace cuttlefish {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "host/commands/cvd/server_command/create.h"
#include "host/commands/cvd/cli/commands/create.h"

#include <sys/types.h>

Expand All @@ -32,18 +32,18 @@
#include "common/libs/utils/flag_parser.h"
#include "common/libs/utils/result.h"
#include "common/libs/utils/users.h"
#include "cuttlefish/host/commands/cvd/cvd_server.pb.h"
#include "cuttlefish/host/commands/cvd/selector/cvd_persistent_data.pb.h"
#include "host/commands/cvd/command_sequence.h"
#include "host/commands/cvd/common_utils.h"
#include "host/commands/cvd/selector/creation_analyzer.h"
#include "host/commands/cvd/selector/instance_database_types.h"
#include "host/commands/cvd/selector/instance_group_record.h"
#include "host/commands/cvd/selector/selector_constants.h"
#include "host/commands/cvd/server_command/host_tool_target.h"
#include "host/commands/cvd/server_command/server_handler.h"
#include "host/commands/cvd/server_command/utils.h"
#include "host/commands/cvd/types.h"
#include "cuttlefish/host/commands/cvd/legacy/cvd_server.pb.h"
#include "cuttlefish/host/commands/cvd/instances/cvd_persistent_data.pb.h"
#include "host/commands/cvd/cli/command_sequence.h"
#include "host/commands/cvd/utils/common.h"
#include "host/commands/cvd/cli/selector/creation_analyzer.h"
#include "host/commands/cvd/instances/instance_database_types.h"
#include "host/commands/cvd/instances/instance_group_record.h"
#include "host/commands/cvd/cli/selector/selector_constants.h"
#include "host/commands/cvd/cli/commands/host_tool_target.h"
#include "host/commands/cvd/cli/commands/server_handler.h"
#include "host/commands/cvd/cli/utils.h"
#include "host/commands/cvd/cli/types.h"

namespace cuttlefish {
namespace {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

#include <memory>

#include "host/commands/cvd/command_sequence.h"
#include "host/commands/cvd/instance_manager.h"
#include "host/commands/cvd/server_command/server_handler.h"
#include "host/commands/cvd/cli/command_sequence.h"
#include "host/commands/cvd/instances/instance_manager.h"
#include "host/commands/cvd/cli/commands/server_handler.h"

namespace cuttlefish {

Expand Down
Loading

0 comments on commit 776ac99

Please sign in to comment.