[X2Go-Commits] [x2goclient] 50/74: Start work on broker client implementation for PyHoca-CLI.
git-admin at x2go.org
git-admin at x2go.org
Fri Dec 15 21:05:47 CET 2023
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to annotated tag 0.5.0.1
in repository x2goclient.
commit dcaa9c90a6c7c9f0b3a429a6862fcb87cd4c0a04
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Mon Mar 3 12:46:40 2014 +0100
Start work on broker client implementation for PyHoca-CLI.
---
man/man1/pyhoca-cli.1 | 39 ++++++++++++++++++++++++++++++++++++---
pyhoca-cli | 7 ++++++-
pyhoca/cli/frontend.py | 2 +-
3 files changed, 43 insertions(+), 5 deletions(-)
diff --git a/man/man1/pyhoca-cli.1 b/man/man1/pyhoca-cli.1
index f87985df..dc67cb59 100644
--- a/man/man1/pyhoca-cli.1
+++ b/man/man1/pyhoca-cli.1
@@ -144,9 +144,42 @@ Share mode for X2Go desktop sharing (0: view-only, 1: full access).
Number of interactive authentication attempts in case authentication with the server fails (wrong password?). A value that equals 0
disables interactive authentication completely and requires that a private SSH key has been given on the command line or in the
session profile or that the \-\-password command line option is used.
-.SH LDAP OPTIONS
-LDAP support is planned to be added into \fBpyhoca-cli\fR in the near future. So stay tuned...
-.PP
+
+.SH BROKER OPTIONS
+In case you want to retrieve \fBx2goclient\fR session profiles from an X2Go Session Broker use the following options:
+.TP
+\*(T<\fB\-\-broker-url=<URL>\fR\*(T>
+Specify the <URL> of the X2Go Session Broker. X2Go Client can access http:// and ssh:// style URLs.
+
+Syntax of <URL> for HTTP brokerage:
+
+http(s)://<user>:<password>@<hostname>:<port>/path/to/broker
+
+Syntax of <URL> for SSH brokerage:
+
+ssh://<user>:<password>@<hostname>:<port>/usr/bin/x2gobroker (or any executable that
+provides the broker via SSH).
+
+.TP
+\*(T<\fB\-\-broker-cacertfile=</path/to/cafile.crt>\fR\*(T>
+Specify a special (self-signed) root-CACert file that shall get used when connecting to an X2Go Session Broker via https (SSL). (Not implemented, yet).
+.TP
+\*(T<\fB\-\-broker-noauth\fR\*(T>
+The X2Go Session Broker is accessible without authentication. (Not implemented, yet).
+.TP
+\*(T<\fB\-\-auth-id=<USERNAME>\fR\*(T>
+Use this <USERNAME> for authenticating against the X2Go Session Broker. This option mostly makes sense together
+with \fI--broker-autologin\fR or \fI--broker-ssh-key\fR. (Not implemented, yet).
+.TP
+\*(T<\fB\-\-broker-autologin\fR\*(T>
+For SSH based X2Go Session Brokers. If an SSH agent is available or default key files exist then
+try those for authentication against the X2Go Session Broker. (Not implemented, yet).
+.TP
+\*(T<\fB\-\-broker-ssh-key=<SSHPRIVKEY>\fR\*(T>
+For SSH based X2Go Session Brokers. Full path to a valid SSH private key file. (Not implemented, yet).
+.TP
+\*(T<\fB\-\-broker-name=<NAME>\fR\*(T>
+not implemented
.SH NX OPTIONS (Version 3)
.TP
\*(T<\fB\-g, \-\-geometry\fR \fI{<WIDTH>x<HEIGHT>|fullscreen|maximize}\fR\*(T>
diff --git a/pyhoca-cli b/pyhoca-cli
index 122a590a..9e6aaa51 100755
--- a/pyhoca-cli
+++ b/pyhoca-cli
@@ -174,6 +174,10 @@ print_options = [
{'args':['--printer'], 'default': None, 'help': 'target CUPS print queue for incoming X2Go print jobs (default: CUPS default printer); this option selects \'--print-action CUPS\'',},
{'args':['--print-cmd'], 'default': None, 'help': 'print command including cmd line arguments (default: \'%s\'); this option selects \'--print-action PRINTCMD\'' % DEFAULT_PRINTCMD_CMD,},
]
+broker_options = [
+ {'args':['-B','--broker-url'], 'default': None, 'help': 'retrieve session profiles via an X2Go Session Broker under the given URL', },
+ ]
+
nx_options = [
{'args':['-g','--geometry'], 'default': '800x600','help': 'screen geometry: \'<width>x<height>\' or \'fullscreen\' (default: \'800x600\')',},
{'args':['-q','--link'], 'default': 'adsl', 'choices': ('modem','isdn','adsl','wan','lan'), 'help': 'link quality (default: \'adsl\')',},
@@ -219,10 +223,11 @@ Possible values for the --pack NX option are:
p_debugopts = p.add_argument_group('debug options')
p_x2goopts = p.add_argument_group('X2Go options')
p_printopts = p.add_argument_group('X2Go print options')
+ p_brokeropts = p.add_argument_group('X2Go Session Broker client options')
p_nxopts = p.add_argument_group('NX options')
p_compatopts = p.add_argument_group('compatibility options')
- for (p_group, opts) in ((p_x2goopts, x2go_options), (p_printopts, print_options), (p_actionopts, action_options), (p_debugopts, debug_options), (p_nxopts, nx_options), (p_compatopts, compat_options)):
+ for (p_group, opts) in ((p_x2goopts, x2go_options), (p_printopts, print_options), (p_brokeropts, broker_options), (p_actionopts, action_options), (p_debugopts, debug_options), (p_nxopts, nx_options), (p_compatopts, compat_options)):
required = False
for opt in opts:
diff --git a/pyhoca/cli/frontend.py b/pyhoca/cli/frontend.py
index 1c296e90..443d6083 100644
--- a/pyhoca/cli/frontend.py
+++ b/pyhoca/cli/frontend.py
@@ -333,7 +333,7 @@ class PyHocaCLI(x2go.X2GoClient):
# initialize the X2GoClient context and start the connection to the X2Go server
self._pyhoca_logger('preparing requested X2Go session', loglevel=x2go.loglevel_NOTICE, )
- x2go.X2GoClient.__init__(self, logger=liblogger)
+ x2go.X2GoClient.__init__(self, broker_url=self.args.broker_url, logger=liblogger)
_profiles = self._X2GoClient__get_profiles()
if self.args.session_profile and not _profiles.has_profile(self.args.session_profile):
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
More information about the x2go-commits
mailing list