example: rename a script to use it as internal test
authorWonki Kim <wonki_.kim@samsung.com>
Fri, 24 Apr 2020 09:58:28 +0000 (18:58 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Sat, 25 Apr 2020 05:58:37 +0000 (14:58 +0900)
there is a script that calls commands which are for internal use only.
this patch rename the script as according purpose

Change-Id: Iacea3beae4fdab364ec7be35ab640a3eb076cb02

protocol/examples/python/killServer.py [deleted file]
protocol/examples/python/testInternal.py [new file with mode: 0644]

diff --git a/protocol/examples/python/killServer.py b/protocol/examples/python/killServer.py
deleted file mode 100644 (file)
index d0f9977..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-from __future__ import print_function
-import aurum_pb2
-import aurum_pb2_grpc
-import logging
-import grpc
-
-def run():
-    with grpc.insecure_channel('127.0.0.1:50051') as channel:
-        stub = aurum_pb2_grpc.BootstrapStub(channel)
-        stub.killServer(aurum_pb2.ReqEmpty())
-
-if __name__ == '__main__':
-    logging.basicConfig()
-    run()
\ No newline at end of file
diff --git a/protocol/examples/python/testInternal.py b/protocol/examples/python/testInternal.py
new file mode 100644 (file)
index 0000000..23f2faa
--- /dev/null
@@ -0,0 +1,17 @@
+from __future__ import print_function
+from aurum_pb2 import *
+import aurum_pb2_grpc
+import logging
+import grpc
+
+def run():
+    with grpc.insecure_channel('127.0.0.1:50051') as channel:
+        stub = aurum_pb2_grpc.BootstrapStub(channel)
+
+        print(stub.sync(ReqEmpty()))
+        print(stub.getDeviceTime(ReqGetDeviceTime(type='WALLCLOCK')))
+#        stub.killServer(aurum_pb2.ReqEmpty())
+
+if __name__ == '__main__':
+    logging.basicConfig()
+    run()