Merge "Deprecate "create_cf" command" am: f674255080 am: 104100079b am: d01dd946b5 am: a4d4b1dba6 am: 8ab8504bd4
Original change: https://android-review.googlesource.com/c/platform/tools/acloud/+/2058210
Change-Id: Idb96f6100ae8814bfc9cdaeefdec228c5dc5f5a3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/internal/lib/cvd_compute_client.py b/internal/lib/cvd_compute_client.py
index cdedbe2..e4245e7 100644
--- a/internal/lib/cvd_compute_client.py
+++ b/internal/lib/cvd_compute_client.py
@@ -56,7 +56,7 @@
"cvd_01_fetch_kernel_bid",
"cvd_01_fetch_kernel_build_target"]
-
+# TODO(228405515): Delete CvdComputeClient class.
class CvdComputeClient(android_compute_client.AndroidComputeClient):
"""Client that manages Anadroid Virtual Device."""
diff --git a/public/acloud_main.py b/public/acloud_main.py
index 12cf258..96648d6 100644
--- a/public/acloud_main.py
+++ b/public/acloud_main.py
@@ -70,9 +70,7 @@
from __future__ import print_function
import argparse
import logging
-import os
import sys
-import sysconfig
import traceback
if sys.version_info.major == 2:
@@ -106,7 +104,6 @@
from acloud.delete import delete
from acloud.delete import delete_args
from acloud.internal import constants
-from acloud.internal.lib import utils
from acloud.reconnect import reconnect
from acloud.reconnect import reconnect_args
from acloud.list import list as list_instances
@@ -117,7 +114,6 @@
from acloud.public import acloud_common
from acloud.public import config
from acloud.public import report
-from acloud.public.actions import create_cuttlefish_action
from acloud.public.actions import create_goldfish_action
from acloud.pull import pull
from acloud.pull import pull_args
@@ -136,12 +132,10 @@
PROG = "acloud"
# Commands
-CMD_CREATE_CUTTLEFISH = "create_cf"
CMD_CREATE_GOLDFISH = "create_gf"
# Config requires fields.
_CREATE_REQUIRE_FIELDS = ["project", "zone", "machine_type"]
-_CREATE_CF_REQUIRE_FIELDS = ["resolution"]
# show contact info to user.
_CONTACT_INFO = ("If you have any question or need acloud team support, "
"please feel free to contact us by email at "
@@ -179,13 +173,6 @@
subparsers = parser.add_subparsers(metavar="{" + usage + "}")
subparser_list = []
- # Command "create_cf", create cuttlefish instances
- create_cf_parser = subparsers.add_parser(CMD_CREATE_CUTTLEFISH)
- create_cf_parser.required = False
- create_cf_parser.set_defaults(which=CMD_CREATE_CUTTLEFISH)
- create_args.AddCommonCreateArgs(create_cf_parser)
- subparser_list.append(create_cf_parser)
-
# Command "create_gf", create goldfish instances
# In order to create a goldfish device we need the following parameters:
# 1. The emulator build we wish to use, this is the binary that emulates
@@ -282,10 +269,6 @@
create_args.VerifyArgs(parsed_args)
if parsed_args.which == setup_args.CMD_SETUP:
setup_args.VerifyArgs(parsed_args)
- if parsed_args.which == CMD_CREATE_CUTTLEFISH:
- if not parsed_args.build_id and not parsed_args.branch:
- raise errors.CommandArgError(
- "Must specify --build_id or --branch")
if parsed_args.which == CMD_CREATE_GOLDFISH:
if not parsed_args.emulator_build_id and not parsed_args.build_id and (
not parsed_args.emulator_branch and not parsed_args.branch):
@@ -301,9 +284,7 @@
"--system-* args are not supported for AVD type: %s"
% constants.TYPE_GF)
- if parsed_args.which in [
- create_args.CMD_CREATE, CMD_CREATE_CUTTLEFISH, CMD_CREATE_GOLDFISH
- ]:
+ if parsed_args.which in [create_args.CMD_CREATE, CMD_CREATE_GOLDFISH]:
if (parsed_args.serial_log_file
and not parsed_args.serial_log_file.endswith(".tar.gz")):
raise errors.CommandArgError(
@@ -323,8 +304,6 @@
missing_fields = []
if args.which == create_args.CMD_CREATE and args.local_instance is None:
missing_fields = cfg.GetMissingFields(_CREATE_REQUIRE_FIELDS)
- if args.which == CMD_CREATE_CUTTLEFISH:
- missing_fields.extend(cfg.GetMissingFields(_CREATE_CF_REQUIRE_FIELDS))
if missing_fields:
return (
"Config file (%s) missing required fields: %s, please add these "
@@ -422,31 +401,6 @@
constants.ACLOUD_UNKNOWN_ARGS_ERROR)
elif args.which == create_args.CMD_CREATE:
reporter = create.Run(args)
- elif args.which == CMD_CREATE_CUTTLEFISH:
- # Set ports offset when base_instance_num is specified
- utils.SetCvdPorts(args.base_instance_num)
-
- reporter = create_cuttlefish_action.CreateDevices(
- cfg=cfg,
- build_target=args.build_target,
- build_id=args.build_id,
- branch=args.branch,
- kernel_build_id=args.kernel_build_id,
- kernel_branch=args.kernel_branch,
- kernel_build_target=args.kernel_build_target,
- system_branch=args.system_branch,
- system_build_id=args.system_build_id,
- system_build_target=args.system_build_target,
- bootloader_branch=args.bootloader_branch,
- bootloader_build_id=args.bootloader_build_id,
- bootloader_build_target=args.bootloader_build_target,
- gpu=args.gpu,
- num=args.num,
- serial_log_file=args.serial_log_file,
- autoconnect=args.autoconnect,
- report_internal_ip=args.report_internal_ip,
- boot_timeout_secs=args.boot_timeout_secs,
- ins_timeout_secs=args.ins_timeout_secs)
elif args.which == CMD_CREATE_GOLDFISH:
reporter = create_goldfish_action.CreateDevices(
cfg=cfg,