History log of /external/autotest/site_utils/rpm_control_system/rpm_controller_unittest.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c30c4bff38842a7ffd34c1dd9d0ce614d99bc17e 14-Aug-2014 Fang Deng <fdeng@chromium.org> [autotest] rpm dispatcher/controller get power info from frontend server

This is the 3rd CL for making the rpm infra read rpm/outlet/hydra
info from AFE.

Previously, rpm dispatcher/controler uses regular expression pattern
to determine the hydra hostname. And outlet(ports) must be labeled
with hostname beforehand.

This cl makes rpm dispatcher/controler receive a PowerUnitInfo instance
from frontend server, which includes the rpm(poe)/outlet(port)/hydra
information for the device.

CQ-DEPEND=CL:212346
BUG=chromium:392548
TEST=unittest; Integration tests with other cls in this series, set
up a local rpm server and power cycle devices.

Change-Id: I492531c8dc3f134d32f73d0a0560bf54f8a28b70
Reviewed-on: https://chromium-review.googlesource.com/212357
Tested-by: Fang Deng <fdeng@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Fang Deng <fdeng@chromium.org>
/external/autotest/site_utils/rpm_control_system/rpm_controller_unittest.py
6d46b56491828491926e2de272dc41a63fc82988 08-Mar-2014 Dan Shi <dshi@chromium.org> [autotest] Run set_power_state call in a new process

Move set_power_state call in a new process, so we can attempt to timeout the
call.

BUG=chromium:243567
DEPLOY=rpm

TEST=local rpm test
tested with dut chromeos1-rack3-host2, steps:
Edit shadow config:
[CROS]
rpm_frontend_uri: http://dshi.mtv.corp.google.com:9999
Edit rpm_config.ini
frontend_addr: dshi.mtv
Start dispatcher and frontend
ssh admn@chromeos1-rack3-rpm1.cros
enter status to check rpm status
lock one machine not stumpy
./rpm_client.py -m chromeos1-rack3-host2 -s ON
check status is ON
./rpm_client.py -m chromeos1-rack3-host2 -s OFF
check status is OFF
unlock dut

Change-Id: I64b3b7f75a56a6fe4d6a2140c7fee8194bda5c7c
Reviewed-on: https://chromium-review.googlesource.com/189359
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
/external/autotest/site_utils/rpm_control_system/rpm_controller_unittest.py
71c4b1f8a48a8a6607e823a90c0e6db8a70e6b7a 20-May-2013 Fang Deng <fdeng@chromium.org> [autotest] Add POE support to RPM server

Add POE support to RPM server. This allows us to hard reset
beaglebones utilizing the RPM server.

The core implementation resides in POEController in rpm_controller.py
To find out to which switch a servo is connected to,
we store the mapping information(servo->switch) in a csv-formatted file.
The file name is specified in rpm_config.ini.

rpm_dispatcher is modified to route poe requests to POEController instances.
Once rpm_dispatcher is initialized, it loads the mapping file to a dictionary
and uses it to determine the switch hostname and interface for a servo.

Simple integration tests are added in rpm_controller.py
Unit tests are added in rpm_controller_unittest.py
utils_unittest.py is added to test util functions in utils.py

servo-interface-mapping.csv should be updated if configuration
in switches changes.

BUG=chromium:232614
TEST=ran rpm_controller_unittest.py, rpm_dispacher_unittest.py,
frontend_server_unittest.py, utils_unittest.py, integration tests
in rpm_controller.py, test_client.py, and ran frontend_server.py,
rpm_dispatcher, rpm_client locally.

Change-Id: I294e34ad7efc6d9cc7543e1c57694466086d1791
Reviewed-on: https://gerrit.chromium.org/gerrit/55838
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Fang Deng <fdeng@chromium.org>
Tested-by: Fang Deng <fdeng@chromium.org>
/external/autotest/site_utils/rpm_control_system/rpm_controller_unittest.py
201d6bed32236821de5df805376cc78b87d38d7a 21-Sep-2012 Scott Zawalski <scottz@google.com> A few misc fixes to the rpm server.

