From ba20c40a6869942df7c5def4598e7a61d10a330e Mon Sep 17 00:00:00 2001 From: Lucas <ls17@c3sl.ufpr.br> Date: Thu, 7 Jun 2018 11:30:14 -0300 Subject: [PATCH] SCRUM#556: Update lelab's methods calls to be compatible with 0.3.7 --- package/debian/changelog | 6 ++++++ package/epoptes | 8 ++++---- package/le-lab/scripts/epoptes | 20 ++++++++++---------- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/package/debian/changelog b/package/debian/changelog index 8612669..a8a9efe 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,3 +1,9 @@ +le-epoptes (0.0.21) unstable; urgency=medium + + * Update lelab module's methods calls to be compatible with le-lab:0.3.7 + + -- Lucas Sulzbach <ls17@c3sl.ufpr.br> Thu, 07 Jun 2018 11:20:32 -0300 + le-epoptes (0.0.20) testing; urgency=medium * Add error message when epoptes can not connect with le-lab diff --git a/package/epoptes b/package/epoptes index 4a95e75..9706c21 100755 --- a/package/epoptes +++ b/package/epoptes @@ -74,7 +74,7 @@ class LEEpoptes(object): def run(self): my_server = self.get_current_server() - current_server = self.conn.epoptes_get_attribute('_server') + current_server = self.conn.get_attribute('epoptes', '_server') logging.debug("Checking server my_server=%s, current_server=%s", my_server, current_server) @@ -84,14 +84,14 @@ class LEEpoptes(object): logging.info("The current server is %s. Changing server to local machine instead.", current_server) logging.info("Starting server %s", my_server) - self.conn.epoptes_advertise() + self.conn.advertise('epoptes') if self.wait_for_lelab(): self.open_epoptes() logging.info("Closing server %s", my_server) - self.conn.epoptes_remove() + self.conn.remove('epoptes') logging.debug("Server %s closed", my_server) else: call_error_dialog("This computer is already registered as an epoptes server.") @@ -110,7 +110,7 @@ class LEEpoptes(object): # Wait for le-lab to register the epoptes service timeout = 0 while True: - if self.conn.epoptes_get_attribute('_status') == 'server': + if self.conn.get_attribute('epoptes', '_status') == 'server': break timeout += 1 diff --git a/package/le-lab/scripts/epoptes b/package/le-lab/scripts/epoptes index 5d67999..17bef3b 100755 --- a/package/le-lab/scripts/epoptes +++ b/package/le-lab/scripts/epoptes @@ -145,8 +145,8 @@ class LEEpoptes_control(object): Called when a local epoptes service is detected """ - status = self.conn.epoptes_get_attribute('_status') - server = self.conn.epoptes_get_attribute('_server') + status = self.conn.get_attribute('epoptes', '_status') + server = self.conn.get_attribute('epoptes', '_server') if status == 'client': self.update_server('pre_server',server) @@ -162,8 +162,8 @@ class LEEpoptes_control(object): Called when a local epoptes service disconnects """ - status = self.conn.epoptes_get_attribute('_status') - server = self.conn.epoptes_get_attribute('_server') + status = self.conn.get_attribute('epoptes', '_status') + server = self.conn.get_attribute('epoptes', '_server') if status == 'pre_client': self.update_server('client',server) @@ -176,8 +176,8 @@ class LEEpoptes_control(object): Called when a remote epoptes service is detected """ - status = self.conn.epoptes_get_attribute('_status') - server = self.conn.epoptes_get_attribute('_server') + status = self.conn.get_attribute('epoptes', '_status') + server = self.conn.get_attribute('epoptes', '_server') if status == 'server': self.update_server('pre_client',host) @@ -190,8 +190,8 @@ class LEEpoptes_control(object): Called when a remote epoptes service disconnects """ - status = self.conn.epoptes_get_attribute('_status') - server = self.conn.epoptes_get_attribute('_server') + status = self.conn.get_attribute('epoptes', '_status') + server = self.conn.get_attribute('epoptes', '_server') if status == 'pre_server': self.update_server('server',socket.gethostname()) @@ -213,8 +213,8 @@ class LEEpoptes_control(object): logging.info("epoptes updating machine status to %s,%s", status, host) self.update_epoptes(status,host) - self.conn.epoptes_set_attribute('_status', status) - self.conn.epoptes_set_attribute('_server', host) + self.conn.set_attribute('epoptes', '_status', status) + self.conn.set_attribute('epoptes', '_server', host) -- GitLab