[X2Go-Commits] python-x2go.git - twofactorauth (branch) updated: 3734cd9ddc229a85f699835de6d358294916fe8f

X2Go dev team git-admin at x2go.org
Sat Sep 14 15:55:17 CEST 2013


The branch, twofactorauth has been updated
       via  3734cd9ddc229a85f699835de6d358294916fe8f (commit)
      from  7084133e10400f148ab7bd8d606be623d431cd22 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 x2go/client.py |   42 +++++++++++++++++++++++++++---------------
 1 file changed, 27 insertions(+), 15 deletions(-)

The diff of changes is:
diff --git a/x2go/client.py b/x2go/client.py
index f0d59b5..2d1a50c 100644
--- a/x2go/client.py
+++ b/x2go/client.py
@@ -32,8 +32,8 @@ import copy
 
 # Python X2go modules
 from settings import X2goClientSettings
-from settings import X2goClientPrinting
-from profiles import X2goClientSessionProfile, X2goClientSessionProfiles
+from printing import X2goClientPrinting
+#from profiles import X2goClientSessionProfile, X2goClientSessionProfiles
 from session import X2goSession, _X2GO_SESSION_OPTIONS
 import log
 
@@ -107,7 +107,7 @@ class X2goClient(object):
         @type loglevel: int
         """
         self.settings_config = X2goClientSettings()
-        self.sessions_config = X2goClientSessionProfiles()
+        #self.sessions_config = X2goClientSessionProfiles()
         self.printing_config = X2goClientPrinting()
         if logger is None:
             self.logger = log.X2goLogger(loglevel=loglevel)
@@ -256,7 +256,7 @@ class X2goClient(object):
         return self.session_registry[session_hash]['session'].session_info
 
 
-    def connect_session(self, session_hash, password=None, add_to_known_hosts=False, force_password_auth=False):
+    def __connect_session(self, session_hash, password=None, add_to_known_hosts=False, force_password_auth=False):
         """\
         Connect to a registered X2go session with registry hash C{<session_hash>}. 
         This method basically wraps around paramiko.SSHClient.connect() for the 
@@ -282,6 +282,7 @@ class X2goClient(object):
         paramiko_connect_options['force_password_auth'] = force_password_auth
         session.connect(server, **paramiko_connect_options)
         self.session_registry[session_hash]['connected'] = True
+    connect_session = __connect_session
 
 
     def session_print_action(self, session_hash, print_action, **kwargs):
@@ -293,7 +294,7 @@ class X2goClient(object):
         self.with_session(session_hash).set_print_action(print_action, **kwargs)
 
 
-    def start_session(self, session_hash):
+    def __start_session(self, session_hash):
         """\
         Start a new X2go session on the remote X2go server.
 
@@ -313,9 +314,10 @@ class X2goClient(object):
 
         session.run_command()
         self.session_registry[session_hash]['running'] = True
+    start_session = __start_session
 
 
-    def clean_sessions(self, session_hash):
+    def __clean_sessions(self, session_hash):
         """\
         Find running X2go sessions that have been standard by the connected
         user and terminate them.
@@ -327,9 +329,10 @@ class X2goClient(object):
         session_infos = session.list_sessions()
         for session_info in session_infos.values():
             session.terminate(session_name=session_info)
+    clean_sessions = __clean_sessions
 
 
-    def list_sessions(self, session_hash):
+    def __list_sessions(self, session_hash):
         """\
         Use the X2go session registered under C{session_hash} to
         retrieve a list of running or suspended X2go sessions on the 
@@ -340,9 +343,10 @@ class X2goClient(object):
         """
         session = self.session_registry[session_hash]['session']
         return session.list_sessions()
+    list_sessions = __list_sessions
 
 
-    def resume_session(self, session_hash, session_name):
+    def __resume_session(self, session_hash, session_name):
         """\
         Resume or continue a suspended / running X2go session on the 
         remote X2go server.
@@ -364,9 +368,10 @@ class X2goClient(object):
             session.start_printing()
 
         self.session_registry[session_hash]['running'] = True
+    resume_session = __resume_session
 
 
-    def suspend_session(self, session_hash, session_name=None):
+    def __suspend_session(self, session_hash, session_name=None):
         """\
         Suspend an X2go session. 
 
@@ -389,9 +394,10 @@ class X2goClient(object):
         if session_name is None:
             self.session_registry[session_hash]['running'] = False
             self.session_registry[session_hash]['suspended'] = True
+    suspend_session = __suspend_session
 
 
-    def terminate_session(self, session_hash, session_name=None):
+    def __terminate_session(self, session_hash, session_name=None):
         """\
         Terminate an X2go session. 
 
@@ -415,9 +421,10 @@ class X2goClient(object):
             self.session_registry[session_hash]['running'] = False
             self.session_registry[session_hash]['suspended'] = False
             self.session_registry[session_hash]['terminated'] = True
+    terminate_session = __terminate_session
 
 
-    def session_ok(self, session_hash):
+    def __session_ok(self, session_hash):
         """\
         Test if the X2go session registered as C{session_hash} is
         in a healthy state.
@@ -429,9 +436,10 @@ class X2goClient(object):
         @rtype: bool
         """
         return self.with_session(session_hash).ok()
+    session_ok = __session_ok
 
 
-    def is_running(self, session_hash):
+    def __is_running(self, session_hash):
         """\
         Test if the X2go session registered as C{session_hash} is up 
         and running.
@@ -443,9 +451,10 @@ class X2goClient(object):
         @rtype: bool
         """
         return self.with_session(session_hash).is_running()
+    is_running = __is_running
 
 
-    def is_suspended(self, session_hash):
+    def __is_suspended(self, session_hash):
         """\
         Test if the X2go session registered as C{session_hash} 
         is in suspended state.
@@ -457,9 +466,10 @@ class X2goClient(object):
         @rtype: bool
         """
         return self.with_session(session_hash).is_suspended()
+    is_suspended = __is_suspended
 
 
-    def has_terminated(self, session_hash):
+    def __has_terminated(self, session_hash):
         """\
         Test if the X2go session registered as C{session_hash} 
         has terminated.
@@ -471,9 +481,10 @@ class X2goClient(object):
         @rtype: bool
         """
         return self.with_session(session_hash).has_terminated()
+    has_terminated = __has_terminated
 
 
-    def share_local_folder(self, session_hash, folder_name):
+    def __share_local_folder(self, session_hash, folder_name):
         """\
         Share a local folder with the X2go session registered as C{session_hash}.
 
@@ -488,3 +499,4 @@ class X2goClient(object):
         @rtype: bool
         """
         return self.with_session(session_hash).share_local_folder(folder_name=folder_name)
+    share_local_folder = __share_local_folder


hooks/post-receive
-- 
python-x2go.git (Python X2Go Client API)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-x2go.git" (Python X2Go Client API).




More information about the x2go-commits mailing list