* Add #!/usr/bin/python and +x to scripts that should be executable
* Modify rpm_config.ini to set frontend_addr to 0.0.0.0
* Update dns_zone to be cros.corp.google.com
* Automatically create the logging dir if it doesn't exist
* Print usage if any arguments are specified on the cmdline.

TEST=unittests and local runs
BUG=chromium-os:34662,chromium-os:32525,chromium-os:32698
STATUS=Fixed

Change-Id: I88fa52c5e76e6dd589c6d91deb4af373c9262dc1
Reviewed-on: https://gerrit.chromium.org/gerrit/33792
Commit-Ready: Scott Zawalski <scottz@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Tested-by: Scott Zawalski <scottz@chromium.org>
/external/autotest/site_utils/rpm_control_system/rpm_controller_unittest.py
aba8b53ac6d8e5d850be9948e339dbd58fd25624 09-Aug-2012 Simran Basi <sbasi@google.com> Autotest: Add chromeos2 lab support to RPM Infrastructure.

Added support for devices in chromeos2 lab to the RPM Controller
codebase. It will determine if the device is behind a hydra device and
if so complete the proper login/logout procedures required.

So it turns out that theres a known pycurl/libcurl issue that can occur
sometimes when used with multiple threads and cause the python thread to
crash. Therefore I replaced the geturl call to utilize urllib instead.

BUG=chromium-os:30955
TEST=Expanded the functional tests and ensured the unittests still work.
Stress tested web calls in a while loop to ensure that no threads crash.

Change-Id: I646abe2f09cf00304892bad217e7f1a9561e1297
Reviewed-on: https://gerrit.chromium.org/gerrit/29822
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Ready: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
/external/autotest/site_utils/rpm_control_system/rpm_controller_unittest.py
7498d20028f81b2c3c6f9ce0535b84ce220d2ae2 11-Jul-2012 Simran Basi <sbasi@google.com> Autotest: Design and implement RPM Server Infrastructure.

Created the RPM Frontend and Dispatch Servers. The Frontend is
responsible for accepting RPM requests from clients and fielding them
out to dispatchers. The dispatchers are responsible for managing
RPMController instances which will communicate with the RPM devices.

MultiThreadedXMLRPCServer is a simple class that allows us to have
multithreaded xmlrpcserver instances and accept multiple requests.

BUG=chromium-os:30955
TEST=Simple Integration Test in 'test_client.py'. Along with simple
unittests for frontend_server.

Change-Id: I337a019b4496b0fa4e01dbb1625c19b1b45693fd
Reviewed-on: https://gerrit.chromium.org/gerrit/27084
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Ready: Simran Basi <sbasi@google.com>
Tested-by: Simran Basi <sbasi@google.com>
/external/autotest/site_utils/rpm_control_system/rpm_controller_unittest.py
e64493206b76bce6e3af0598790ec076094e8c37 16-Jun-2012 Simran Basi <sbasi@google.com> Autotest: Design and implement a system of managing RPM devices.

Created the rpm_control_system folder in site_utils. rpm_controller.py
will interact directly with our 2 different RPM device types.

The abstract class RPMController implements queueing different requests
as well as processing the requests serially.

The subclasses implement device specific code for interacting with the
different devices.

dli.py and BeautifulSoup.py are third party libraries that we will be
leaving here in order to make the RPM Integration System independent
from autotest.

BUG=chromium-os:30955
TEST=Simple Integration Tests in 'rpm_controller.py'. Along with
unittests to check successful/unsuccessful cases.

Change-Id: I6d570646b1e37b2a1a3eb96293768b177b92afd2
Reviewed-on: https://gerrit.chromium.org/gerrit/25433
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Ready: Simran Basi <sbasi@google.com>
Tested-by: Simran Basi <sbasi@google.com>
/external/autotest/site_utils/rpm_control_system/rpm_controller_unittest.py