1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-01-08 21:18:00 +03:00

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

This commit is contained in:
Adolfo Gómez García 2017-05-18 12:39:42 +02:00
commit d8fa71c326
17 changed files with 88 additions and 7 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash
VERSION=`cat ../../VERSION`
VERSION=`cat ../../../VERSION`
RELEASE=1
# Debian based
dpkg-buildpackage -b

View File

@ -1 +1,2 @@
udsclient_2.1.0_all.deb admin optional
udsclient_2.1.0_amd64.buildinfo admin optional

View File

@ -33,10 +33,17 @@ from __future__ import unicode_literals
import logging
import os
import sys
import tempfile
if sys.platform.startswith('linux'):
from os.path import expanduser
logFile = expanduser('~/udsclient.log')
else:
logFile = os.path.join(tempfile.gettempdir(), b'udsclient.log')
logging.basicConfig(
filename=os.path.join(tempfile.gettempdir(), b'udsclient.log'),
filename=logFile,
filemode='a',
format='%(levelname)s %(asctime)s %(message)s',
level=logging.DEBUG

View File

@ -0,0 +1,10 @@
Steps:
1.- Copy the folder "udsclient" to /build/packages inside the thinstation build environment
2.- enter the chroot of thinstation
3.- go to the udsclient folder (/build/packages/udsclient)
4.- Execute "build.sh"
5.- Edit the file /build/build.conf, and add this line:
package udsclient
6.- Execute the build process
Ready!!!

View File

View File

@ -0,0 +1,2 @@
lib

View File

@ -0,0 +1,5 @@
#!/bin/bash
pip install paramiko requests six
rm -rf lib
mkdir -p lib/python2.7/site-packages
for a in requests paramiko pyasn1 cryptography packaging idna asn1crypto six enum ipaddress cffi ; do cp -r /usr/lib/python2.7/site-packages/$a* lib/python2.7/site-packages/; done

View File

@ -0,0 +1,3 @@
base
#add your own dependancies to this file, base should always be included.
python

View File

@ -0,0 +1,15 @@
In here you place the commands to start your application if using the scripts
/etc/thinstation.packages
or /etc/thinstation.console
see examples for for information
possible types are
example.global (this is always needed)
example.menu
example.console
example.window
example.fullscreen

View File

@ -0,0 +1 @@
CMD_FULLSCREEN="example -FULLSCREEN"

View File

@ -0,0 +1 @@
CMD_GLOBAL="example -startapp"

View File

@ -0,0 +1 @@
Place a 0 length file in here as the same name as the package if your application is a Console App

View File

@ -0,0 +1,34 @@
#! /bin/sh
. /etc/thinstation.global
# note you can replace this package with a symlink to /etc/thinstation.packages
# for GUI apps, or /etc/thinstation.console for console apps
# if you do then you will need to create a seperate initilization script for
# any other parameters which need to be started at bootup
case "$1" in
init)
if ! pkg_initialized $PACKAGE; then
# Your startup instructions go here
pkg_set_init_flag $PACKAGE
fi
;;
console)
;;
window)
;;
fullscreen)
;;
help)
echo "Usage: $0 init"
;;
*)
exit 1
;;
esac
exit 0

View File

@ -0,0 +1 @@
/etc/init.d/your_start_up_script

View File

@ -39,7 +39,7 @@ from . import openStack
import pickle
import logging
__updated__ = '2016-03-09'
__updated__ = '2017-05-17'
logger = logging.getLogger(__name__)
@ -235,7 +235,7 @@ class LiveDeployment(UserDeployment):
# If we want to check an state and machine does not exists (except in case that we whant to check this)
if openStack.statusIsLost(status):
return self.__error('Machine not available')
return self.__error('Machine not available. ({})'.format(status))
ret = State.RUNNING
@ -357,7 +357,7 @@ class LiveDeployment(UserDeployment):
status = self.service().getMachineState(self._vmid)
if openStack.statusIsLost(status):
raise Exception('Machine not found')
raise Exception('Machine not found. (Status {})'.format(status))
self.service().removeMachine(self._vmid)

View File

@ -42,7 +42,7 @@ from uds.core.ui import gui
import six
import logging
__updated__ = '2017-05-09'
__updated__ = '2017-05-16'
logger = logging.getLogger(__name__)
@ -323,7 +323,7 @@ class LiveService(Service):
'''
net = self.api.getServer(machineId)['addresses']
vals = six.next(six.itervalues(net))[0] # Returns "any" mac address of any interface. We just need only one interface info
return (vals['OS-EXT-IPS-MAC:mac_addr'], vals['addr'])
return (vals['OS-EXT-IPS-MAC:mac_addr'].upper(), vals['addr'])
def getBaseName(self):
'''