use rest api via hbase gateway
Change-Id: I1f48cdcf732fef6dddfa363e98b57d7c3619688e
diff --git a/testcases/fuzz/hal_light/conventional/LightFuzzTest.py b/testcases/fuzz/hal_light/conventional/LightFuzzTest.py
index b9f9fb5..3f404b1 100644
--- a/testcases/fuzz/hal_light/conventional/LightFuzzTest.py
+++ b/testcases/fuzz/hal_light/conventional/LightFuzzTest.py
@@ -55,9 +55,9 @@
def testGaeBt(self):
"""Accesses a GAE bigtable."""
logging.info("testGaeBt: start (username: %s)", getpass.getuser())
- bt_client = bigtable_rest_client.HbaseRestClient(
- "http://android-vts-internal.googleplex.com", table)
- # TODO: actually do BT operations
+ bt_client = bigtable_rest_client.HbaseRestClient("my_table")
+ tables = bt_client.GetTables()
+ logging.info("Tables: %s", tables)
logging.info("testGaeBt: done")
def testTurnOnLightBlackBoxFuzzing(self):
diff --git a/utils/app_engine/bigtable_rest_client.py b/utils/app_engine/bigtable_rest_client.py
index 4837dd3..de58bdb 100644
--- a/utils/app_engine/bigtable_rest_client.py
+++ b/utils/app_engine/bigtable_rest_client.py
@@ -22,9 +22,10 @@
import requests
-_PROJECT_ID = 'google.com:android-vts-internal'
-_INSTANCE_ID = 'vts-dev'
-_COLUMN_FAMILY_ID = 'cf1'
+_DEFAULT_BASE_URL="http://10.128.0.6:8080"
+_PROJECT_ID='google.com:android-vts-internal'
+_INSTANCE_ID='vts-dev'
+_COLUMN_FAMILY_ID='cf1'
class HbaseRestClient(object):
@@ -36,7 +37,7 @@
table_name: The name of the table
"""
- def __init__(self, base_url, table_name):
+ def __init__(self, table_name, base_url=_DEFAULT_BASE_URL):
self.base_url = base_url
self.table_name = table_name