Cleaned up host mod and host create logic.
Merged site_host.py into host.py. Created base class for shared logic
between mod and create actions. Also merged tests to run the same test
cases against both actions.
CQ-DEPEND=CL:354552
BUG=None
TEST=Unit tests verified locally.
Change-Id: If14786ef5f58a415406efd7a2f24b96ca3ea1a74
Reviewed-on: https://chromium-review.googlesource.com/355733
Commit-Ready: Justin Giorgi <jgiorgi@google.com>
Tested-by: Justin Giorgi <jgiorgi@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
diff --git a/frontend/afe/admin.py b/frontend/afe/admin.py
index 5b7143e..72ab046 100644
--- a/frontend/afe/admin.py
+++ b/frontend/afe/admin.py
@@ -7,7 +7,7 @@
from django.utils.encoding import smart_str
from django.utils.safestring import mark_safe
-from autotest_lib.cli import rpc, site_host
+from autotest_lib.cli import rpc, host
from autotest_lib.frontend import settings
from autotest_lib.frontend.afe import model_logic, models
@@ -227,7 +227,7 @@
acls = []
# Pipe to cli to perform autodetection and create host.
- host_create_obj = site_host.site_host_create.construct_without_parse(
+ host_create_obj = shost.host_create.construct_without_parse(
web_server, hosts, platform,
locked, lock_reason, labels, acls,
protection)