1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-23 17:34:17 +03:00

Merge remote-tracking branch 'origin/v2.1'

This commit is contained in:
Adolfo Gómez García 2017-03-31 08:08:31 +02:00
commit 3999507129
4 changed files with 20 additions and 9 deletions

View File

@ -8,7 +8,7 @@ import six
import os
__updated__ = '2017-02-21'
__updated__ = '2017-03-30'
TEMPLATE = '''[virt-viewer]
@ -62,7 +62,14 @@ class RemoteViewerFile(object):
def as_file(self):
return self.get()
def get(self):
@property
def as_file_ns(self):
return self.get(tls_port=-1)
def get(self, tls_port=None):
if tls_port is None:
tls_port = self.tls_port
fullscreen = '01'[self.fullscreen]
smartcard = '01'[self.smartcard]
delete_file = '01'[self.delete_file]
@ -82,6 +89,6 @@ class RemoteViewerFile(object):
usb_auto_share=usb_auto_share,
delete_file=delete_file,
host_subject=self.host_subject if self.tls_port != -1 else '',
ca=ca if self.tls_port != -1 else '',
secure_channel='secure-channels=main;inputs;cursor;playback;record;display;usbredir;smartcard' if self.tls_port != -1 else ''
ca=ca if tls_port != -1 else '',
secure_channel='secure-channels=main;inputs;cursor;playback;record;display;usbredir;smartcard' if tls_port != -1 else ''
)

View File

@ -21,6 +21,7 @@ if executable is None:
''')
theFile = '''{m.r.as_file_ns}'''
if {m.port} != -1: # @UndefinedVariable
forwardThread1, port = forward('{m.tunHost}', '{m.tunPort}', '{m.tunUser}', '{m.tunPass}', '{m.ip}', {m.port}) # @UndefinedVariable
@ -30,6 +31,7 @@ else:
port = -1
if {m.secure_port} != -1: # @UndefinedVariable
theFile = '''{m.r.as_file}'''
if port != -1:
forwardThread2, secure_port = forwardThread1.clone('{m.ip}', {m.secure_port}) # @UndefinedVariable
else:
@ -40,7 +42,7 @@ if {m.secure_port} != -1: # @UndefinedVariable
else:
secure_port = -1
theFile = '''{m.r.as_file}'''.format(
theFile = theFile.format(
secure_port=secure_port,
port=port
)

View File

@ -25,7 +25,7 @@ if not os.path.isfile(remoteViewer):
</p>
''')
theFile = '''{m.r.as_file_ns}'''
if {m.port} != -1: # @UndefinedVariable
forwardThread1, port = forward('{m.tunHost}', '{m.tunPort}', '{m.tunUser}', '{m.tunPass}', '{m.ip}', {m.port}) # @UndefinedVariable
@ -35,6 +35,7 @@ else:
port = -1
if {m.secure_port} != -1: # @UndefinedVariable
theFile = '''{m.r.as_file}'''
if port != -1:
forwardThread2, secure_port = forwardThread1.clone('{m.ip}', {m.secure_port}) # @UndefinedVariable
else:
@ -45,7 +46,7 @@ if {m.secure_port} != -1: # @UndefinedVariable
else:
secure_port = -1
theFile = '''{m.r.as_file}'''.format(
theFile = theFile.format(
secure_port=secure_port,
port=port
)

View File

@ -28,7 +28,7 @@ if executable is None:
<a href="http://virt-manager.org/download/">Open download page</a>
</p>
''')
theFile = '''{m.r.as_file_ns}'''
if {m.port} != -1: # @UndefinedVariable
forwardThread1, port = forward('{m.tunHost}', '{m.tunPort}', '{m.tunUser}', '{m.tunPass}', '{m.ip}', {m.port}) # @UndefinedVariable
@ -38,6 +38,7 @@ else:
port = -1
if {m.secure_port} != -1: # @UndefinedVariable
theFile = '''{m.r.as_file}'''
if port != -1:
forwardThread2, secure_port = forwardThread1.clone('{m.ip}', {m.secure_port}) # @UndefinedVariable
else:
@ -49,7 +50,7 @@ if {m.secure_port} != -1: # @UndefinedVariable
else:
secure_port = -1
theFile = '''{m.r.as_file}'''.format(
theFile = theFile.format(
secure_port=secure_port,
port=port
)