]> git.ipfire.org Git - nitsi.git/commitdiff
Rename the connection class to serial_connection
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Fri, 27 Apr 2018 13:57:46 +0000 (15:57 +0200)
committerJonatan Schlag <jonatan.schlag@ipfire.org>
Fri, 27 Apr 2018 13:57:46 +0000 (15:57 +0200)
This reflects our naming scheme better

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
test.py

diff --git a/test.py b/test.py
index 47c82c44a9cd0c32108b86b1ec3e619a93133272..c13917d5409833d646b69ac9c95085929259b83d 100755 (executable)
--- a/test.py
+++ b/test.py
@@ -135,7 +135,7 @@ class machine():
         return elem.get("path")
 
     def check_is_booted_up(self):
         return elem.get("path")
 
     def check_is_booted_up(self):
-        serial_con = connection(self.get_serial_device())
+        serial_con = serial_connection(self.get_serial_device())
 
         serial_con.write("\n")
         # This will block till the domain is booted up
 
         serial_con.write("\n")
         # This will block till the domain is booted up
@@ -145,7 +145,7 @@ class machine():
 
     def login(self):
         try:
 
     def login(self):
         try:
-            self.serial_con = connection(self.get_serial_device(), username=self.username)
+            self.serial_con = serial_connection(self.get_serial_device(), username=self.username)
             self.serial_con.login(self.password)
         except BaseException as e:
             self.log.error("Could not connect to the domain via serial console")
             self.serial_con.login(self.password)
         except BaseException as e:
             self.log.error("Could not connect to the domain via serial console")
@@ -163,7 +163,7 @@ class machine():
             self.disk.umount("/")
             self.disk.close()
 
             self.disk.umount("/")
             self.disk.close()
 
-class connection():
+class serial_connection():
     def __init__(self, device, username=None):
         self.buffer = b""
         self.back_at_prompt_pattern =  None
     def __init__(self, device, username=None):
         self.buffer = b""
         self.back_at_prompt_pattern =  None