1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-10-07 15:33:51 +03:00

1088 Commits

Author SHA1 Message Date
Adolfo Gómez García
15a76f3b9b Small 2.0 fix 2017-04-07 10:47:57 +02:00
Adolfo Gómez García
a3110d4623 fixed tunneld cord access 2017-03-18 11:48:52 +01:00
Adolfo Gómez García
92c3fbd827 Update checkuuid timeout from 2 to 5 2016-10-14 10:58:41 +02:00
Adolfo Gómez García
ea49e18f80 Now in case of connection error on checkuuid, the result will be that the check is correcot 2016-10-14 06:51:10 +02:00
Adolfo Gómez García
393819bc94 backported fix from 2.1 2016-10-11 07:53:31 +02:00
Adolfo Gómez García
7ab956fa4a minor fixes 2016-10-10 07:37:41 +02:00
Adolfo Gómez García
17044d38bd Improvement on ready setting logged in counter to 0 2016-10-03 14:23:19 +02:00
Adolfo Gómez García
0dc461c30b Fixed setPropert 2016-10-03 13:42:24 +02:00
Adolfo Gómez García
ced5e06ff0 Added a counter posibility to login-logout 2016-09-19 16:14:54 +02:00
Adolfo Gómez García
5e848cbc8c Fixed defvalue from 4 to 3 for ovirt, so migrations works fine from 1.9 to 2.x 2016-09-11 23:02:57 +02:00
Adolfo Gómez García
f924604217 Backport for ovirt 4.0 2016-09-11 22:21:12 +02:00
Adolfo Gómez García
efc59c0124 fixed unresolved imports 2016-09-11 22:15:04 +02:00
Adolfo Gómez García
2eaa447155 Includede persistent machines check idle also. 2016-09-07 16:49:40 +02:00
Adolfo Gómez García
3528424892 Fixed meta gruoups edition 2016-08-25 13:21:16 +02:00
Adolfo Gómez García
2eef7222d5 Backported guacamole for 2.0 availability 2016-08-17 20:39:37 +02:00
Adolfo Gómez García
0d28a5b5f7 Backported guacamole for 2.0 availability 2016-08-17 20:38:56 +02:00
Adolfo Gómez García
e0e7e26234 Fixed Translations 2016-07-28 13:33:28 +02:00
Adolfo Gómez García
2674563535 Fixed template config removal on publication failure 2016-07-27 18:22:37 +02:00
Adolfo Gómez García
a864fbac96 Publication now will correctly fail if the template cannot be cloned 2016-07-27 17:33:45 +02:00
Adolfo Gómez García
51c32a4350 Fixed for OpenNebula 5 (seems to work fine with 4 & 5 right now) 2016-07-26 16:29:40 +02:00
Adolfo Gómez García
ec95f27ee6 Updated translations && added server-keyboard-layout to guacamole 2016-07-26 13:44:36 +02:00
Adolfo Gómez García
15ce5aa938 Added failsafe to html5 keyboard 2016-07-26 12:58:56 +02:00
Adolfo Gómez García
39b353fb24 More Fixes 2016-07-22 17:57:45 +02:00
Adolfo Gómez García
7a0c8aa977 More Fixes for OpenNebula 4.x (for new API implementation) 2016-07-22 17:40:03 +02:00
Adolfo Gómez García
664418d4dc More fixes for OpenNebula 2016-07-22 16:54:09 +02:00
Adolfo Gómez García
381cf47abf * Fixed RDP to allow some optional parameters on linux clients
* dixed OpenNebula support
2016-07-21 13:51:31 +02:00
Adolfo Gómez García
1578c92a88 Adding support for OpenNebula 5.0 2016-07-18 20:12:38 +02:00
Adolfo Gómez García
6827380e99 Added - to title for xfreerdp 2016-07-15 15:33:44 +02:00
Adolfo Gómez García
62f637790c Fixed changelog of publications not being displayed on dashboard 2016-07-12 11:33:50 +02:00
Adolfo Gómez García
bf5311b5af Added sessions cleanup to scheduled task list 2016-07-12 01:29:00 +02:00
Adolfo Gómez García
d0e0418ede Fixed check due 2.0 just works only with opennebula 4.x due to api
changes on 5.x. 2.1 will cover both vversions
2016-07-11 22:16:46 +02:00
Adolfo Gómez García
243cbbfd4b Fixed log removal for cache & assigned services admin tables 2016-07-11 22:04:58 +02:00
Adolfo Gómez García
e7984d5a8e Fixed javascript error 2016-07-11 14:14:10 +02:00
Adolfo Gómez García
eacce7adda fixed images on chrome 2016-07-11 13:44:27 +02:00
Adolfo Gómez García
622e8629ff Fixed image removal on service pool group 2016-07-11 12:43:22 +02:00
Adolfo Gómez García
50e368ee7a * Added owner to dbfile, so we can remove later them selectively
* Fixed samples
2016-07-10 20:56:32 +02:00
Adolfo Gómez García
6766fe41fe Signed-off-by: Adolfo Gómez García <dkmaster@dkmon.com> 2016-07-09 02:59:55 +02:00
Adolfo Gómez
ba35968e8d Forgotten comma 2016-07-07 14:22:35 +02:00
Adolfo Gómez García
4adfac1c02 added comments field to index view 2016-07-07 13:10:18 +02:00
Adolfo Gómez García
437865b278 * Fixed a bug on Services Pool Groups Images
* Fixed a couple bugs on OpenNebula"
2016-07-05 15:40:26 +02:00
Adolfo Gómez García
793b6c9004 Fixed RDP to allow freerdp from linux to select audio controller 2016-06-24 11:10:53 +02:00
Adolfo Gómez García
96bd117622 Comment fix 2016-06-15 00:58:33 +02:00
Adolfo Gómez García
8b2df76582 Small fix so HTML5 Transport remove leading/trailing whitespaces 2016-06-13 11:39:07 +02:00
Adolfo Gómez García
4196883bfb Fixed Timings on uds Actor
Fixed oVirt to allow USB Configuration on service (for spice). Defaults to not allow.
2016-06-04 20:02:34 +02:00
Adolfo Gómez García
8585d10623 Again, fixing deadline... 2016-06-02 09:57:43 +02:00
Adolfo Gómez García
c715b92ed0 fixed getDeadline 2016-06-01 11:12:12 +02:00
Adolfo Gómez García
a3726399f1 Fixed Calendars access restrictions 2016-05-31 12:04:53 +02:00
Adolfo Gómez García
8ce3efc7ee Fixed to allow 2.0 to work with 1.9 windows actor 2016-05-30 09:33:53 +02:00
Adolfo Gómez García
0bd3e1ac72 * Added alert icon for calender restricted services
* Fixed spice to add fullscreen support on transport definition & a bug
to allow using it.
* Fixed OS Detector to include "unknown" as an os on "all OSs"
2016-05-27 13:39:51 +02:00
Adolfo Gómez García
c2d4e995e7 Fixes & tests on UDS Actor for honoring max session duration (got from
calendars)
2016-05-24 07:40:53 +02:00
Adolfo Gómez García
1b71fef8b4 Fixed about to include build version && also upgraded it a bit 2016-05-20 13:34:53 +02:00
Adolfo Gómez García
074a4d525d Fixed up about dialog 2016-05-20 10:28:00 +02:00
Adolfo Gómez García
36e19574e0 Added version stamp 2016-05-20 09:50:53 +02:00
Adolfo Gómez García
ef9165b3a2 space :( 2016-05-20 09:39:19 +02:00
Adolfo Gómez García
14cddbb210 Forgot removing comments & try-catch block :) 2016-05-20 09:38:46 +02:00
Adolfo Gómez García
2d14884454 * Fixed time picker not working on chrome
* Added warn on service being replaced by new publication
2016-05-20 09:37:12 +02:00
Adolfo Gómez García
ba4eeffc77 * Fixed client to better show errors
* Adding new publication warn for currently logged in users
2016-05-19 13:50:52 +02:00
Adolfo Gómez García
59179b818e Added mechanics to recover in case of scheduler task that got stuck 2016-05-18 12:22:11 +02:00
Adolfo Gómez García
dbcdc84b3b * Now cleanUDS cleans up possible locks also.
This command is designed to be executed with UDS backend stopped, so be
care!! :)
* Added deadLine calculation to ServicePool based on access calendars
2016-05-18 10:31:43 +02:00
Adolfo Gómez García
c73dae361f Fixed headers replication on UDS Reports 2016-05-17 09:35:53 +02:00
Adolfo Gómez García
ec29371b41 Merge branch 'master' of github.com:dkmstr/openuds 2016-05-06 13:30:18 +02:00
Adolfo Gómez García
9365f5937b Advancend & sync 2016-05-06 13:30:06 +02:00
Adolfo Gómez García
971015d33a Advancend & sync 2016-05-06 13:29:29 +02:00
Adolfo Gómez García
7a742c043b Merge remote-tracking branch 'origin/v1.9' 2016-05-03 08:15:20 +02:00
Adolfo Gómez García
c08a0cb0ed Fixed a bug not allowing linux machines to register when using an case sensitive database0 2016-05-03 08:15:12 +02:00
Adolfo Gómez García
b5926dec6f Fixed a bug on free edition not allowing to register correctly linux machines 2016-05-03 08:14:14 +02:00
Adolfo Gómez García
2fdcdb014f Merge remote-tracking branch 'origin/v1.9' 2016-04-29 11:16:13 +02:00
Adolfo Gómez García
bd70a6290e fixed to work correctly on free 2016-04-29 11:15:07 +02:00
Adolfo Gómez García
3afa96f1c5 Fixed spice scripts 2016-04-28 12:50:30 +02:00
Adolfo Gómez García
5da12a8091 Fixed & Tested that now we can open multiple redirections over same
tunnel.
2016-04-28 12:49:23 +02:00
Adolfo Gómez García
08eeff5604 Fixed duplicate declaration 2016-04-28 10:55:34 +02:00
Adolfo Gómez García
169a946a03 Fixed small bug on return clone 2016-04-28 09:34:43 +02:00
Adolfo Gómez García
94842ce0ef A better implementation for shared connections 2016-04-28 09:34:03 +02:00
Adolfo Gómez García
0fb7d5ed1b * Fixed service pool group setup bug
* Fix to allow some kind of connections to (as spice), to open two
different tunnels (We have to test the fix)
2016-04-28 08:34:47 +02:00
Adolfo Gómez García
2021fd69ec *Merged fixes for UDS Client 2016-04-27 09:59:09 +02:00
Adolfo Gómez García
813764a100 Fixed UDS Client to allow host names with unicode characters 2016-04-27 09:43:08 +02:00
Adolfo Gómez García
cbd9330907 * Fixed Login with only one authenticator (not working before)
* Added cache flush on start for FileStorage to avoid problems
2016-04-27 06:59:34 +02:00
Adolfo Gómez García
a250cf4aef Fixed calendar access cache 2016-04-26 16:04:29 +02:00
Adolfo Gómez García
50bc3cd3ef Fixing up things 2016-04-26 15:13:54 +02:00
Adolfo Gómez García
4fb863cfa7 * Fixed several literals
* Added config type field for "choices"
* removed old version snippets
2016-04-25 12:39:58 +02:00
Adolfo Gómez García
3a1bd1eed3 Fixed query to obtain restraineds 2016-04-25 11:16:47 +02:00
Adolfo Gómez García
bce3e429cf Fixed ammend 2016-04-22 15:16:05 +02:00
Adolfo Gómez García
b5baea184f Merged 1.9 update for behind-proxy support 2016-04-22 15:12:28 +02:00
Adolfo Gómez García
42cbad4117 Merged 1.9 update for behind-proxy support 2016-04-22 15:04:36 +02:00
Adolfo Gómez García
09f329db62 Allow UDS behind a proxy 2016-04-22 15:03:06 +02:00
Adolfo Gómez García
6b5f9d266d Allow UDS behind a proxy 2016-04-22 14:59:34 +02:00
Adolfo Gómez García
242d9b5e6e Advancing with semantic 2016-04-22 07:05:04 +02:00
Adolfo Gómez García
99b17e573c adding semantic 2016-04-22 05:20:30 +02:00
Adolfo Gómez García
701edb91f1 adding semantic 2016-04-22 05:19:52 +02:00
Adolfo Gómez García
f0627db09f Removed legacy html templates.
Added select rendering to template so we can use whatever styles we like
2016-04-22 03:06:00 +02:00
Adolfo Gómez García
56a579e11b Fixed spanish translations 2016-04-21 10:40:36 +02:00
Adolfo Gómez García
4427448eca Updated translations & added proxy support for reverse auth, etc... 2016-04-20 15:25:41 +02:00
Adolfo Gómez García
203e2fcdd0 Added fast navigation to administration interface 2016-04-20 11:37:04 +02:00
Adolfo Gómez García
f7fa92e6c1 Added info to services 2016-04-19 11:17:34 +02:00
Adolfo Gómez García
425257a464 adding information to services, so we can figure whats going on from services list 2016-04-19 10:04:44 +02:00
Adolfo Gómez García
0acc07ebb3 Fixed log table 2016-04-19 05:11:34 +02:00
Adolfo Gómez García
030078a619 Added tabs to a bunch of forms on administration (forms are getting too
big right now)
2016-04-18 11:50:54 +02:00
Adolfo Gómez García
0e6ca4c188 Fixing translations 2016-04-18 07:09:03 +02:00
Adolfo Gómez García
c7d5a1c928 Updated translations 2016-04-18 07:01:51 +02:00
Adolfo Gómez García
e636a4afcd fixhed weblogout 2016-04-15 16:57:16 +02:00
Adolfo Gómez García
8b76324ffc Squashed migration from 1 to 16 (until v1.9). Will keep old migrations until 2.1 release 2016-04-14 14:17:20 +02:00
Adolfo Gómez García
8fe1e55770 Removed RGS migration from 2.0. You will need to at least upgrade to 1.7 before going to 2.0 2016-04-14 13:50:00 +02:00
Adolfo Gómez García
caae694628 Merge branch 'master' of github.com:dkmstr/openuds 2016-04-13 21:32:51 -07:00
Adolfo Gómez García
268e9d551a syntax fixes 2016-04-13 21:32:42 -07:00
Adolfo Gómez García
07137c2416 Several improvements to UDS Client connector 2016-04-14 06:01:41 +02:00
Adolfo Gómez García
273b2a59c4 fixed an error with edit list 2016-04-14 05:14:58 +02:00
Adolfo Gómez García
63364f4e72 added wait to forwarthread for rdp tunnel 2016-04-13 08:05:46 +02:00
Adolfo Gómez García
abc9622d53 Fixed 2.0 client bugs 2016-04-13 07:24:41 +02:00
Adolfo Gómez García
9cd7e2f67b Added a few adds to client & Updated required version for 2.0.0 server to 2.0.0 client 2016-04-12 11:22:29 +02:00
Adolfo Gómez García
9277d3b5fb ignoring binaries 2016-04-11 06:38:58 +02:00
Adolfo Gómez García
6f46e16be8 upgrade to use guacamole 0.9.9 2016-04-11 06:38:32 +02:00
Adolfo Gómez García
0b390e406a New generation of pam files for tunneler based on cmake 2016-04-08 09:44:19 +02:00
Adolfo Gómez García
f301e4654a Updating pam tunneler module 2016-04-08 07:45:52 +02:00
Adolfo Gómez García
62481899a1 fixed tunnel field order on admin interface 2016-04-07 10:28:23 +02:00
Adolfo Gómez García
869dfc8c06 * More translations update
* Added custom limits to providers that allow it
2016-04-07 07:16:15 +02:00
Adolfo Gómez García
939d456b9d Added memcached setting to sample file && minor fixes 2016-04-06 06:13:22 +02:00
Adolfo Gómez García
9c70fb3caf Added caching to FileStorage 2016-04-06 06:02:51 +02:00
Adolfo Gómez García
baf4a677dd Added shared files storage 2016-04-05 04:59:56 +02:00
Adolfo Gómez García
4c4820f166 Chaged a bit the default ssl behaviour 2016-04-04 19:30:23 +02:00
Adolfo Gómez García
2749bfc40c fixed an js translation 2016-04-04 18:33:54 +02:00
Adolfo Gómez García
704e0607eb * Fixed scheduler action to make these execute under a transaction
* Removed xmlrpc url
2016-04-04 18:27:38 +02:00
Adolfo Gómez García
401fbac63e Removed last remaining xmlrcp part 2016-04-04 11:00:51 +02:00
Adolfo Gómez García
7f1252a70a Updating translation & fixing translations errors 2016-04-04 09:42:51 +02:00
Adolfo Gómez García
2df103a348 fixed taglist template for production (javascript must be "nice" and cannot have comments on this templates) 2016-04-04 08:27:59 +02:00
Adolfo Gómez García
489bb44c92 Fixing up for 2.0 release 2016-04-04 07:24:30 +02:00
Adolfo Gómez García
c606b6f00e Fixing up for 2.0 release 2016-04-04 07:12:38 +02:00
Adolfo Gómez García
0b4b38abe7 Fixed model of Calandars && finished Scheduled calendar actions 2016-04-01 07:18:42 +02:00
Adolfo Gómez García
40b71fa983 Fixed to use new datatables 2016-03-31 10:47:59 +02:00
Adolfo Gómez García
6116db5147 basic scheduled actions working (needs backedn worker to be done) 2016-03-30 11:23:23 +02:00
Adolfo Gómez García
e979c6e1e2 Now we can create (but not edit) scheduled actions 2016-03-29 15:45:34 +02:00
Adolfo Gómez García
8f9d042cdd Now we can create (but not edit) scheduled actions 2016-03-29 15:42:41 +02:00
Adolfo Gómez García
fcf030e693 Advanfing on action editing for services pools 2016-03-29 05:30:05 +02:00
Adolfo Gómez García
31e6e01cad fixed deletion of service on validation error 2016-03-28 06:22:03 +02:00
Adolfo Gómez García
1aad0c85a4 Merge remote-tracking branch 'origin/v1.9' 2016-03-28 06:02:23 +02:00
Adolfo Gómez García
e6e16334b3 fixed deleting service on edition & not being valid 2016-03-28 06:02:04 +02:00
Adolfo Gómez García
6544a61f72 fixed deleting element on edition instead of new 2016-03-28 06:00:43 +02:00
Adolfo Gómez García
8a285fddfa Merge remote-tracking branch 'origin/v1.9' 2016-03-19 02:30:34 +01:00
Adolfo Gómez García
c069f51e8d Fixed UDS Version download for clients 2016-03-19 02:29:06 +01:00
Adolfo Gómez García
c9a690fe8c Removed nonsense public folder from templates 2016-03-18 02:01:17 +01:00
Adolfo Gómez García
847821c66c fixed core version 2016-03-18 01:49:29 +01:00
Adolfo Gómez García
b5387d4922 * Fixed Actions Calendars migrations
* Started support for actions calendars edition on dashboard
2016-03-16 11:30:56 +01:00
Adolfo Gómez García
b0a6807ea4 Merge remote-tracking branch 'origin/v1.9'
# Conflicts:
#	VERSION
#	actors/linux/build-packages.sh
#	actors/linux/debian/changelog
#	actors/linux/debian/files
#	client/linux/debian/changelog
#	client/linux/debian/files
2016-03-14 12:16:52 +01:00
Adolfo Gómez García
2e96074961 Upgrades for 2.0
* Added support for /uuid REST method
* Now the http server is relocated on IP Change detection
2016-03-14 12:12:56 +01:00
Adolfo Gómez García
f275a91a43 Adding retry capability to interactWithBroker 2016-03-14 09:52:41 +01:00
Adolfo Gómez García
135392d245 Added get next event from a given date to calendar 2016-03-10 11:46:22 +01:00
Adolfo Gómez García
ff622bb9cd * Added optimization for serialization/deserialization (now it get cached with db object)
* Fixed model so now we invoke initGui before getting values on fillInstanceFields
* Upgraded Max creating & Max removing limits so now they can be tied to an specific provider instead of a global variable
* Tested & Fixed OpenStack. Now it seems to work as it should do.
* Several minor fixes/improvements
2016-03-09 11:42:44 +01:00
Adolfo Gómez García
608c1317d7 Updated OpenStack client & added caching features
Added counters to Cache (maybe somtime will store them on db to keep track on performance
2016-03-08 12:36:42 +01:00
Adolfo Gómez García
9f4ef20dc1 OpenStack working (initially) 2016-03-07 18:28:32 +01:00
Adolfo Gómez García
73bd3cc28e several fixes & adaptions for 1.9.1 2016-03-06 17:24:42 +01:00
Adolfo Gómez García
ea9eb04461 minor version upgrade to contain all patches 2016-03-04 15:06:10 +01:00
Adolfo Gómez García
c45833c252 Advancing on openstack a bit more 2016-03-04 14:51:44 +01:00
Adolfo Gómez García
e260fc9790 Advancing toward Openstack provider at a nice pace.
We have decided finally to use directly the REST api instead of any
available API, because we need a fustfill of things only, and we have
this way a better control. (And it's not difficult to implement)
2016-03-04 13:33:36 +01:00
Adolfo Gómez García
cc6ba2ff41 Updated to start with identity api v3 instead of v2, and advanced a lot 2016-03-03 21:33:17 +01:00
Adolfo Gómez García
bec74ddc99 UDS Client for openstack 2016-03-03 19:35:19 +01:00
Adolfo Gómez García
7af7d11c8a * New Clients Versions
* Refactoring
* Minor fixes
2016-02-26 14:16:13 +01:00
Adolfo Gómez García
8934d978fe Almost finished calendars access 2016-02-23 11:23:49 +01:00
Adolfo Gómez García
8376e81532 Adding Access calendars admin 2016-02-23 09:44:40 +01:00
Adolfo Gómez García
6587d9ba2c Fixed downloads to point to 2.0 clients 2016-02-19 09:58:15 +01:00
Adolfo Gómez García
2654036fd2 fixed uds client to work correctly with firefox on kunbuntu 2016-02-19 09:46:22 +01:00
Adolfo Gómez García
f9226e7deb Fixed login fail messages for django 1.9 2016-02-19 08:37:22 +01:00
Adolfo Gómez García
56ac8aece9 Upgrade to Django 1.9 and advances on advances on states fixes (cosmetic fixes to better identify what we refer to) 2016-02-19 08:16:55 +01:00
Adolfo Gómez García
12737df530 Advancing on calendar access & scheduling 2016-02-18 11:03:38 +01:00
Adolfo Gómez García
7b9c835562 Advancing on calendar access & scheduling 2016-02-18 11:03:25 +01:00
Adolfo Gómez García
cbb809db77 * Improved cache for calendars checkings
* Added calentar access & actions models
* Started calendar-pool integration
2016-02-17 10:55:51 +01:00
Adolfo Gómez García
4f9085f0a2 Almost finished grouping services 2016-02-16 07:00:14 +01:00
Adolfo Gómez García
389cf62150 Experimenting & adavancing on services grouping 2016-02-15 11:04:21 +01:00
Adolfo Gómez García
44c367bf8f Addind public template for working on int 2016-02-15 02:34:46 +01:00
Adolfo Gómez García
efb0083161 removing dist from list 2016-02-15 01:38:02 +01:00
Adolfo Gómez García
16c1aba3e7 Added tags to search filter on admin, and also added "tabindex" to input fields 2016-02-12 10:58:57 +01:00
Adolfo Gómez García
07ed8b9762 Fixed Images & pools groups (added priority and enhaced visual on admin 2016-02-12 09:53:33 +01:00
Adolfo Gómez García
fbd0a59a70 Removed whitspaces from tags on addition 2016-02-12 04:52:23 +01:00
Adolfo Gómez García
a08fe53383 * Added "Service Pool Group" full logic, so new we can add services pools to groups, so we can visualzize them grouped. (already needs the visualizarion part)
* Finished basic taglist edition (fixed a bug & added the possibility of insert serveral comma separated values at once')
2016-02-12 04:47:44 +01:00
Adolfo Gómez García
e1b8c43cca Added "tag editing" admin control 2016-02-11 05:44:38 +01:00
Adolfo Gómez García
60f20e64f3 testing link on uds.css 2016-02-10 07:38:51 +01:00
Adolfo Gómez García
6bb1109fe1 Adding tags & tag edition to mayor elemets of uds administration (for filtering, etc..) 2016-02-10 03:53:51 +01:00
Adolfo Gómez García
134f2059dd Added tagging capability to most entities 2016-02-10 01:51:05 +01:00
Adolfo Gómez García
ec93e5c9cc Merge remote-tracking branch 'origin/v1.9' 2016-02-09 12:53:10 +01:00
Adolfo Gómez García
1487c21e1e Fixed .desktop to make it work from chrome 2016-02-09 12:51:30 +01:00
Adolfo Gómez García
fd6b0c9458 Another big step forward for OpenNebula provider 2016-02-09 09:45:36 +01:00
Adolfo Gómez García
c41648748a Fixed CoRD on mac with a domain 2016-02-08 09:33:56 +01:00
Adolfo Gómez García
de4aef3a5c * Important advances on OpenNebula service provider
* several semantic changes
* Minor improvements & fixes
2016-02-08 09:33:17 +01:00
Adolfo Gómez García
d024d74529 Merged 1.9 fixes 2016-02-01 17:55:42 +01:00
Adolfo Gómez García
6eb5a7ccc8 Fixed security check 2016-02-01 17:47:34 +01:00
Adolfo Gómez García
335fd338bd several fixes 2016-01-25 11:38:39 +01:00
Adolfo Gómez García
d7ac59f257 Merge remote-tracking branch 'origin/v1.9' 2016-01-20 10:05:29 +01:00
Adolfo Gómez García
1ff09a1a04 Added Header elements to UDSGeraldoReport to be added to "base" report 2016-01-20 10:04:09 +01:00
Adolfo Gómez García
ca54c2c099 Merge remote-tracking branch 'origin/v1.9' 2016-01-20 09:34:30 +01:00
Adolfo Gómez García
76d209aa25 New report by pool 2016-01-20 09:34:00 +01:00
Adolfo Gómez García
491a33421d csv test 2016-01-19 17:22:22 +01:00
Adolfo Gómez García
f1cbcf86e1 Adding report to see user access time/duration 2016-01-19 15:24:19 +01:00
Adolfo Gómez García
e2e0f96d3e Refactoring states for easier reading 2016-01-08 09:37:00 +01:00
Adolfo Gómez García
4be5d8d6e5 Added host verification to uds client (so urls are approved at least
first time by users)
2016-01-08 09:34:20 +01:00
Adolfo Gómez García
0365376ab0 Fixed not rebooting machine on join domain on windows XP 2015-11-26 08:06:15 +01:00
Adolfo Gómez García
b9929566f6 Merge remote-tracking branch 'origin/v1.9' 2015-11-25 17:18:13 +01:00
Adolfo Gómez García
f463f586a3 Added 'in use' to true to Phisical Machines as soon as they are assigned, so they kept the assignation forever 2015-11-25 17:14:02 +01:00
Adolfo Gómez García
f6492256a8 Merge remote-tracking branch 'origin/v1.9' 2015-11-19 11:49:21 +01:00
Adolfo Gómez García
6fe734f67e Fixed issues on windows32 for client on users that has disabled 8dot3names and has non ASCII characters on its user name 2015-11-19 11:17:37 +01:00
Adolfo Gómez García
66d2c63a20 Merge remote-tracking branch 'origin/v1.9' 2015-11-18 14:59:20 +01:00
Adolfo Gómez García
06f2faff35 Merge branch 'v1.9' of github.com:dkmstr/openuds into v1.9 2015-11-18 09:28:55 +01:00
Adolfo Gómez García
57bd5e8149 Instead of leaving a removed deployed service once it is removed in the list, we now erase it as soon as it removal process has finished 2015-11-18 09:28:42 +01:00
Adolfo Gómez
11b9d07aef fixed hidding in mac os x 2015-11-17 15:15:47 +01:00
Adolfo Gómez García
b6f582d84e Merger 1.9 fixes 2015-11-16 20:25:06 +01:00
Adolfo Gómez García
b777919f52 A few improvements 2015-11-16 20:22:58 +01:00
Adolfo Gómez García
6371a24d23 Fixed an small bug when checking service is in maintenance 2015-11-16 20:17:51 +01:00
Adolfo Gómez García
d94cc70eff Merge remote-tracking branch 'origin/v1.9' 2015-11-16 12:45:12 +01:00
Adolfo Gómez García
7d02f3682d Fixed so empty credentials are tested 2015-11-16 12:36:52 +01:00
Adolfo Gómez García
51fb42db10 Fixed so empty credentials are tested 2015-11-16 12:35:12 +01:00
Adolfo Gómez García
a352059ddc Added logging capability to client, in windows, take a look at https://github.com/paramiko/paramiko/issues/613 because some issues on windows 32 bits 2015-11-12 18:21:46 +01:00
Adolfo Gómez García
0187b94768 Made removal of user services more robust 2015-11-11 14:36:22 +01:00
Adolfo Gómez García
163245401b Merging 1.9 fixes 2015-11-11 12:15:41 +01:00
Adolfo Gómez García
7a0f28a227 Fixed so first service served from cache are fully usable instead of "waiting for os" 2015-11-11 12:10:30 +01:00
Adolfo Gómez García
0add4b4321 Fixed new service operations checker. Improved & easier to understand with this new model 2015-11-10 08:04:39 +01:00
Adolfo Gómez García
19fdcadbcd Upgrading the UserServiceOpChecker to a new & clearer one 2015-11-06 12:04:44 +01:00
Adolfo Gómez García
7b85adaddf Updated version for master 2015-11-06 05:57:26 +01:00
Adolfo Gómez García
d8a0a2f80a Merged 2015-11-06 04:58:06 +01:00
Adolfo Gómez García
8ec6ce7edb An small fix to tiketauth 2015-11-06 04:15:56 +01:00
Adolfo Gómez García
0eab8d0f3f Added a couple of fixes for ticket authentication 2015-11-06 04:08:10 +01:00
Adolfo Gómez García
ae9a9534fc Merge remote-tracking branch 'origin/v1.9', cookie retrieval 2015-11-06 03:50:44 +01:00
Adolfo Gómez García
b56dbcfdfd Replace an uds direct cookie access by "getUdsCookie" 2015-11-06 03:50:22 +01:00
Adolfo Gómez García
1c1003eb41 Added merged from v1.9 that did not goes as expected... :) 2015-11-05 10:34:16 +01:00
Adolfo Gómez García
4bc6d88006 fixing 2015-11-05 10:31:46 +01:00
Adolfo Gómez García
fe6c701e44 Added better transpor selection for tickets 2015-11-05 10:28:10 +01:00
Adolfo Gómez García
f08593881f Merge remote-tracking branch 'origin/v1.9' 2015-11-05 08:16:54 +01:00
Adolfo Gómez García
9a59725504 added .gitignore to ignore .mo files 2015-11-05 08:16:42 +01:00
Adolfo Gómez García
30cf167e5b Merge remote-tracking branch 'origin/v1.9' 2015-11-05 08:15:55 +01:00
Adolfo Gómez García
88b7b365e7 Removed translations binaries 2015-11-05 08:13:46 +01:00
Adolfo Gómez García
064d881c1e Checking up javascript stuff 2015-11-05 07:30:06 +01:00
Adolfo Gómez García
c3f9d673bd Merge remote-tracking branch 'origin/v1.9' 2015-11-05 07:28:43 +01:00
Adolfo Gómez García
bbc2790ce0 Fixed an issue with singue quotes on base template for translations 2015-11-05 07:25:42 +01:00
Adolfo Gómez García
64970b57ca fixed sitecustomize 2015-11-02 01:21:53 +01:00
Adolfo Gómez García
4695dcaa0c Merge remote-tracking branch 'origin/v1.9' 2015-11-02 00:47:08 +01:00
Adolfo Gómez García
2b11d1715b Fixed unicode on network names for VMWare linked clones 2015-11-02 00:45:33 +01:00
Adolfo Gómez García
e23f22d92d Several fixes for dashboard && new command to clean up cache 2015-10-29 06:57:02 +01:00
Adolfo Gómez García
c8492a4c47 Removed url encoding for connfig. Not a good idea :) 2015-10-27 03:31:06 +01:00
Adolfo Gómez García
962f1fcc1c Merge remote-tracking branch 'origin/v1.9' 2015-10-27 01:53:44 +01:00
Adolfo Gómez García
2d6f4e4f2d Fixed config management param to do urldecode of parameters 2015-10-27 01:53:10 +01:00
Adolfo Gómez García
6bc70ff4de Several minor fixes & aditions 2015-10-24 10:32:51 +02:00
Adolfo Gómez García
aaf4b539d5 Merge remote-tracking branch 'origin/v1.9' 2015-10-20 19:49:34 +02:00
Adolfo Gómez García
83efb81966 Fixed Windows domain 2015-10-20 19:42:14 +02:00
Adolfo Gómez García
03d0fc2ba4 Merge remote-tracking branch 'origin/v1.9' 2015-10-19 06:36:57 +02:00
Adolfo Gómez García
41f128c2ad Updating guacamole 2015-10-19 06:07:45 +02:00
Adolfo Gómez García
bb09ef2a69 Updating guacamole 2015-10-19 05:59:14 +02:00
Adolfo Gómez García
407b0ebf55 Merge remote-tracking branch 'origin/v1.9' 2015-10-16 16:59:14 +02:00
Adolfo Gómez García
98d78d9a2e Another consinstence fix in case of db connection failure 2015-10-16 16:58:53 +02:00
Adolfo Gómez García
033ac0d1f6 Seems to finished updating tables. Need to check new working 2015-10-16 08:30:33 +02:00
Adolfo Gómez García
c9e9f60ed1 * Added a more aggresive cache for types, tables & guis (Less requests to server)
* Fixed ServicePools tables
* Fixed log tables
2015-10-16 07:43:03 +02:00
Adolfo Gómez García
162c84e21c Merge remote-tracking branch 'origin/v1.9' 2015-10-15 19:25:57 +02:00
Adolfo Gómez García
9f6d126484 Added images to memory cache instead of db cache 2015-10-15 19:25:48 +02:00
Adolfo Gómez García
f1e27f1364 Fixed sample settings & database recovery on backend 2015-10-15 18:54:36 +02:00
Adolfo Gómez García
06c7a46d2a Fixed connection lost to mysql 2015-10-15 11:17:12 +02:00
Adolfo Gómez García
0877cc01f4 Almost fixed all tables on dashboard 2015-10-06 11:32:47 +02:00
Adolfo Gómez García
00e85357cf Dashboard upgrade & enhacements 2015-10-06 07:14:40 +02:00
Adolfo Gómez García
cc72b3742f Addind multiselects & overviews to dashboard 2015-10-06 05:39:16 +02:00
Adolfo Gómez García
dff20bd6e1 Added several indexes to optimize some db queries\nFixed too many connections due to not being closed on threads termination\nAdvanced on new dashboard 2015-10-05 13:17:54 +02:00
Adolfo Gómez García
69b6f7d7d8 Merge remote-tracking branch 'origin/v1.9' 2015-10-05 11:48:22 +02:00
Adolfo Gómez García
02a2800a4b Added "connection.close" after job is done, so we use a lot of less
concurrent db connections
2015-10-05 11:46:45 +02:00
Adolfo Gómez García
9881df5117 Clean white squared admin with collapsable menu 2015-10-02 01:08:21 +02:00
Adolfo Gómez García
bc2f83c937 Clean white squared admin with collapsable menu 2015-10-02 00:56:46 +02:00
Adolfo Gómez García
fa78b4b295 Clean white squared admin with collapsable menu 2015-10-02 00:55:58 +02:00
Adolfo Gómez García
95230292c3 Experimenting with dashboard 2015-10-01 07:23:26 +02:00
Adolfo Gómez García
fdaf974009 Advancing on styling. Adding new functionality to dashboard 2015-09-25 17:27:46 +02:00
Adolfo Gómez García
26764c4cab Fixing datatables integration 2015-09-25 04:55:07 +02:00
Adolfo Gómez García
52d0e8977c Styling dashboard 2015-09-24 07:33:52 +02:00
Adolfo Gómez García
1d7df7814c Merge remote-tracking branch 'origin/v1.9' 2015-09-23 17:50:13 +02:00
Adolfo Gómez García
1551fa8efa Updated client to work fine on windows 32 bits 2015-09-23 17:39:24 +02:00
Adolfo Gómez García
7e9a37e768 advancing & gui-element tables 2015-09-23 10:43:45 +02:00
Adolfo Gómez García
80bf6d77f1 Added "multiple deletions" feature 2015-09-23 03:31:26 +02:00
Adolfo Gómez García
2d7a2d6049 Advancing on new dashboard 2015-09-22 19:53:56 +02:00
Adolfo Gómez García
8363b41a68 Advancing on new dashboard look&feel 2015-09-22 09:46:28 +02:00
Adolfo Gómez García
9804678a30 Updating look&feel of admin dashboard 2015-09-22 04:13:15 +02:00
Adolfo Gómez García
1187c0aa5e * Added a template folder to work on admin design faster
* Updated Admin CSS (Testing new view)
* Minor fixes (typos)
2015-09-22 02:23:27 +02:00
Adolfo Gómez García
36adbe387c Bad resolve fixed 2015-09-22 01:04:32 +02:00
Adolfo Gómez García
df2dcf7acd Merge remote-tracking branch 'origin/v1.9'
# Conflicts:
#	server/src/uds/services/OVirt/OVirtProvider.py
#	server/src/uds/services/OVirt/client/oVirtClient.py

Conflicts resolved
2015-09-21 08:18:45 +02:00
Adolfo Gómez García
b64fa374d7 Updated ovirt engine so 3.5.4 works correctly with disk cloning (Bug has been fixed on oVirt) 2015-09-21 07:29:10 +02:00
Adolfo Gómez García
3fbb492921 Added summary when adding new calendar rule & merged migrations 2015-09-18 10:02:39 +02:00
Adolfo Gómez García
1b97e2015d More fixes to calendars 2015-09-18 08:06:07 +02:00
Adolfo Gómez García
3814986e41 Fixed calendar checking.\nUpdated CalendarRule model to allow different durations units 2015-09-18 00:47:21 +02:00
Adolfo Gómez García
037a4b523b Fixed calendar rules. Almost finished :-) 2015-09-17 06:53:35 +02:00
Adolfo Gómez García
522d493557 Advancing more on calendar rules edition 2015-09-15 10:43:26 +02:00
Adolfo Gómez García
2ac06f7345 Advancing more on calendar rules edition 2015-09-15 10:43:12 +02:00
Adolfo Gómez García
0745a7aa9a Advancing on rule editing 2015-09-13 04:43:59 +02:00
Adolfo Gómez García
7e419aed8d Updating components for 2.0 2015-09-13 03:30:48 +02:00
Adolfo Gómez García
baa9565140 Merge remote-tracking branch 'origin/v1.9' 2015-09-13 03:30:17 +02:00
Adolfo Gómez García
069dfb154a Updating components 2015-09-13 03:30:12 +02:00
Adolfo Gómez García
eea9db7a0d fixed incorrect position of datepickers 2015-09-13 03:29:38 +02:00
Adolfo Gómez García
485ed4d60b Merge remote-tracking branch 'origin/v1.9' 2015-09-12 22:11:13 +02:00
Adolfo Gómez García
44056dda3a Removed unused return 2015-09-12 22:09:47 +02:00
Adolfo Gómez García
4de3e83ade * Upgraded bootstrap-select
* Upgraded bootstrap-switch
2015-09-11 10:18:21 +02:00
Adolfo Gómez García
73713eac69 * Adding calendar (models, permissions, adm access, ....)
* Upgraded fontawesome
2015-09-11 01:39:01 +02:00
Adolfo Gómez García
6ed924655d Adding calendar/rules models 2015-09-09 10:01:48 +02:00
Adolfo Gómez García
7706262702 Merge remote-tracking branch 'origin/v1.9' 2015-09-08 19:46:31 +02:00
Adolfo Gómez García
d878d522d7 Fixed os manager edition on service pool 2015-09-08 19:27:19 +02:00
Adolfo Gómez García
e0843179cd Fixing up several minor lang issues 2015-09-07 21:40:12 +02:00
Adolfo Gómez García
c6683db6e6 Translations done 2015-09-04 11:59:36 +02:00
Adolfo Gómez García
063b062913 Added /sec:rdp to xfreerdp call 2015-08-31 17:49:25 +02:00
Adolfo Gómez García
3dd2521408 Removed "banner_timeout" parameter (not supported on old paramiko
versions, and not really needed)
2015-08-31 17:42:09 +02:00
Adolfo Gómez García
f8e61d475a Removed \n from VERSION 2015-08-09 09:41:25 +02:00
Adolfo Gómez García
e7cea4ff6e Fixing some VERSION dependant buildings to use a global file 2015-08-09 09:33:39 +02:00
Adolfo Gómez
33d37ec0c2 Added VERSION file 2015-08-09 09:25:35 +02:00
Adolfo Gómez García
512feaed81 Some minor inprovements to plugin 2015-08-09 09:21:42 +02:00
Adolfo Gómez García
93c6c1c20e Messages 2015-08-05 11:30:12 +02:00
Adolfo Gómez García
d2298f77b9 Some minor fixes 2015-08-03 02:27:20 +02:00
Adolfo Gómez García
6979d9bc17 Some improvements over REST api for actor 2015-07-14 12:47:03 +02:00
Adolfo Gómez García
d4135d527a Finished pools performance report 2015-07-07 19:39:44 +02:00
Adolfo Gómez García
91c678eb72 A couple of typos 2015-07-07 12:40:05 +02:00
Adolfo Gómez García
1ef2c7303f Updated Phisical machine to allow same ip on a service more than once
Fixed comment on UserServiceCleaner
Fixed edition of services without cache
2015-07-07 11:58:34 +02:00
Adolfo Gómez García
1b232d1113 Updating pools report 2015-07-07 03:40:34 +02:00
Adolfo Gómez García
78652b550b Started pool performace report 2015-07-02 11:40:44 +02:00
Adolfo Gómez García
95d0965503 Fixed services pools buttons 2015-07-02 11:40:06 +02:00
Adolfo Gómez García
d8f8815137 started new report & fixed init_cmd for mysql 5.6 2015-07-02 11:26:10 +02:00
Adolfo Gómez García
9bcf7076aa Fixed prefs 2015-06-22 14:47:30 +02:00
Adolfo Gómez García
ae71e2b4bd Latests update translations 2015-06-22 11:30:32 +02:00
Adolfo Gómez García
f8934acbe4 Added a couple csv reports 2015-06-21 21:51:36 +02:00
Adolfo Gómez García
abf6d3751b Fixed report & created "basic" report class 2015-06-21 12:21:59 +02:00
Adolfo Gómez García
b77fa7dfd6 Added changelog for publications to dashboard 2015-06-17 08:21:47 +02:00
Adolfo Gómez García
32a04edbf9 Added changelog at publish stage (needs to show it on admin) 2015-06-15 09:47:33 +02:00
Adolfo Gómez García
3ff281ffa3 * Started to add a "reason" for publication (an small changelog that
helps to keep track of reasonf for launching new publications)
* Removed non usable "Usage" report
2015-06-12 10:21:46 +02:00
Adolfo Gómez García
e07f1ae068 Updated uds __init__ & added several fixes 2015-06-09 16:32:26 +02:00
Adolfo Gómez García
119635862b Added "workaround" to oVirt 3.5 so publications can be made, but only on
the original machine storage (3.5 has a bug that does not allows to
relocate disks for templates using REST API).
2015-06-09 09:38:36 +02:00
Adolfo Gómez García
e553b904c5 Adding new tools libraries 2015-06-08 08:04:54 +02:00
Adolfo Gómez García
92db63d01d Added Basque to sample language list and fixed a literal on services 2015-06-05 13:01:30 +02:00
Adolfo Gómez García
3584ff189b Updated translations 2015-06-05 12:53:23 +02:00
Adolfo Gómez García
e8614cbf14 Added Basque lang support, but no translations are made (there is a collaborator company that will make it) 2015-06-05 10:23:33 +02:00
Adolfo Gómez García
399fc901fc Some minor fixes & aditions to "Storage"\nFixed EditList to correctly show tooltip 2015-06-02 22:13:55 +02:00
Adolfo Gómez García
524e234e6d Updated translations 2015-06-02 22:07:34 +02:00
Adolfo Gómez García
c14186fb4e Added hint on services about what kind of services they offers (VDI, VAPP, ..) 2015-05-29 09:21:36 +02:00
Adolfo Gómez García
eeea4a3f39 Added hint on services about what kind of services they offers (VDI, VAPP, ..) 2015-05-29 09:21:26 +02:00
Adolfo Gómez García
567f91414f Allows "respawn" of new services instead of existing one on service
launch
2015-05-27 09:51:30 +02:00
Adolfo Gómez García
e5710eb74c * Fixed log of "user logged in" and "user logged out"
* Small typo on debug log for windows os manager
* Added Headers to __init__ of windows os managers
2015-05-26 10:36:15 +02:00
Adolfo Gómez García
1733f142be * Several fixes to UDS Actor (minor ones)
* Minor adaptions to allow REST actor to connect with "tickets'
* Fix to TicketStore
2015-05-26 08:26:36 +02:00
Adolfo Gómez García
ccebca9748 Merge remote-tracking branch 'origin/v1.7' 2015-05-21 13:17:29 +02:00
Adolfo Gómez García
cb5d6ed771 small typo 2015-05-21 13:14:25 +02:00
Adolfo Gómez García
b9283c6778 Fixed ramdom password... {3} must be {2}!!! 2015-05-21 13:06:11 +02:00
Adolfo Gómez García
5dc2c16cbe Merge remote-tracking branch 'origin/v1.7' 2015-05-21 07:23:39 +02:00
Adolfo Gómez García
8d4f60b0fb Fixed a couple things for Linux random password 2015-05-21 07:23:18 +02:00
Adolfo Gómez García
b9175be480 A couple minor fixes for RDP transports 2015-05-18 10:02:29 +02:00
Adolfo Gómez García
884bbe7363 Updated translations 2015-05-17 22:17:51 +02:00
Adolfo Gómez García
98b9e6b659 more makeup 2015-05-17 21:35:31 +02:00
Adolfo Gómez García
1c4339f404 Adding some "beauty" icons 2015-05-15 10:41:19 +02:00
Adolfo Gómez García
0ffc9964d0 Merge remote-tracking branch 'origin/v1.7'
Conflicts:
	server/src/uds/REST/methods/providers.py
	server/src/uds/REST/methods/services.py
	server/src/uds/REST/methods/tickets.py
	server/src/uds/REST/model.py
	server/src/uds/web/views/service.py
2015-05-14 12:39:58 +02:00
Adolfo Gómez García
18c9406900 Several fixes... :) 2015-05-14 12:25:35 +02:00
Adolfo Gómez García
df498dd5bc Fixed several "case" uuids tests, so UDS can work with case sensitive
databases
2015-05-14 11:46:45 +02:00
Adolfo Gómez García
e7a3c7ebeb Removed transcomp (not user anymore) 2015-05-13 07:13:12 +02:00
Adolfo Gómez García
724aecd21c Updating translations 2015-05-13 07:12:55 +02:00
Adolfo Gómez García
b00a023f30 *Updated a new buch of icons
Changed reload method for main page
* Added cache support for some kinds of pages
2015-05-13 06:52:13 +02:00
Adolfo Gómez García
592510f0f3 * Added new "Global ID Generator"
* Added a single point for all unique generators (uds.core.util.unique)
2015-05-13 05:58:50 +02:00
Adolfo Gómez García
c96e566ebf * Updated a bunch of icons
* Changed modal of transport, now it says connections
* Removed old rdptransport from current version
* Fixed error view (was getting idError as string instead of integer)
* Started to add protocol dependency to services, so we can limit some kined of services to a protocol
2015-05-13 05:57:47 +02:00
Adolfo Gómez García
78526b3560 The index is now "static", so we reload it every minute for the user to
get the state of different services updated.
2015-05-10 07:33:12 +02:00
Adolfo Gómez García
04ec90ad61 * Transports associadted to Providers working correctly
* Spice transport added (EXPERIMENTAL version)
2015-05-10 07:19:57 +02:00
Adolfo Gómez García
e69914a9a5 Fixed os detection on request when no user agent is privided (defaults
to Unknown)
2015-05-10 06:40:23 +02:00
Adolfo Gómez García
c1c54f38cc Working on Spice protocol support.
* Added "provider specific" transport support
* Fixed dashboard to new transport support
2015-05-06 09:31:37 +02:00
Adolfo Gómez García
dad83c5c50 Merge remote-tracking branch 'origin/v1.7' 2015-05-06 05:47:23 +02:00
Adolfo Gómez García
b592e10126 After upgrade of python to 2.7.9, several HTTPS connections needed to be
fixed. This is about that
2015-05-06 05:36:03 +02:00
Adolfo Gómez García
a235e43c07 Fixed edition of ovirt service O.o 2015-05-06 04:27:14 +02:00
Adolfo Gómez García
eb7185b9e3 Fixed possition of base64 js. When using "compressor" on production, it was not working on prev place 2015-05-06 02:16:39 +02:00
Adolfo Gómez García
776702f971 Added own version to client REST request for required version 2015-05-06 01:53:21 +02:00
Adolfo Gómez García
6fb9b11f1b Fixing versions so they are shown on web interface 2015-05-05 08:17:59 +02:00
Adolfo Gómez García
d3e2ab85b8 Fixed building process of actor packages 2015-05-05 07:13:30 +02:00
Adolfo Gómez García
35a4dd659c Fixed building process of client packages 2015-05-05 07:08:57 +02:00
Adolfo Gómez García
e0d2abbbd6 fixing versions. Too much changes, we are going to give out it as 1.9.0 2015-05-05 07:01:09 +02:00
Adolfo Gómez García
5db3429b2c Added user access report
added ipython notebook notes (could be it helpfull?)
fixed datepicker locales loader (UDS one)
Several fixes for reporting
2015-05-05 06:49:31 +02:00
Adolfo Gómez García
dd0c605ff4 Added datepicker to complete "date" type gui field
Started login report
several minor fixes to adapt to reporting
2015-05-03 13:32:31 +02:00
Adolfo Gómez García
54d41c1931 * Added stat about accessing platform (OS, browser & browser version)
* Added bar informing about cookie usage by site
2015-05-03 03:58:50 +02:00
Adolfo Gómez García
9ee66cf6ed * Added "force" parameter to ticket request for ticket authenticated
access
* Added detection of browser to OSDetector, so now request always have
the current browser type/version
* Fixed decorator/template tag to use new request.os.Browser &
request.os.Version
2015-05-03 03:33:05 +02:00
Adolfo Gómez García
a34de035cb * Added creation date to user & group, so we can include "auto clean by age" mechanichs
* Added changelogs to Publications, so we can "store" if we like a text with every publication
* Added "ServiceNotReadyError" as method of controlling if a service is ready, instead of returning None
* Merged several migrations into one
* Updated message error so we include a "code" when service is not ready
* Added user getService to userServiceManager, that is where it must be
2015-04-30 13:03:32 +02:00
Adolfo Gómez García
1dac61ea69 Merge remote-tracking branch 'origin/v1.7' 2015-04-30 08:23:57 +02:00
Adolfo Gómez García
15c785d5fe Again, counter fix to 15 seconds (1 minuto seems too long for me right
now...)
2015-04-30 08:23:07 +02:00
Adolfo Gómez García
7c7c609ea8 fixex pydev for current version 2015-04-29 17:45:02 +02:00
Adolfo Gómez García
f8b34e1d23 Merge remote-tracking branch 'origin/v1.7' 2015-04-29 17:44:26 +02:00
Adolfo Gómez García
6295e7400d added virtualenv for pydev project for 1.7 2015-04-29 17:43:53 +02:00
Adolfo Gómez García
42a3df5c82 Merge remote-tracking branch 'origin/v1.7' 2015-04-29 17:19:55 +02:00
Adolfo Gómez García
54a2a0cb35 Added exception checking on service main loop for windows 2015-04-29 17:19:30 +02:00
Adolfo Gómez García
ec48f27792 Merge remote-tracking branch 'origin/v1.7' 2015-04-29 17:17:23 +02:00
Adolfo Gómez García
15554ab08f A couple of minor fixes 2015-04-29 17:17:06 +02:00
Adolfo Gómez García
c042ab6b31 * Updated following admin components:
- jquery
  - Filesaver
  - datatables
  
* Added full support for report generation, in dashboard & REST backend
2015-04-29 07:59:21 +02:00
Adolfo Gómez García
40641659a5 Started "definitive" reporting system for dashboard 2015-04-28 05:03:01 +02:00
Adolfo Gómez García
f7fbc5a0c4 Fixed systray icon of UDS and a couple of minor fixes 2015-04-27 22:13:34 +02:00
Adolfo Gómez García
4a6e21d1ec Upgraded UDS Actor systray icon. The "black" background was due i was saving images witg "transparent pixel color included" from gimp 2015-04-27 22:01:31 +02:00
Adolfo Gómez García
d6dcd265a4 * Tests on reports (will be added as REST methods, this is just tests..
:) )
* Small fix to REST udsactor (got VERSION from new part)
2015-04-27 20:40:06 +02:00
Adolfo Gómez García
8fe589fa75 Finished Ticket launching mechanics, used with some external plugins
(such as UMA's Moodles plugin for UDS)
2015-04-27 07:07:44 +02:00
Adolfo Gómez García
656f10a1ca Merge branch 'master' of github.com:dkmstr/openuds 2015-04-27 05:22:30 +02:00
Adolfo Gómez García
f39d780a88 Removed "util" ticket and adapted several 1.8 db model stuff (UnsavedForeignKey) 2015-04-27 05:17:25 +02:00
Adolfo Gómez
134e9c0b61 updated .gitignore for mac buildings 2015-04-26 06:41:20 -07:00
Adolfo Gómez García
f411eec5f4 towards 1.7.5 2015-04-26 03:27:06 +02:00
Adolfo Gómez García
a996562a5e Cleaning up thing for 1.7.5 2015-04-26 03:18:15 +02:00
Adolfo Gómez García
1ea3261b27 Restored autorun functionality 2015-04-24 17:32:15 +02:00
Adolfo Gómez García
a1bd7274f4 Advancing on basic reports 2015-04-24 04:19:43 +02:00
Adolfo Gómez García
3206390c9c Removing Java plugins related code 2015-04-23 07:08:08 +02:00
Adolfo Gómez García
4ed20850ae Added downloadables for clients 2015-04-23 07:07:14 +02:00
Adolfo Gómez García
ef302205bc some cleanups 2015-04-23 06:32:03 +02:00
Adolfo Gómez García
e651d3348d All existing transports are now ported to new model. Need to do more
tests, but conversion seems to be finished (or almost.. :) )
2015-04-22 06:39:09 +02:00
Adolfo Gómez García
cc3cce6038 Migrating from Java to New agent for NX 2015-04-21 19:13:15 +02:00
Adolfo Gómez García
5b3e5242d1 Merge remote-tracking branch 'origin/v1.7' 2015-04-21 12:29:32 +02:00
Adolfo Gómez García
60556ad4ec fixed RDP with user credentials 2015-04-21 12:29:10 +02:00
Adolfo Gómez García
8686741410 fixed build packages 2015-04-20 09:24:15 +02:00
Adolfo Gómez García
199e0d3559 Almost finished connector 2015-04-20 07:33:01 +02:00
Adolfo Gómez García
95b8969f5b * Fixed service ip checking access on access
* Added new "connection" REST method (Virginios request to make
"automated" connections with local clients)
2015-04-16 20:55:28 +02:00
Adolfo Gómez García
fc447e3ccf updated handlers.py from mainstream 2015-04-16 18:24:43 +02:00
Adolfo Gómez García
6b19e75ce7 Advancing on transports & client fixes 2015-04-14 08:33:10 +02:00
Adolfo Gómez García
c3316a4745 Fixed forwarding scheme so it works with all platforms... 2015-04-13 13:55:18 +02:00
Adolfo Gómez García
250441056b Initial version for linux packagers 2015-04-10 17:31:35 +02:00
Adolfo Gómez García
bdef8b2e8c * Simplified Transports after tests
* Added direct linux support for xfreerdp right now
2015-04-08 15:21:09 +02:00
Adolfo Gómez García
aef71ba48c Adding icons for windows and fixing up things 2015-04-07 18:17:21 +02:00
Adolfo Gómez
86e5b9fcaa added mac osx icons file 2015-04-07 03:34:53 -07:00
Adolfo Gómez García
8d01e77a94 advancing new transport system 2015-04-07 12:28:41 +02:00
Adolfo Gómez García
d34248b868 advancing new transport system 2015-04-07 12:28:31 +02:00
Adolfo Gómez
c15151a35d adding icons for macosx 2015-04-07 03:21:03 -07:00
Adolfo Gómez García
b5609a7b0c tunning up things 2015-04-07 12:02:45 +02:00
Adolfo Gómez García
4067de702c tunning uds client 2015-04-07 11:57:57 +02:00
Adolfo Gómez García
375f574e9e more fixes 2015-04-07 11:43:33 +02:00
Adolfo Gómez
ee59f45838 fixing up tunnel stuff 2015-04-07 02:41:59 -07:00
Adolfo Gómez
ae5fafae76 fixin up things on mac os x 2015-04-07 02:04:51 -07:00
Adolfo Gómez
dc1dd977fc Removed notes & added basic macosx info 2015-04-06 23:18:41 -07:00
Adolfo Gómez García
f8b95382b0 * Extracting script to "template" files for transports
* Fixes to UDS Client
2015-04-07 07:59:47 +02:00
Adolfo Gómez García
2f655dce16 Advancing on Mac OS RDP TRansport and a couple minor fixes to UDS Plugin 2015-04-02 09:36:46 +02:00
Adolfo Gómez García
c5138dbc9c First part seems to work fine on mac os x with Microsoft Remote Desktop 2015-04-01 09:44:41 +02:00
Adolfo Gómez García
8a17d5d017 More on mac 2015-04-01 09:36:52 +02:00
Adolfo Gómez García
089f62e6f8 More for mac related 2015-04-01 09:32:13 +02:00
Adolfo Gómez García
e4192e6064 Advancing on client for mac os x 2015-04-01 09:07:11 +02:00
Adolfo Gómez
646334ece5 test.rdp 2015-03-31 23:13:53 -07:00
Adolfo Gómez
2480a79450 adding more notes for mac os x 2015-03-31 23:13:25 -07:00
Adolfo Gómez García
f173146d8f * Implemented uds connector script for RDP (just for windows right now)
* Advanced a lot with java removal process
* Implemented usefull things on client part
2015-03-31 18:10:44 +02:00
Adolfo Gómez García
62f50304fe Advancing on uds client connector 2015-03-30 12:08:44 +02:00
Adolfo Gómez García
c70d94e866 Started client part 2015-03-30 08:11:29 +02:00
Adolfo Gómez García
dc006e7cbc using new method for client (more homogeneous) 2015-03-27 14:44:45 +01:00
Adolfo Gómez García
c5444f0df2 Almost done with web part of new model. Retired java checks from code & pages 2015-03-27 07:41:42 +01:00
Adolfo Gómez García
c7d3e4022f added bypass plugin detection to preferences 2015-03-26 17:31:40 +01:00
Adolfo Gómez García
151623e407 Advancing on web part of new no-java version of UDS 2015-03-26 14:24:03 +01:00
Adolfo Gómez García
67393e88db Merge remote-tracking branch 'origin/v1.7' 2015-03-25 10:10:54 +01:00
Adolfo Gómez García
2fe783e3ae Updated Filesaver && fixed exporting to excel 2015-03-25 10:10:34 +01:00
Adolfo Gómez García
d87f4de4ff Web part of new uds plugin almost done 2015-03-24 12:05:40 +01:00
Adolfo Gómez García
b69f56ecb8 Fixed servicepool deletion on image deletion 2015-03-24 11:22:28 +01:00
Adolfo Gómez García
b08fd3d60e Merge remote-tracking branch 'origin/v1.7' 2015-03-24 10:42:08 +01:00
Adolfo Gómez García
7d26463639 updated translations 2015-03-24 10:41:52 +01:00
Adolfo Gómez García
4d9d4bdbee Merge remote-tracking branch 'origin/v1.7' 2015-03-24 09:43:23 +01:00
Adolfo Gómez García
523ca37ee8 typo 2015-03-24 09:42:54 +01:00
Adolfo Gómez García
65c7b34ee0 Started client plugin 2015-03-24 08:05:51 +01:00
Adolfo Gómez García
2303861650 Advancing a bit more towards new uds transport model 2015-03-23 20:06:03 +01:00
Adolfo Gómez García
38b7ac892e Merge remote-tracking branch 'origin/v1.7' 2015-03-23 12:24:42 +01:00
Adolfo Gómez García
cfad948660 Added multiple monitor support for windows clients & servers 2015-03-23 12:22:45 +01:00
Adolfo Gómez García
ccf35fcd49 Advancing on uds client 2015-03-23 12:08:39 +01:00
Adolfo Gómez García
d6e031e9e6 Creating new ticketing model, based on an independent table 2015-03-23 02:27:56 +01:00
Adolfo Gómez García
7b29d698dc Merge remote-tracking branch 'origin/v1.7' 2015-03-23 02:23:56 +01:00
Adolfo Gómez García
989600e639 Fixed uuid model case 2015-03-23 02:22:54 +01:00
Adolfo Gómez García
9fa4bacc74 fixed case of uuids to lower 2015-03-23 02:22:17 +01:00
Adolfo Gómez García
e02b3ad881 Merge remote-tracking branch 'origin/v1.7' 2015-03-20 15:16:15 +01:00
Adolfo Gómez García
cc4619220a * Added a "preinit" to xscreensaver, to give some more oportunities on
linux to initialize this correctly.
* Fixed typos on dashboard
* Fixed not saving correctly textarea fields of configuration
2015-03-20 15:15:35 +01:00
Adolfo Gómez García
c71d86825c Added download page for new uds plugin 2015-03-20 13:30:52 +01:00
Adolfo Gómez García
7648e9c655 Added a reset to initIdleDuration 2015-03-18 15:30:13 +01:00
Adolfo Gómez García
bb8931e7d4 Merge remote-tracking branch 'origin/v1.7' 2015-03-18 11:08:06 +01:00
Adolfo Gómez García
695a67c2cb Fixed so image deletion does not deletes it associated deployed service 2015-03-18 11:07:26 +01:00
Adolfo Gómez García
011ba37d2a Several minor fixes and protocol detection seems to work 2015-03-17 12:34:32 +01:00
Adolfo Gómez García
d73c8f49cc Several minor fixes and protocol detection seems to work 2015-03-17 12:34:19 +01:00
Adolfo Gómez García
3ddf2f91ad converted sample from utf16 to utf8 2015-03-16 14:42:43 +01:00
Adolfo Gómez García
809aea2c87 UDS Client project 2015-03-16 14:40:19 +01:00
Adolfo Gómez García
4e2fce147f linux notes 2015-03-16 14:39:13 +01:00
Adolfo Gómez García
26e01af696 linux notes 2015-03-16 14:38:48 +01:00
Adolfo Gómez García
cb9359f9af Fixed checking permissions on custom methods of publications 2015-03-16 11:28:53 +01:00
Adolfo Gómez García
bad482b7f1 Test for windows schema registering 2015-03-15 11:34:13 +01:00
Adolfo Gómez García
a94f7b335b Merge branch 'master' of github.com:dkmstr/openuds 2015-03-15 11:32:46 +01:00
Admin
41b86509e0 testing building on mac os x 2015-03-15 02:35:57 -07:00
Adolfo Gómez García
27224fa8a1 Starting to work on reporting 2015-03-10 09:25:18 +01:00
Adolfo Gómez García
9656aab27d Merge remote-tracking branch 'origin/v1.7' 2015-03-09 16:53:46 +01:00
Adolfo Gómez García
cbf68030d3 Removed debug from oVirt 2015-03-09 16:51:56 +01:00
Adolfo Gómez García
3e97481af2 fixed permissions tests 2015-03-09 16:08:16 +01:00
Adolfo Gómez García
705c3d7b76 Merge remote-tracking branch 'origin/v1.7' 2015-03-09 15:54:37 +01:00
Adolfo Gómez García
2470e88d55 added .pyo to ignore list 2015-03-09 15:51:47 +01:00
Adolfo Gómez García
f300770b29 Merge remote-tracking branch 'origin/v1.7' 2015-03-09 08:29:45 +01:00
Adolfo Gómez García
63278938c8 fixed translations 2015-03-09 08:29:18 +01:00
Adolfo Gómez García
5623c65763 Template 2015-03-06 09:52:48 +01:00
Adolfo Gómez García
5dca92ca5e * Added new "main dashboard" template for non admin (staff) users 2015-03-06 09:52:07 +01:00
Adolfo Gómez García
c1fd898d62 Some retouch on permissions delegation... seems nice right now :) 2015-03-05 19:10:46 +01:00
Adolfo Gómez García
2435f589b9 Needs more testing, but permission delegation seems to work right now. 2015-03-05 15:20:46 +01:00
Adolfo Gómez García
6387629e7e Almos finished permissions gui 2015-03-04 12:07:22 +01:00
Adolfo Gómez García
5bde71b117 Advancing on permissions 2015-03-03 16:58:49 +01:00
Adolfo Gómez García
b2eb7cc9c1 Advancing on permissions 2015-03-03 16:58:32 +01:00
Adolfo Gómez García
48df4390bd Started dashboard permissions edit 2015-03-02 17:02:02 +01:00
Adolfo Gómez García
9920af9c59 Adding permissions managing to objects 2015-03-02 11:51:20 +01:00
Adolfo Gómez García
681b1333d1 Advancing thought permissions delegation 2015-03-02 08:30:45 +01:00
Adolfo Gómez García
67b8955189 Started permission delegation 2015-03-01 22:04:52 +01:00
Adolfo Gómez García
d542503f55 * Adapting to new "near" auth groups 2015-02-28 12:00:57 +01:00
Adolfo Gómez García
be5ed5a70b Merge remote-tracking branch 'origin/v1.7' 2015-02-28 09:46:33 +01:00
Adolfo Gómez García
f751fff8ca Fixed using 169.254/16 as a valid IP for notifying to broker 2015-02-28 09:45:12 +01:00
Adolfo Gómez García
2d942fbac7 More minor fixes 2015-02-27 17:32:24 +01:00
Adolfo Gómez García
4bb4987937 minor fix related to grace time 2015-02-27 17:24:57 +01:00
Adolfo Gómez García
d371e3f7ac Fixed some posible "logging out too early" to users when using idle
checker
2015-02-27 17:23:26 +01:00
Adolfo Gómez García
033fb6eff2 * Fix to StatsManager so numeric fields can also be used
* Added remaining related cache elements on cache_hit & cache_miss
* pep fix to WidowsOsManger
* Reduced size of Dashboard sidebar
* Removed "AM/PM" from datetimes
2015-02-27 17:05:06 +01:00
Adolfo Gómez García
23819b77ee * Added cache hit/miss logging events 2015-02-27 09:28:04 +01:00
Adolfo Gómez García
fbcc2210b3 minor fix 2015-02-26 15:16:49 +01:00
Adolfo Gómez García
45b2e61631 * Added some debug logging to actor 2015-02-26 10:39:18 +01:00
Adolfo Gómez García
4fceb8609f Fixed log of pub manager\nModified default config of tunneler\nUpdated actor REST api to not allow less than 30 seconds of "max idle" configuration 2015-02-25 17:05:39 +01:00
Adolfo Gómez García
26c6b559a5 * Minor tuning 2015-02-25 11:15:08 +01:00
Adolfo Gómez García
90e34029f3 Fixing up rdp transport (tunneled) 2015-02-25 10:28:18 +01:00
Adolfo Gómez García
6895f602ab Just updated guacamole pom to use 0.9.4 2015-02-23 13:26:34 +01:00
Adolfo Gómez García
b1b8b613e6 Updated translations 2015-02-23 10:16:44 +01:00
Adolfo Gómez García
40ba837f70 Added logging of what caused the exception 2015-02-23 08:35:26 +01:00
Adolfo Gómez García
c075ae5a9c * Updated notification so, by default, is broker which "deduces" the
client IP and not the client who notifies it (this is left just for
"trusted" environments)
2015-02-22 09:31:56 +01:00
Adolfo Gómez García
8de49e5e94 * Removed "Trusted only" from manifest 2015-02-22 09:17:06 +01:00
Adolfo Gómez García
7887b7f3cc Fixed Linux applet to "show" wallpapers if required 2015-02-20 15:27:16 +01:00
Adolfo Gómez García
c81f162b90 Fixed "print" to "logger.debug" 2015-02-20 11:31:06 +01:00
Adolfo Gómez García
35a5a78220 updated requirements 2015-02-20 09:30:19 +01:00
Adolfo Gómez García
2bc0f64e34 Set a default ip for connection source on service connection request
(equals to request "deducted" ip...).
2015-02-18 14:45:08 +01:00
Adolfo Gómez García
19cb475e2d * Updated bootstrap switch to latest (and working) version
* Fixed displaying state "twice" in authenticators groups due to a
"developing" data left behind...
2015-02-17 23:46:56 +01:00
Adolfo Gómez García
ae4fc2d51a Removed log from user space actor for user login.. (Filtered out) 2015-02-17 22:18:01 +01:00
Adolfo Gómez García
06e886a366 * Fixed HTML5RDP to work correctly with new actor
* Fixed base transport to receive an "user" and not an "username"
2015-02-17 11:45:30 +01:00
Adolfo Gómez García
1497314a46 Fixing up windows service behavior 2015-02-17 09:51:51 +01:00
Adolfo Gómez García
e6998cb1f3 Added posibility to modify several OS Manager fields even if it is being used 2015-02-16 18:31:16 +01:00
Adolfo Gómez García
111782dffd removing binaries 2015-02-16 17:54:30 +01:00
Adolfo Gómez García
a86fbf83e8 removing binaries 2015-02-16 17:53:27 +01:00
Adolfo Gómez García
c9f6c17407 Fixed state notification when os manager is working 2015-02-16 15:58:38 +01:00
Adolfo Gómez García
c04037a4ea Fixed actor return error on DC not reachable 2015-02-16 14:58:27 +01:00
Adolfo Gómez García
d1adcebe4b Added "info" to mac users
Restored overview info to match item info
2015-02-11 11:22:56 +01:00
Adolfo Gómez García
3e5cbda861 Testing up manifest changes for signed applets on mac 2015-02-11 09:49:31 +01:00
Adolfo Gómez García
8a393c6717 Added "is in maintenance" method for userservice 2015-02-10 17:44:41 +01:00
Adolfo Gómez García
f235bc0796 If service is in maintenance, denies now new accesses (index page may be
outdated)
2015-02-10 17:26:27 +01:00
Adolfo Gómez García
2549510eaa * Fixed several "last hour" REST requests related to tickets
* Added OS Detector so if os is not detected before, tries it at request
moment
* Added a new error so services in maintenance mode are notified
2015-02-10 17:24:27 +01:00
Adolfo Gómez García
3fbcee60cb small fix 2015-02-10 10:29:01 +01:00
Adolfo Gómez García
20cc73dca8 * Added Manifest small fixes for applets
* Updated translations
* Added several "methods" support for sqlite3 db backend (on __init__ of
uds) such as max, min & ceil (needed for stats)
2015-02-10 09:54:45 +01:00
Adolfo Gómez García
375fe6551c Some minor cosmetic fixes to scheduler runner 2015-02-03 18:26:25 +01:00
Adolfo Gómez García
f74524d947 * Fixed HTML5 RDP
* Updated translations
* Fixed Scheduler to ensure that when started up, all "owned" tasks are
released
2015-02-03 18:19:21 +01:00
Adolfo Gómez García
e1f26d2157 * Fixed "double cancel" of a publication (cancelling over an already
cancelling publication will "force" the cancellation, meaning that no
check is done, it simply stops publication and mark it as "cancelled"
(leaving a log on service pool, ofc)
2015-02-03 06:30:27 +01:00
Adolfo Gómez García
7d44bd7b65 Some more minor fixes to literals & translations 2015-02-02 11:43:56 +01:00
Adolfo Gómez García
ab5f51a3b1 * Fixed several bad formed literal strings
* Updated translations
2015-02-02 11:31:59 +01:00
Adolfo Gómez García
d1e2e98099 Fixed rpm actors download path 2015-02-02 07:13:17 +01:00
Adolfo Gómez García
f94bbaad67 Fixed mime types por rpm actors packages 2015-02-01 06:18:37 +01:00
Adolfo Gómez García
7143682062 * Fixed cancelation of a publication on dashboard
* Now allows "forced cancel" after a cancel is requested
2015-02-01 06:17:11 +01:00
Adolfo Gómez García
17a087ed4a * Removed binaries for NX from git (we have source code..)
* Fixed downloadable list for administrators with actors
2015-02-01 05:53:54 +01:00
Adolfo Gómez García
762138ca57 Fixed so new publications are not allowed while a provider is in
maintenance mode
2015-02-01 05:41:24 +01:00
Adolfo Gómez García
1fb46003fc Several minor actor fixed to manage some workarounds in a better way 2015-02-01 04:07:46 +01:00
Adolfo Gómez García
e1bbbece43 * Added minimun values for Service Pool form numeric fields
* Added support for key "minValue" for numeric ui fields
* Fixed cache updater to take into account those services pools that has
initial or l1 cache to 0
* Fixed old (legacy) uds actor logging
* Fixed index view for pools that do not have assigned services
*
2015-01-31 11:14:24 +01:00
Adolfo Gómez García
e3e652d4e1 Fixed cache updater, so now we can select "0 elements" for cache,
initials, etc..
2015-01-31 10:18:12 +01:00
Adolfo Gómez García
b8a1fc31f3 Adding colours to failed services 2015-01-28 09:15:08 +01:00
Adolfo Gómez García
d5034c9971 * Restored "missing" services that where in maintenance mode. Now they
got displayed but with some transparency & can't be clicked
* Added "slightly" blue color & tooptip to indicate that a service is
currently with an opened session
2015-01-28 08:16:48 +01:00
Adolfo Gómez García
215c8f8f3e Split views across several source files to easier "maintenance" 2015-01-28 06:30:57 +01:00
Adolfo Gómez García
b2bf4bd0db * Added some more docstrings
* Fixed how logs of user login/logout on services are done
2015-01-27 07:03:38 +01:00
Adolfo Gómez García
1d2c4c8282 Fixed requests version detection
Fixed warnings so they are no more logged to console (for urllib3
mainly)
2015-01-27 07:02:24 +01:00
Adolfo Gómez García
70fc09b21a * Added service known IP to services list
* Optimized service retrieval for dashboard
* Added group regex expressions
* Added pool in maintenance mode for pools list
* Upgraded visibility of "warned" pools (couoling them)
* Improved base service list on new pool (added provider in front of
service)
2015-01-26 09:30:25 +01:00
Adolfo Gómez García
9a529b8f5b Added experimental support for pattern in group names (using pat:... as group name) 2015-01-23 08:54:52 +01:00
Adolfo Gómez García
4a2401b622 Added fld4 to stats events. Added validators to providers 2015-01-22 11:47:01 +01:00
Adolfo Gómez García
3feb502fec Started to use events stats system 2015-01-22 03:32:26 +01:00
Adolfo Gómez García
e75c86ad58 Stabilizing for 1.7
* Fixed several IDE "false errors"
* Added several needed comments
* Added logging to base os manager to login/logout process
* Fixed Linux & Windows managers to allow use of new base os manager
feature
* Fixed coffe script error that do not allows to create e new service
2015-01-21 13:30:37 +01:00
Adolfo Gómez García
9a95d39156 * added admin dashboard link for administrator to "old" interface 2015-01-21 10:14:38 +01:00
Adolfo Gómez García
cc48b50dcb Minor code fixes & updates 2015-01-21 08:36:35 +01:00
Adolfo Gómez García
32b1ac71a9 Log fixing 2015-01-21 08:20:53 +01:00
Adolfo Gómez García
bd98349dc4 Added missing resolutions to select in preferences screen 2015-01-15 18:14:07 +01:00
Adolfo Gómez García
cf6602033d Fixed LDAP authenticators so they scape "inputs" from unknown source
(basically the username).
2015-01-15 18:11:37 +01:00
Adolfo Gómez García
2959a878af Fixed navbar to not allow "root" user to access preferences (root user
will never own services)
2015-01-15 09:24:58 +01:00
Adolfo Gómez García
ea087fce53 fixed upload directory permissions on sample settings 2015-01-14 19:55:38 +01:00
Adolfo Gómez García
9335c73003 Added config initialization on config command 2015-01-14 19:35:59 +01:00
Adolfo Gómez García
e11867a55e Added config initialization on config command 2015-01-14 19:21:01 +01:00
Adolfo Gómez García
c72a8d3950 * Added new resolutions to RDP
* Added logging of generated password to service log
* Small "pepe" corrections
2015-01-13 14:50:49 +01:00
Adolfo Gómez García
ddd8df3b26 small fix 2015-01-13 05:48:59 +01:00
Adolfo Gómez García
c491dc78ab Added TODO.txt to not forget what is next :) & updated (again) translations 2015-01-13 05:37:53 +01:00
Adolfo Gómez García
fd4fe245c6 Added CoRD custom build & update download link for Mac 2015-01-13 05:06:22 +01:00
Adolfo Gómez García
cbd8a17cc4 Updated translations 2015-01-13 04:58:53 +01:00
Adolfo Gómez García
9356fc3559 Advanced on events stats 2014-12-21 12:56:21 +01:00
Adolfo Gómez García
243e627827 Added "Maintenance mode" to providers (by Seville University request..
thanks for the advice ;-) ), that marks a provider as "on Maintenance
Mode". In this mode, every operation depending on this provider will be
"paused", and deployed services will be "hidden" from users...
2014-12-20 16:47:19 +01:00
Adolfo Gómez García
bb408a31a2 Fixed OS Managers & New Services presentation 2014-12-17 21:45:48 +01:00
Adolfo Gómez García
3035360ce7 * Changed "tiled" list of services for a... better one??
* Added a switch to the service pool so we can disable the show of
alternative transports (so only main is available...)
2014-12-12 00:43:36 +01:00
Adolfo Gómez García
cdaf5a17fa * Upgraded Java Detection js
* Added generic icon of UDS
2014-12-11 16:21:20 +01:00
Adolfo Gómez García
f97e02e867 Changed "key" generation on actor to use a random 48 chars strings
instead of an uuid
2014-12-10 12:08:13 +01:00
Adolfo Gómez García
101aa6fc39 Fixed tipo "eror" :) 2014-12-09 17:30:18 +01:00
Adolfo Gómez García
8e7a6af3ad Removed old actors 2014-12-09 17:17:36 +01:00
Adolfo Gómez García
22bf17f080 fixed Windows Actor onLogout 2014-12-09 17:15:52 +01:00
Adolfo Gómez García
35b27acee3 Fixed OS Managers to work "nice" with new Actors (and olders) 2014-12-09 15:50:35 +01:00
Adolfo Gómez García
722c8b2b61 * Set logging to INFO by default
* Added messages to Actor User Space
2014-12-09 12:03:50 +01:00
Adolfo Gómez García
bc6d500898 Removed "debug" line" 2014-12-08 13:19:18 +01:00
Adolfo Gómez García
c9ec31f258 * Added a "delay" before starting using IPC, so secondary thread is
ensured to be running

Tests seems to work perfectly now.. Have to be tested intensibely in all
platforms, but seems to be almost finished (actor).
2014-12-08 13:11:07 +01:00
Adolfo Gómez García
e9f38b044f Now correctly adds user to Remote Desktop Group before connection, so
access is granted for user (Note: user must exist in machine/domain)
2014-12-08 12:54:25 +01:00
Adolfo Gómez García
06a00d00b9 Moved several transports to newer "form storage" model, much more simple
than "hand made" marshalling/unmarshallig (Note: Nx has been keeped
using "old" method because it will be not be updated anymore, we are
moving to use x2go instead in future releas)
2014-12-08 12:14:36 +01:00
Adolfo Gómez García
7c916397e4 Fixing up a bit transports 2014-12-08 08:55:23 +01:00
Adolfo Gómez García
903664b7c5 * Removed send script from OS Manager (it's a nonsense, after a few
tests..)
* Some typos fixes
2014-12-07 21:35:13 +01:00
Adolfo Gómez García
bda104d94e Added "pre connect" & "post connect" messages 2014-12-07 21:33:53 +01:00
Adolfo Gómez García
e8b16a7e9d Updated Script Executor thread 2014-12-05 10:54:23 +01:00
Adolfo Gómez García
c7d3984289 Adding "Add User To Remote Desktop Group" as option to Windows OS
Manager
2014-12-05 10:53:00 +01:00
Adolfo Gómez García
038e37fe39 Fixing up thing 2014-12-04 13:12:01 +01:00
Adolfo Gómez García
ce2250bb2c Forgot to fix LinuxOsManagers :) 2014-12-04 13:11:26 +01:00
Adolfo Gómez García
c32222ec8a Merge branch 'master' of github.com:dkmstr/openuds 2014-12-04 13:07:19 +01:00
Adolfo Gómez García
9a86682c9d Adding support for pre-access scripts so UDS can support certain
operations (i.e. add an user to an specific group, or allowing user to
access using specific protocol, thanks to José Luis Sepúlveda from upv
for the feedback ;-)
2014-12-04 13:03:58 +01:00
Adolfo Gómez García
2159e0f29d Added support for OpenSuse also (and created a build script)
Fixed up & tuning of actor
2014-12-04 12:49:40 +01:00
Adolfo Gómez García
3057f454dd Added support for OpenSuse also (and created a build script)
Fixed up & tuning of actor
2014-12-04 12:46:51 +01:00
Adolfo Gómez García
42e8213442 Tuning a bit more actors 2014-12-02 22:07:14 +01:00
Adolfo Gómez García
29aa6be5dc Tuning up User Space Tools 2014-12-02 21:42:14 +01:00
Adolfo Gómez García
8cf6815e8e * Added comm url as property
* Moved values from storage() to properties table
* Added support for idle times to Windows & Linux OS Managers
* Fixed configurations objects, so if get() is invoked before DB is
accesible, returns default value and, later, will be executed "in fact"
2014-12-02 19:39:26 +01:00
Adolfo Gómez García
d77a56f953 * Adjunsting actors to manage idle time of users 2014-12-02 19:37:34 +01:00
Adolfo Gómez García
229ed2345b Fixing to add idle to actors & os managers 2014-12-01 13:18:02 +01:00
Adolfo Gómez García
d68f5332d1 * Added dependency on libxss (on debian right now)
* Removed dummy CheckSystray
* Added get idle duration for Linux

Note that we have to endure that ScreenSaver Duration is LONGER that
defined time in
2014-12-01 11:38:19 +01:00
Adolfo Gómez García
8ded065fc5 Removed transport binaries from git (the can be built from sources, also
in git.. :-) )
2014-12-01 10:24:47 +01:00
Adolfo Gómez García
4c6159e431 Pylint fixes 2014-11-28 11:29:12 +01:00
Adolfo Gómez García
d22531da7d Big change on cache updater. Now it runs "as a whole", and tries to update all pending caches at once. This might be too hard for some servers, but can be mitigated with the provided configurations flags... 2014-11-27 20:57:43 +01:00
Adolfo Gómez García
0a10f81cb7 * removed log (excesive) from services_pool
* Added simple comment to gui-d-servicespools
2014-11-27 19:16:31 +01:00
Adolfo Gómez García
b3e2d2264a Removed debug from configuration.html
fixed "publish on creation" switch
2014-11-27 18:38:33 +01:00
Adolfo Gómez García
500347d878 Several minor fixes 2014-11-27 12:57:55 +01:00
Adolfo Gómez García
2096ad085a * Moved workers "import & load" to where they are used in fact
* Added frecuency_cfg to Jobs, so frequency can be set from db
* Fixed workers to use frecuency_cfg when needed
2014-11-26 11:12:30 +01:00
Adolfo Gómez García
41b40d8458 * Fixed locking manager to make it work with sqlite (basically uses
"basic" locking and no lock table instruction)
* Basic improvement to getSqlDatetime
* Uncommented "deletion" of stuck cleaner... :)
2014-11-26 07:56:26 +01:00
Adolfo Gómez García
eb844a0c88 * Added "required" to choice fields that needs it
* Fixed jquery-validate not validating select (because of being hidden 
due to selectpicker)
2014-11-25 20:31:55 +01:00
Adolfo Gómez García
44e6a3b50c * Fixed Properties to be unique for every user service, not globally
* Minor adjunst to StuckCleaner
2014-11-25 11:53:01 +01:00
Adolfo Gómez García
531c6d983d * Fixed Configuration Initialization to fit Django 1.7 model
* Added "Stuck removal" process to check & removel "Too long time stuck
in a transitional state" user states
2014-11-25 11:02:43 +01:00
Adolfo Gómez García
8a138f9cd8 * Bug fix on debian based removal script
* Removed IPC backend task start to notify login/logout
2014-11-24 12:12:46 +01:00
Adolfo Gómez García
1cbb7d1ae3 fixed table name for user service properties 2014-11-24 08:15:33 +01:00
Adolfo Gómez García
de0447bbc3 * Added "properties" to user services. Properties are less often used
fields that we may want to store attached to an user service
2014-11-24 01:34:49 +01:00
Adolfo Gómez García
609a982c92 * Added version to "init" REST method 2014-11-24 01:33:07 +01:00
Adolfo Gómez García
cca8fee453 * Fixed the fact that Centos has an old release of six, that does not
support, for example, byte2int method..
* Added some logs and minor fixes
* Added callbacks for LOGIN/LOGOUT client messages
2014-11-24 00:47:08 +01:00
Adolfo Gómez García
c72f0dd46e Generated xrdp component for uds actor for rh based distros 2014-11-23 09:31:39 +01:00
Adolfo Gómez García
da93da5782 Added all debian packages under one builder 2014-11-23 08:56:12 +01:00
Adolfo Gómez García
7afa2b8042 Creating multiple files for actor 2014-11-23 08:33:19 +01:00
Adolfo Gómez García
0c8a1447bf added renamer for RH based, testing now 2014-11-22 10:36:49 +01:00
Adolfo Gómez García
493792aace Addint about & fixing up thingg 2014-11-21 12:42:43 +01:00
Adolfo Gómez García
2fb06c06f6 * Fixed requests "verify" parameter detection
* Fixed .desktop files icon paths
Seems to work under Centos7 also, but have to "fix" "operations" on
Centos (mostly create a "renamer" for Centos)
2014-11-20 17:20:38 +01:00
Adolfo Gómez García
66653b0602 * Added script to build rpm for RH based distros
* Added spec file to create rpm (more work needs to be done)
* Making compatible Linux Actor with RH based distros
* A lot of work :)
2014-11-20 11:54:19 +01:00
Adolfo Gómez García
58e77aa4f3 Some more fixes to add UDS User space tool at session startup under
gnome & kde (more tests to go)
2014-11-19 06:48:52 +01:00
Adolfo Gómez García
818c317724 Debian and related distros package seems to work fine right now (maybe
need some little fixes)
2014-11-19 05:40:02 +01:00
Adolfo Gómez García
91a40dcc76 Advanced a bit more, now actor works but need the "user space script" to
communicate login/logouts
2014-11-18 20:56:45 +01:00
Adolfo Gómez García
dca366b334 Linux actor seems to start working, a bit to go anyway to finish debian
package (fix init scripts, create a couple of shell scripts to "easy"
management, etc..)
2014-11-18 20:16:45 +01:00
Adolfo Gómez García
15ef761d47 Debian package seems to work fine right now, will revise changelog and
make scripts work correctly, but packaging is done :)
2014-11-18 19:21:48 +01:00
Adolfo Gómez García
4b96c7936e Updating Readme.md 2014-11-18 18:20:43 +01:00
Adolfo Gómez García
3cdce63405 Updating Readme.md 2014-11-18 18:20:11 +01:00
Adolfo Gómez García
d1a5329780 Updating Readme.md 2014-11-18 18:18:57 +01:00
Adolfo Gómez García
043f65efdc Updating Readme.md 2014-11-18 18:16:16 +01:00
Adolfo Gómez García
62fca626b7 Updating new debian installer 2014-11-18 18:15:22 +01:00
Adolfo Gómez García
d2234a4daa * Building debian package and related stuff
* Some fixes to make actor work correctly an least on Ubuntu 12.x
2014-11-17 10:33:06 +01:00
Adolfo Gómez García
029ae69353 More actor fixes & updates 2014-11-14 06:51:22 +01:00
Adolfo Gómez García
a29dc53956 * Extracted common actors part to a common base class
* Fixed Windows class to make use of this common class
2014-11-13 02:40:48 +01:00
Adolfo Gómez García
c7e98fdde9 Advancing on Linux Actor with very similar structure to windows actor 2014-11-13 01:57:51 +01:00
Adolfo Gómez García
74781c14c0 * Added daemonizer for linux, adapted from old uds actor to work with
python 3 & 2.7, and a few fixes
2014-11-12 08:12:18 +01:00
Adolfo Gómez García
7a3692cc43 Fixed to use lowercase for uuids (as rfc 4122 says that they will be) 2014-11-12 07:28:50 +01:00
Adolfo Gómez García
7f049a80de Merge branch 'master' of git@github.com:dkmstr/openuds.git
Conflicts:
	actors/src/udsactor/utils.py
2014-11-12 06:25:44 +01:00
Adolfo Gómez García
fe15642254 Now configurator gives more "useful" error messages, and seems to work
under python 3.x and python 2.7

Also updated linuxActor source (PEPified)
2014-11-12 06:14:09 +01:00
Adolfo Gómez García
f3e4e9d267 Now configurator gives more "useful" error messages, and seems to work
under python 3.x and python 2.7
2014-11-12 06:12:57 +01:00
Adolfo Gómez García
5bca96a882 * Moved UDSActorService inside windows module
* Fixed httpserver exec
2014-11-12 04:41:03 +01:00
Adolfo Gómez García
47e615b7b2 * Fixed File Upload
* Added "case insensitive" to factory lookups for transports,
authenticators, osmanagers & providers
2014-11-12 04:15:24 +01:00
Adolfo Gómez García
154533b4cb Provider factory is now Case Insensitive 2014-11-12 03:55:57 +01:00
Adolfo Gómez García
43796e44ae * Old actor fixes 2014-11-11 07:10:13 +01:00
Adolfo Gómez García
418fac20e5 * Adding actors support for linux (based on old actor) 2014-11-11 07:09:53 +01:00
Adolfo Gómez García
85a32cf667 * Fixed an issue with tunneled transport for NX
* Some minor code fixes
2014-11-11 06:29:00 +01:00
Adolfo Gómez García
0c0ec581c0 * Lots of fixes towards python 3 2014-11-11 06:08:29 +01:00
Adolfo Gómez García
c56ef185b6 Adapting actors code to be compatible with python 2.7 y python 3.x 2014-11-10 22:01:00 +01:00
Adolfo Gómez García
449b3df02a * Added logger and first simple tests worked :) 2014-11-10 06:43:11 +01:00
Adolfo Gómez García
1f519308a1 Started Linux Actors part 2014-11-10 06:29:18 +01:00
Adolfo Gómez García
12c93732da general rearrange of actors 2014-11-10 05:01:32 +01:00
Adolfo Gómez García
a02d9561c3 Renaming windowsActor to Actor (will be for both platforms) 2014-11-10 04:35:48 +01:00
Adolfo Gómez García
a3760c0e8a Updating to guacamole 0.9.3 (only references updated right now, have to
check how this works now)
2014-11-09 17:09:31 +01:00
Adolfo Gómez García
8ccf48564a Fixing admin table colors & some PEPify 2014-11-09 00:24:46 +01:00
Adolfo Gómez García
727f455e99 Changed admin panels to a more formal "widget" 2014-11-07 06:44:52 +01:00
Adolfo Gómez García
99038a61f1 Changing 3d buttons to new style 2014-11-07 05:40:25 +01:00
Adolfo Gómez García
102a4b35ee Updated glyphicons & fontawesome 2014-11-07 04:59:51 +01:00
Adolfo Gómez García
97787b7eba Finished (i hope... :-) ) Image Gallery & Service Pools usage 2014-11-06 22:08:22 +01:00
Adolfo Gómez García
42845e6243 Fixing & optimizing image gallery 2014-11-06 18:11:05 +01:00
Adolfo Gómez García
43f17a3945 Added gallery to UDS administration interface 2014-11-06 11:32:32 +01:00
Adolfo Gómez García
c0669bc1f2 Added missing gallery files :-) 2014-11-06 04:01:54 +01:00
Adolfo Gómez García
5f377762b5 Added dashboard table for gallery 2014-11-06 03:59:32 +01:00
Adolfo Gómez García
df7c27dbf6 Bootstrap switch 3.2 does not seem to work fine with firefox on modals, so switched back to 3.1 2014-11-06 02:47:50 +01:00
Adolfo Gómez García
5bc650eaa9 Upgrading components & removing unused stuff 2014-11-06 01:00:30 +01:00
Adolfo Gómez García
638817f98b * Replaced default "pixelated" image from services to UDS Image
* Added image to Services Pools, so we can select our image
2014-11-05 10:51:23 +01:00
Adolfo Gómez García
825e88e1f1 Fixed REST model to allow a different overview "set" to be returned 2014-11-05 04:02:53 +01:00
Adolfo Gómez García
971f56c62a Added REST interface to images & fixed it 2014-11-05 03:53:08 +01:00
Adolfo Gómez García
d2d7291c19 Started image gallery (for ServicePools right now, but maybe other thins in near future) 2014-11-04 21:48:00 +01:00
Adolfo Gómez García
7137f151fb minor ticket fixes 2014-11-04 04:37:41 +01:00
Adolfo Gómez García
f23c68d7bf Fixed wsgi.py to work with apache2 again 2014-11-04 03:06:28 +01:00
Adolfo Gómez García
6b8f8f5211 updated sample settings 2014-11-03 20:04:25 +01:00
Adolfo Gómez García
f4414233f8 Removed unused stuff from sample settings file 2014-11-03 19:59:46 +01:00
Adolfo Gómez García
c2243b8f48 Ticket system seems to work 2014-11-03 05:14:25 +01:00
Adolfo Gómez García
dd5b35b354 Updated getUDSCookie for "early" generation and "forced" storing on
response
2014-11-02 05:11:04 +01:00
Adolfo Gómez García
a8bba8da48 due to use of uuids, i think that scrambling ids is no more necessary,
because now it's not possible to "infer" others ids in base to the one
provided
2014-11-02 05:01:50 +01:00
Adolfo Gómez García
a685f78561 * Ensures uuids are upper case on database
* REST access will convert uuids to upper case before access (if fact,
this mustn't be necessary, because uuids are provided by broker, but in
any case...)
2014-11-02 03:10:10 +01:00
Adolfo Gómez García
5fc6710a45 * Fixed tickets
* Added ServicePool "alias" to DeployedService (will finish refactoring in a future)
* Fixed LinuxRandomPassOsManager (was bugged)
2014-10-31 07:13:04 +01:00
Adolfo Gómez García
a4df05e428 Upated & ficed admin interface 2014-10-31 05:23:19 +01:00
Adolfo Gómez García
d1ccdfa686 Upated & ficed admin interface 2014-10-31 05:23:04 +01:00
Adolfo Gómez García
f7b3e8853f Fixed Meta groups matching 2014-10-30 18:29:25 +01:00
Adolfo Gómez García
063f433696 * More fixes raised during tests 2014-10-30 07:25:33 +01:00
Adolfo Gómez García
6fbe86b218 Fixed ifbelongs (forgot to commit on previous) 2014-10-30 06:06:07 +01:00
Adolfo Gómez García
550967d6d7 * Lots of fixes :-)
* Changed parent user (for internaldb, for "derived" users from a single
parent) to uuid
* Fixed authenticators users/groups administration
* Fixed some javascript errors (for example, ifbelongs didn't work
correctly)
* Updated global requests to get ident from correct place
*
2014-10-30 06:05:31 +01:00
Adolfo Gómez García
02443aabde Fixed a typo on gui description creation (introduced on a refactoring...
:-) )
2014-10-30 02:30:03 +01:00
Adolfo Gómez García
2ecb274ed6 * Small fixes to authenticator (pip related mostly)
* Adding docstrings and fixing some REST related issues
2014-10-29 19:35:33 +01:00
Adolfo Gómez García
ce52ac4acc Added filtering to GET methods (via filter optional parameter) 2014-10-29 08:32:23 +01:00
Adolfo Gómez García
e6150b0b07 * Added some pydev fixups
* Updated cache cleanup to be database agnostic :)
2014-10-28 23:09:02 +01:00
Adolfo Gómez García
bbbc14f860 * Added optional parameters to REST login method
* Fixed sample settings to make tables always in innodb (with correct
server parameters, they are almost as fast as myisam)
2014-10-28 08:29:15 +01:00
Adolfo Gómez García
a2d81b138d Working (not implemented already the user desktop part) windows actor 2014-10-27 18:40:18 +01:00
Adolfo Gómez García
74148210a9 * Fixed ticket to accept also "auth" name
* started to add filters to models
* removed import from deprecated getIp
* added tickets url
* added ticket view
2014-10-27 18:39:31 +01:00
Adolfo Gómez García
3cec0f94e5 Added "ticketing" method to allow third party integration with uds
authentication.

Basically it "register" an event, and returns a ticket. This event will
tell UDS how to authenticate an user (maybe even a fake user), and in
which groups to include it.
2014-10-27 10:46:47 +01:00
Adolfo Gómez García
a738f3afbf * Due to the fact that we only need SSL on actor for "garbling" data, the certificate is included inside the application itself
* The other side certificate verify can't verify host
2014-10-27 01:02:13 +01:00
Adolfo Gómez García
36ec5a7451 testing cert autogeneration 2014-10-27 00:51:35 +01:00
Adolfo Gómez García
87cec03254 added ipc to Windows Service 2014-10-26 13:47:25 +01:00
Adolfo Gómez García
8eec58997a more on new actor IPC 2014-10-24 10:43:17 +02:00
Adolfo Gómez García
b508c24b7d Advancing on uds actor client comms server 2014-10-23 17:32:52 +02:00
Adolfo Gómez García
2b73e0356c * Added a windows "check idle" method
* Added a request for information message from client (user desktop app) to server (daemon/service)
* Fixed rest so we can now notify a "call back" server (wil be an http/https one) and also can receive which interface has been recognized
* Some minor fixes
2014-10-22 08:32:50 +02:00
Adolfo Gómez García
d21993ceff Added migration (fogotten from previous commit) 2014-10-21 17:44:35 +02:00
Adolfo Gómez García
42feeacc86 Added "notifyComms" method to actor, so we can tell broker where to
connect back to us
2014-10-21 17:42:59 +02:00
Adolfo Gómez García
0ba2ccab33 ipc now fully working. Need to work on UDS-->Daemon(or service) right now 2014-10-21 07:02:00 +02:00
Adolfo Gómez García
bac8a651b0 internal ipc for windows actor seems to work 2014-10-21 04:36:05 +02:00
Adolfo Gómez García
97e4eb2394 adding ipc for desktop client part 2014-10-20 07:38:18 +02:00
Adolfo Gómez García
e0ad0185b7 cleanup 2014-10-18 00:45:50 +02:00
Adolfo Gómez García
53f1312537 Testing & fixing new uds actor (reboot fixed) 2014-10-17 02:51:42 +02:00
Adolfo Gómez García
bdf0d034fa Testing & fixing new uds actor 2014-10-17 02:36:17 +02:00
Adolfo Gómez García
15aeba101e Some minor fixes 2014-10-17 02:36:02 +02:00
Adolfo Gómez García
d771039daa * Added login/logout notitications. * A bit (or a lot) pep8 & pylint fixes 2014-10-16 04:21:47 +02:00
Adolfo Gómez García
35ca143690 Fixed a bug when invoking CoRD with username that contains a domain
(user@domain) or a password with a :
2014-10-15 05:00:50 +02:00
Adolfo Gómez García
7f8aea603f almost done 2014-10-14 10:51:04 +02:00
Adolfo Gómez García
97cde76157 Added debug to config dialog.\nAdded basic windows logging 2014-10-10 12:27:05 +02:00
Adolfo Gómez García
a38921975f added test to configuration tool 2014-10-10 10:24:00 +02:00
Adolfo Gómez García
01b47d128c reorganization of code 2014-10-10 09:31:36 +02:00
Adolfo Gómez García
4bc8150852 reorganization of code 2014-10-10 09:27:41 +02:00
Adolfo Gómez García
d846db17cf reorganization of code 2014-10-10 09:26:23 +02:00
Adolfo Gómez García
573e6b5d1f Fixed Names of ovirt providers to include RHEV (that also supports) 2014-10-09 11:11:38 +02:00
Adolfo Gómez García
1b3d156e6c moving packages to files 2014-10-09 08:16:52 +02:00
Adolfo Gómez García
cd78c6a388 moving packages to files 2014-10-09 08:16:10 +02:00
Adolfo Gómez García
1399767c22 moving packages to files 2014-10-09 08:14:37 +02:00
Adolfo Gómez
babdd9c925 Moving packages to files 2014-10-09 08:12:46 +02:00
Adolfo Gómez García
90b67ae3e6 advancing on new UDSActor service 2014-10-08 10:42:55 +02:00
Adolfo Gómez García
06d6b9fd24 added REST api client part, valid for windows & linux actors 2014-10-07 18:01:36 +02:00
Adolfo Gómez García
c9524191b1 * Added temporal test (and executable creation) for testing that windows calls are working
* Fixed joinDomain (now it works)
* Checked that renameComputer works fine
2014-10-07 12:07:14 +02:00
Adolfo Gómez García
a48cb597db Adding basic windows functions to actor 2014-10-06 22:05:30 +02:00
Adolfo Gómez García
cde89f1839 working service with SENS 2014-10-01 20:00:12 +02:00
Adolfo Gómez García
9451803ef7 more tests. Seems that not displaying icon is a "bug" with first icon ID in py2exe 2014-10-01 13:21:04 +02:00
Adolfo Gómez García
36b816be69 messing up with pyexe, icons and other stuff 2014-10-01 12:59:20 +02:00
Adolfo Gómez García
defe8490b1 messing up with pyexe, icons and other stuff 2014-10-01 12:57:48 +02:00
Adolfo Gómez García
10d85df2e1 Added sample py2exe and pyinstaller for exe generation 2014-10-01 12:22:14 +02:00
Adolfo Gómez García
f1593c0957 added simple debug logging message 2014-09-30 17:12:45 +02:00
Adolfo Gómez García
4e1af8a33f added rdp transport applet binary so /media get also mounted if drives are redirected 2014-09-30 16:01:08 +02:00
Adolfo Gómez García
49a512d274 Added that RDP transports also mounts /media, not only /home 2014-09-30 15:39:17 +02:00
Adolfo Gómez
92d746fed5 Removed optional (nonsense) custom encoder, because the encoder itself can be loaded by any python program and it's not a good protection 2014-09-30 04:24:50 +02:00
Adolfo Gómez García
722021820b removed user read permissions on uds key creation 2014-09-30 04:21:17 +02:00
Adolfo Gómez García
21177736f3 messing up with pyinstaller 2014-09-29 20:38:22 +02:00
Adolfo Gómez García
6e173b09f2 messing up with pyinstaller 2014-09-29 20:38:15 +02:00
Adolfo Gómez García
310e7c5b53 woring on actor configuration app 2014-09-29 18:19:23 +02:00
Adolfo Gómez García
bd7263307a started windows actor in python 2014-09-29 12:08:59 +02:00
Adolfo Gómez García
0689bafa9c fixed uds master key name and added global *_enterprise to .gitignore 2014-09-29 11:47:31 +02:00
Adolfo Gómez García
cc3cd7999d * Fixed xmlrpc actor server code to correctly mark "login" and "logout"
that was inversed
* Added IP logging & user loging to xmlrpc actor
2014-09-26 11:57:44 +02:00
Adolfo Gómez García
784845c626 A couple "typos", nothing important in fact 2014-09-25 18:40:24 +02:00
Adolfo Gómez García
946cb66f33 Advancing on new REST actor (making the existing XMLRPC actors
compatible anyway)
2014-09-25 18:39:39 +02:00
Adolfo Gómez García
5424d2b8b7 Fixed a bug that makes all actor messages to be logged as "DEBUG" 2014-09-25 18:38:15 +02:00
Adolfo Gómez García
17ec42fca5 Starting again with actor over REST and fixed a few Xen "typos" 2014-09-24 13:57:14 +02:00
Adolfo Gómez García
9896197c3c * Added migration to remove "uniqueness" contraint from
ManagedObjecModel (and from descendants), and fixed ManagedObjectModel
2014-09-16 12:18:43 +02:00
Adolfo Gómez García
f497a902b5 * Added ManagedObjectModel as base class for top level managed elements:
Provider, Service, OsManager & Transport
* Fixing up REST api, that is now a bit broken with change of "ids" for
"uuids"
2014-09-16 12:05:05 +02:00
Adolfo Gómez García
d6887c26ab Migrating "basic" ids from db (that was autoincrements on mysql) to uuid
based requests
2014-09-16 10:57:34 +02:00
Adolfo Gómez García
9feaad840f Finished adding uuid to models where they are convenient.
Next step is adapt REST api to use this uuids instead of "ids", and fix
code were ids are used to use new uuids
2014-09-16 09:43:56 +02:00
Adolfo Gómez García
507aa23df0 Adding UUIDs to several models that must have it 2014-09-16 08:19:59 +02:00
Adolfo Gómez García
fba0bf8631 Added "uuid" field to UserService so we set our own global unique
identifier for this service.
This will be used by uds actor
There is another field, unique_id, that is provided by ServiceProviders,
and that we do not control in any way it's format. This is used, for
example, by actor to locate it's own "uuid"
2014-09-16 02:38:40 +02:00
Adolfo Gómez García
bbe2b7d1c2 * Added xml_marshaller as a requirement
* advanced in REST actor service
* Added uuid capability to cryptomanager
* Used uuid capability from cryptomanager in downloads manager
* Fixed "old class" style forgot on Config :S
* State now uses ugettext_lazy instead o ugettext because can be used on
some classes and will fail with ugettext prior to translation
environment initialization
2014-09-15 18:41:02 +02:00
Adolfo Gómez García
d085f350e0 * Fixed up processors to identify correctly types
* Added (in previous commit) Actor REST api (just started to work on it)
* Fixed content type detection from url
2014-09-15 17:47:13 +02:00
Adolfo Gómez García
adbe1dd8cd Added xml marshaller 2014-09-15 17:28:02 +02:00
Adolfo Gómez García
bf103d5603 removed specific (and unused) .settings folders from eclipse projects) 2014-09-15 10:35:16 +02:00
Adolfo Gómez García
9741decb3b removed administration client code (it's on previous releases branches) 2014-09-15 10:26:20 +02:00
Adolfo Gómez García
084ad39fc9 * Efectively remove support for thick client from current version (code
removed)
2014-09-15 10:23:56 +02:00
Adolfo Gómez García
3562e4ca56 * Cleaning up things
* Using pylint to try to find potentials errors
2014-09-15 10:19:54 +02:00
Adolfo Gómez García
6dbe561512 Disabled all xmlrpc except actor communication (will remove also code in
a near future)
This makes that the "thick administration client" won't be usable
anymore
2014-09-15 08:19:17 +02:00
Adolfo Gómez García
9e1efff826 Adding six to modules, and fixing up a few related issues 2014-09-12 17:28:23 +02:00
Adolfo Gómez
42f8487e75 Create README.md
Basic description
2014-09-11 16:34:54 +02:00
Adolfo Gómez García
4f6ff538c2 removed .settings of main openuds project (did we really needed this?) 2014-09-11 16:17:38 +02:00
Adolfo Gómez García
14b24db532 Fix mistake on merge Ldap authenticator fix on 1.5 :-) 2014-09-11 16:14:33 +02:00
Adolfo Gómez García
d3c6312ed5 * Fix of unicode handling on hash method of cryptomanager
* minor refactoring of gui
* Bug fix on authenticator model
2014-09-10 14:32:48 +02:00
Adolfo Gómez García
d0f291c386 fixed a couple of minor bugs gettins headers information 2014-09-09 15:19:01 +02:00
Adolfo Gómez García
341a538503 Finished mitrating to 1.7 by removing efectively south migrations 2014-09-08 22:24:20 +02:00
Adolfo Gómez García
9a381cd333 Fixed bug on service image resolver, (mimetype is now content_type) 2014-09-08 15:21:08 +02:00
Adolfo Gómez García
1c30a5c46d fixed settings sample for running on 1.7 2014-09-08 15:17:02 +02:00
Adolfo Gómez García
6dc3f2a4dc Migrations from 1.5 onwards will be using django 1.7 migration engine
instead of south
2014-09-08 14:03:19 +02:00
Adolfo Gómez García
bd5b81eccc migrating to django 1.7 2014-09-08 13:20:44 +02:00
Adolfo Gómez García
9c77bb321f sync 2014-09-05 15:49:58 +02:00
Adolfo Gómez García
cc2d7f1d6b * Added new bootstrap switch versions
* Added option to change match mode for meta groups (ALL or ANY, before
was always ALL)
2014-09-05 13:52:47 +02:00
Adolfo Gómez García
3da574985f merged 2014-09-04 10:27:02 +02:00
Adolfo Gómez García
7a562ec946 fixed a typo 2014-09-04 10:25:53 +02:00
Adolfo Gómez García
a5158acca1 Added user preferences access control in configuration (Admin interface) 2014-09-03 19:58:34 +02:00
Adolfo Gómez García
5bf6f00425 merging with 1.5 for future hotfixes 2014-09-03 19:31:58 +02:00
Adolfo Gómez
3bc46de0a6 more fixes 2014-09-03 18:05:05 +02:00
Adolfo Gómez
5aa798fe26 fixing import stuff 2014-09-03 18:04:46 +02:00
Adolfo Gómez
7e6890c327 more initial work on imports 2014-09-03 14:50:23 +02:00
Adolfo Gómez
f64987a7b1 updating migration 2014-09-03 14:36:29 +02:00
Adolfo Gómez
2af27b86e8 Before start git migration 2014-09-03 09:19:16 +00:00
Adolfo Gómez
210c218d36 2014-09-02 13:50:47 +00:00
Adolfo Gómez
73d0ff01da * Added posibility to add messages to administration (version 0) 2014-09-01 11:59:16 +00:00
Adolfo Gómez
65418d4cb2 Fixed UDS Actor to check 2014-08-29 09:35:30 +00:00
Adolfo Gómez
ac1651dcf3 2014-08-21 10:54:34 +00:00
Adolfo Gómez
89f887c68c * REST fix to delete incompleted created service
* oVirtLinkedServiced added check to memory value (fix)
2014-08-19 08:57:24 +00:00
Adolfo Gómez
cf5e25796d removed console.log 2014-07-28 12:31:38 +00:00
Adolfo Gómez
04135b14c9 Fixed index.xhtml to work on be compatible with uds 1.5 (needs a minor change to client-ui.js to get paramaters from "query.ui" instead of from document.location.search 2014-07-28 12:02:34 +00:00
Adolfo Gómez
0643e44125 Fixed index.xhtml to work on be compatible with uds 1.5 2014-07-28 11:17:46 +00:00
Adolfo Gómez
c0c8cbf66d 2014-07-27 21:41:17 +00:00
Adolfo Gómez
775d59a621 Linux Actor Fixes 2014-07-17 10:27:35 +00:00
Adolfo Gómez
6a841a86df Updated to Guacamole 0.9.1, now closes the session correctly 2014-07-17 10:23:22 +00:00
Adolfo Gómez
c4958e808e new trasnports that if can't find nx 3.5 on Windows, looks for opennx 2014-07-11 14:37:25 +00:00
Adolfo Gómez
4a8d95eec9 Updated linux actor to allow random passwords 2014-07-11 14:35:15 +00:00
Adolfo Gómez
9333077187 2014-07-11 14:34:47 +00:00
Adolfo Gómez
a14b5fea59 Needs for uds actor to detect session open/close by user on XRDP 2014-07-11 14:32:48 +00:00
Adolfo Gómez
f9172258a4 Needs for uds actor to detect session open/close by user on XRDP 2014-07-11 14:31:30 +00:00
Adolfo Gómez
ce07adcc0d Updated to use alternative opennx if nomachine client not found 2014-07-08 11:46:01 +00:00
Adolfo Gómez
7b12f3e359 Updated to use alternative opennx if nomachine client not found 2014-07-08 11:45:44 +00:00
Adolfo Gómez
d4c065355c * Updated sample to add secondary auth
* Removed unused comments
* Added sypport for login using REST for any authenticator
* Added new icon (good one) to UDS
2014-06-30 12:10:20 +00:00
Adolfo Gómez
b10a0ac386 Updated icons!!! 2014-06-30 12:03:30 +00:00
Adolfo Gómez
60990ad64c Added "empty domain" option for rdp transports so domain can be always emptied (for linux & xrdp is needed right now) 2014-06-30 11:57:09 +00:00
Adolfo Gómez
acfbb0a3cb added provider_id to overview of services_pools 2014-06-26 19:17:42 +00:00
Adolfo Gómez
fd3930880d Simple REST sample 2014-06-26 19:14:36 +00:00
Adolfo Gómez
4b58ec4345 Added to linux actor capability to change passwords.. Unchecked anyway 2014-06-26 18:00:53 +00:00
Adolfo Gómez
c76d24c0f2 Started new Linux Random Password OS Manager 2014-06-26 17:40:58 +00:00
Adolfo Gómez
5fac9c3205 Updating actor 2014-06-26 17:38:57 +00:00
Adolfo Gómez
8c09ec9b74 * Fixed configuration, now it's more "friendly"
* Replaced numerics buttons with "better ones" :-)
2014-06-21 12:41:04 +00:00
Adolfo Gómez
0d6171bc0f Adding "user friendly" editors to Configuration... :-) 2014-06-20 13:24:18 +00:00
Adolfo Gómez
75c9313a0f Added a "Visual enhacements" configuration variable and a template tag (inside html5) to allow switching between enhanced display effects and no effects (it will depend on template) 2014-06-12 07:27:54 +00:00
Adolfo Gómez
0a3433b2f5 * renamed "translateProxy" to "acceptProxy" in IP authenticator
* Removed getIp from trustedSourceRequired auth decorator
* Added "remove request global cache" after being used by system
* Removed unused getIp from web & xmlrpc
2014-06-11 08:56:19 +00:00
Adolfo Gómez
ed602e9354 * Removed deprecated "getIp" method call from views
* Added option so requests Ips can be checked "behind" a proxy or not (increases security)
* Marqued getIp from auth as "deprecated" and generates a warning on logs
* Renamed Decorators to decorators, do not liked the initial "D"... :-)
* Added ip of request extraction to GlobalRequestMiddleware
* Fixed IPMachinesService.py so it adapts correctly to new fact that Storage readData returns "unicode" strings
* Added a default -99999 as min value to spinners (admin web interface)
*
2014-06-11 07:50:03 +00:00
Adolfo Gómez
d7f282cd88 added "deprecated" snippet to decorators 2014-06-11 07:32:31 +00:00
Adolfo Gómez
5d83ca29bc added "deprecated" snippet to decorators 2014-06-11 07:31:34 +00:00
Adolfo Gómez
0003a5fbf8 Some more fixes 2014-06-10 04:04:44 +00:00
Adolfo Gómez
33c2cbe666 * Refix of storage, so it will be compatible with previous versions of UDS
* Added new "development" package to include stuff for development/debug stage
* Ported fix for RDP/TSRDP transports from 1.5 to trunk
2014-06-03 12:26:32 +00:00
Adolfo Gómez
9712d271e7 Updated translations 2014-06-03 11:54:31 +00:00
Adolfo Gómez
3f97533e41 Fixed FQDN domain transport form 2014-06-03 11:50:58 +00:00
Adolfo Gómez
ce1a9b4b2f Updated settings to change cookie name for lang storage
fixed REST preprocessor for unicode stuff
fixed storage for unicode stuff
2014-06-03 08:48:14 +00:00
Adolfo Gómez
c1d26fb35e Fixed REST to get language from Accept-Language header instead of "messed-up" stuff i had done... Much easier, and works fine 2014-06-03 05:16:04 +00:00
Adolfo Gómez
376ed1f231 Several fixes related to cache && storage 2014-06-03 03:27:15 +00:00
Adolfo Gómez
53fda0af56 Adding "full support" to authenticators. After some testings, theese not work as expected in some situations and this has been fixed 2014-06-02 09:00:03 +00:00
Adolfo Gómez
03ac4dcaa7 More unicode related "bugs" 2014-06-02 04:47:02 +00:00
Adolfo Gómez
25f97a4b88 Adding "full" support to authenticators for unicode (a "must have been done before") 2014-06-02 03:42:57 +00:00
Adolfo Gómez
4b5f21b30e Added support for wallpaper on RDP if desired (all all user xperience in fact) 2014-05-29 13:30:23 +00:00
Adolfo Gómez
30fa98216e Added support for wallpaper on RDP if desired (all all user xperience in fact) 2014-05-29 13:21:22 +00:00
Adolfo Gómez
3181fdbf18 Added support for wallpaper on RDP if desired 2014-05-29 13:18:31 +00:00
Adolfo Gómez
eca08d6350 Fixed SimpleLDAP to "Work" 2014-05-29 06:18:57 +00:00
Adolfo Gómez
2108353d1e * Added min height to panel tables
* Added uds to cookies if not found on login
* Fixed html5 so if request is not in context, simply set user_agent to "Unknown"
* Updated auth/views to use new cookie "syntax"
2014-05-29 06:14:27 +00:00
Adolfo Gómez
14a2e0a02d Fixed unicode related problem (right now a quick fix removing "from future..." will return back to this later) 2014-05-29 05:09:20 +00:00
Adolfo Gómez
5a80efc852 Fixed debug match output 2014-05-29 03:40:53 +00:00
Adolfo Gómez
dc6af051ac Some more little fixes 2014-05-27 06:21:56 +00:00
Adolfo Gómez
b846940635 I have intention to start working on some tests, and not the "s***" i have done here, so i'll move out tests dirs until i have something more "usable" 2014-05-27 06:20:26 +00:00
Adolfo Gómez
a10550820b Some more little fixes 2014-05-27 06:19:15 +00:00
Adolfo Gómez
217e681cb4 Some more little fixes 2014-05-27 01:14:29 +00:00
Adolfo Gómez
a2d348962d Removed excesive "debug" logging 2014-05-24 03:08:01 +00:00
Adolfo Gómez
d535c5619a Updating linux actor 2014-05-24 02:53:35 +00:00
Adolfo Gómez
c479fc3fbd Updating linux actor 2014-05-24 02:30:18 +00:00
Adolfo Gómez
9bdfb4a7eb Updating linux actor 2014-05-24 02:02:20 +00:00
Adolfo Gómez
af2de4881f Improved cache max services assignations 2014-05-22 22:13:46 +00:00
Adolfo Gómez
cf07caa5cb Added atomic transaction to assignations to user from cache, so we ensure that one cached element is assigned to one user and only used once 2014-05-22 07:48:40 +00:00
Adolfo Gómez
47174aa961 Fixed "select_for_update" where not needed 2014-05-22 06:25:07 +00:00
Adolfo Gómez
4e7376a7f0 Adding plugins stuff to UDS 2014-05-21 08:36:34 +00:00
Adolfo Gómez
4cdc3d2ff0 2014-05-21 07:59:16 +00:00
Adolfo Gómez
6e812b2cce 2014-05-21 06:03:51 +00:00
Adolfo Gómez
6930509259 2014-05-20 07:59:46 +00:00
Adolfo Gómez
018e6d742c Added ValidationError catch for users 2014-05-19 09:59:25 +00:00
Adolfo Gómez
a2bf6c5799 Don't like plugins model... looking another way :) 2014-05-19 07:33:00 +00:00
Adolfo Gómez
49e367871e Don't like plugins model... looking another way :) 2014-05-19 07:32:21 +00:00
Adolfo Gómez
7d8072ca61 Checking plugins for models 2014-05-19 05:47:51 +00:00
Adolfo Gómez
ec46452610 Adding plugins model to models 2014-05-19 05:17:28 +00:00
Adolfo Gómez
d0f3992e80 2014-05-19 05:08:36 +00:00
Adolfo Gómez
212b99b831 Fixed so we MUST enter host:port form on tunnel nx transport 2014-05-16 05:51:51 +00:00
Adolfo Gómez
5de90f967e Fixed so we MUST enter host:port form on tunnel rdp transport 2014-05-16 05:50:46 +00:00
Adolfo Gómez
f6c67dab96 Added a spinner to numeric inputs to make "easier" using them 2014-05-14 08:43:00 +00:00
Adolfo Gómez
23694184bd Spinner don't seems to work nicely with bootstrap 3 2014-05-14 08:21:49 +00:00
Adolfo Gómez
827140dc21 * Fixed "about"
* Added "editspin"
* Initial working release of Xen Provider
2014-05-14 07:57:44 +00:00
Adolfo Gómez
52b78f11a3 Fix worker transaction 2014-05-14 07:40:59 +00:00
Adolfo Gómez
692e82f62f Advancing on XenServer Provider 2014-05-14 05:15:41 +00:00
Adolfo Gómez
c4e2f09dfc Advancing on XenServer Provider 2014-05-13 06:27:46 +00:00
Adolfo Gómez
462b676353 Advancing on XenServer Provider 2014-05-13 05:29:26 +00:00
Adolfo Gómez
09d1d646a5 Advancing on XenServer Provider 2014-05-13 04:48:16 +00:00
Adolfo Gómez
9978993c9b Advancing on XenServer Provider 2014-05-12 06:23:08 +00:00
Adolfo Gómez
a66d75bdc5 Advancing on XenServer Provider 2014-05-12 06:13:47 +00:00
Adolfo Gómez
87a795cd8b Advancing on XenServer Provider 2014-05-12 05:35:42 +00:00
Adolfo Gómez
4c66445998 Fixed java detection 2014-05-09 14:30:26 +00:00
Adolfo Gómez
051bf0358b Fixed "detect java" 2014-05-09 14:27:19 +00:00
Adolfo Gómez
a7f96d3933 Fixed Storage codec (was utf-8, not uft-8) 2014-05-09 09:57:40 +00:00
Adolfo Gómez
2e31d2ec1e A little fix 2014-05-09 09:56:18 +00:00
Adolfo Gómez
195e47f443 Fixes to standard install 2014-05-08 11:02:50 +00:00
Adolfo Gómez
1d0bb1798c Updating to 0.9.0 (base update, needs more work to allow file transfers) 2014-05-08 11:02:20 +00:00
Adolfo Gómez
15df5b8141 Fixed a couple incidences with UTF8 and SAML 2014-05-08 09:01:09 +00:00
Adolfo Gómez
7896dae178 Updating to 0.9.0 (base update, needs more work to allow file transfers) 2014-04-29 17:50:43 +00:00
Adolfo Gómez
e4beaf4584 Restored "compiled" documentation 2014-04-29 14:51:57 +00:00
Adolfo Gómez
5b383bb384 Restored "compiled" documentation 2014-04-29 14:51:12 +00:00
Adolfo Gómez
dc78222b88 Updated binary applet of tunnel transport for Mac OSX 2014-04-29 14:33:58 +00:00
Adolfo Gómez
0ef239a409 Updated binary applet of tunnel transport for Mac OSX 2014-04-29 14:33:41 +00:00
Adolfo Gómez
d0e6c98d2f my blame :( 2014-04-29 09:20:15 +00:00
Adolfo Gómez
e73fac22db * Fixed login issue on authenticator selector
* Fixed Regex authenticator (ldap lib does not supports unicode strings)
* Initial support for XenServer (non usable yet, just "forked" ovirt service and started adapting it)
2014-04-29 07:55:03 +00:00
Adolfo Gómez
de80b26880 Fixed a couple bugs with authenticators left behind in tests 2014-04-28 15:30:12 +00:00
Adolfo Gómez
78d0baf4af Done with models split (now needs testing to ensure that is at least as was before) 2014-04-24 08:03:12 +00:00
Adolfo Gómez
3d8fa98376 Done with models split (now needs testing to ensure that is at least as was before) 2014-04-23 14:05:27 +00:00
Adolfo Gómez
244302db58 Done with models split (now needs testing to ensure that is at least as was before) 2014-04-23 14:01:23 +00:00
Adolfo Gómez
a52c49ae5e Done with models split (now needs testing to ensure that is at least as was before) 2014-04-23 14:00:53 +00:00
Adolfo Gómez
46961c42c1 Splitting Loooooooong models.py in smaller and more usable pieces.. :) 2014-04-23 13:37:33 +00:00
Adolfo Gómez
f9bc653a8f Splitting models inside a package 2014-04-23 12:31:51 +00:00
Adolfo Gómez
9045989186 Tagging release 2014-04-23 12:26:55 +00:00
Adolfo Gómez
49063d4187 testing a couple things 2014-04-23 12:25:22 +00:00
Adolfo Gómez
922036112e testing a couple things 2014-04-23 12:24:55 +00:00
Adolfo Gómez
eb93ccde21 Actualizados los mensajes en español 2014-04-10 17:06:34 +00:00
Adolfo Gómez
90157e4d51 * Fixed xls export
* Fixed "cancel" on publications
* Fixed (minor) ovirt issues
* Removed "old-js" from trunk
2014-04-10 09:43:12 +00:00
Adolfo Gómez
23e3c385fd * Fixed xls export
* Fixed "cancel" on publications
* Fixed (minor) ovirt issues
* Removed "old-js" from trunk
2014-04-10 09:41:32 +00:00
Adolfo Gómez
63fc505bee A couple minor fixes 2014-04-08 09:02:18 +00:00
Adolfo Gómez
10201bd976 Updated translations 2014-04-04 06:32:41 +00:00
Adolfo Gómez
6bf1b8ad83 More about translations 2014-04-02 16:30:13 +00:00
Adolfo Gómez
79cdf4f68b Added a couple fields "forgotten" on web admin interface 2014-04-02 16:01:30 +00:00
Adolfo Gómez
86f789d3a5 Updated translations 2014-04-02 15:32:52 +00:00
Adolfo Gómez
4580e6c60a Fixed translations "mixed" :) 2014-04-02 15:32:05 +00:00
Adolfo Gómez
1c58aa116c 2014-04-02 15:28:39 +00:00
Adolfo Gómez
1ae23c327e Fixed some transactions
Removed some "dummy" select_for_update sentences
2014-03-30 19:03:57 +00:00
Adolfo Gómez
20a05371a3 Updated translations 2014-03-30 16:36:38 +00:00
Adolfo Gómez
21733cca17 Upgraded translations 2014-03-28 12:05:53 +00:00
Adolfo Gómez
9a28e53045 * Fixed space visualization of storages for oVirt
* Fixed a deployed service removal bug
2014-03-28 11:56:35 +00:00
Adolfo Gómez
86318a66c3 Added safety "min space" to oVirt an HyperV
Fixes related to pep
2014-03-28 11:00:51 +00:00
Adolfo Gómez
1140f1b4e6 More transaction fixed 2014-03-27 11:46:56 +00:00
Adolfo Gómez
50e04eda7d Added basic "en" structure (will not contain any translation) 2014-03-26 02:22:53 +00:00
Adolfo Gómez
b20c4c933c A bit of formating 2014-03-25 17:22:12 +00:00
Adolfo Gómez
978ab5772d Fixed html5 navbar.
Bootstrap navbars requires a container (using container-fluid to get full width)
2014-03-25 17:18:57 +00:00
Adolfo Gómez
87d798c92c * Added some more "__updated__"
* Fixed a little bit more coffescript
2014-03-22 20:54:37 +00:00
Adolfo Gómez
c62d30c506 * Fixed scheduler query for select what tasks are available
* Added more space to configuration labels
* Fixed WindowsOSManger unicode related problem
* pep8 to Actor.py (xmlrpc)
2014-03-20 20:05:05 +00:00
Adolfo Gómez
9302c0cd76 * Removed debug from gui
* fixed choice (removed debug info shown on select items...
2014-03-20 10:21:32 +00:00
Adolfo Gómez
7db14ec4b5 More fixes:
* No "base" elements show on dropdown when editing resource pools
* Downloads was broken
* Transports do not worked correctly if no network was selected
* Test button removed from Service (right now it's not used)
* New machine by IP was not working due to a commentary as "//" inserted on template field for edit_list
2014-03-20 10:09:33 +00:00
Adolfo Gómez
cf2051b8f2 Fixed staff dashboard showing
Added test method for services & authenticators
2014-03-19 02:39:56 +00:00
Adolfo Gómez
5d984fb94e Fixed icon size problem 2014-03-19 02:00:27 +00:00
Adolfo Gómez
4565f00174 Bug fix in LDAP & Regldap related to unicode literals
Fixes in new admin interface
2014-03-19 01:44:51 +00:00
Adolfo Gómez
b64928f1e6 Added UDSActor as downloadable, and removed from /static/... 2014-03-18 20:16:38 +00:00
Adolfo Gómez
944d9957d6 Activating sass on compressor 2014-03-18 02:36:29 +00:00
Adolfo Gómez
19936f7a84 Added translations & translations fixes 2014-03-18 02:24:46 +00:00
Adolfo Gómez
bf77ccc2ab Updated to add "about" page (inexistent before) 2014-03-18 02:09:21 +00:00
Adolfo Gómez
3afb36678c Fixed base html5 to reduce generated javascripts cache so downloads are faster.
Basically has created "common" compress and "custom" compress, for each page.

This way, browsers can cache "partial static" contents and browsing is faster
2014-03-18 01:14:43 +00:00
Adolfo Gómez
bf66bb1009 Fixed authenticators details tab change bug 2014-03-18 00:52:51 +00:00
Adolfo Gómez
366d340fd4 Removed jade test 2014-03-17 15:33:33 +00:00
Adolfo Gómez
095f21204d Fixed up new generated coffescript 2014-03-17 15:27:32 +00:00
Adolfo Gómez
5f329552af Moved old transformer js to coffescript into "old-js" folder for reference/bug fixing
Will remove in a future also this folder
2014-03-17 14:29:31 +00:00
Adolfo Gómez
3c248428eb moving away old js 2014-03-17 14:27:38 +00:00
Adolfo Gómez
7a0465fca5 Updated admin script to use coffescript instead of directly javascript 2014-03-17 14:26:07 +00:00
Adolfo Gómez
a1e5a1357a Added lesscss support for compressor 2014-03-09 17:38:18 +00:00
Adolfo Gómez
3094000c11 Fixed some tranlations to spanish
fixed some ugettext for ugettext_lazy
2014-03-07 10:28:25 +00:00
Adolfo Gómez
e05ae6e3eb fixed user services states strings 2014-03-07 10:05:06 +00:00
Adolfo Gómez
1189554a20 More fixes related to unicode full transition 2014-03-07 07:07:50 +00:00
Adolfo Gómez
7df74d264c Fixed linux os manager 2014-03-07 07:04:22 +00:00
Adolfo Gómez
41fba86f93 Fixed a little bug on form creation 2014-03-07 06:35:45 +00:00
Adolfo Gómez
55ce029b68 Fixed default sample settings with compressor 2014-03-07 06:13:10 +00:00
Adolfo Gómez
44007d311c Fixed template & added new view to serve "generic image" for service.
This way, we will not need to change the view on next release when "Custom" images can be added to services...
2014-03-03 05:31:40 +00:00
Adolfo Gómez
b2e16bd2e8 Now deletes correctly assigned services & cache 2014-02-28 14:23:45 +00:00
Adolfo Gómez
d943252a40 Now deletes correctly assigned services & cache 2014-02-28 13:57:08 +00:00
Adolfo Gómez
e7695f360e Fixing up things 2014-02-28 06:35:42 +00:00
Adolfo Gómez
72c9d27686 * Added auto-refresh on tab change
* Fixed "publish on save"
Several fixes
2014-02-28 06:29:27 +00:00
Adolfo Gómez
feccd388c4 Fixing up things 2014-02-28 04:49:04 +00:00
Adolfo Gómez
46af1b57dd Fixing up fixes 2014-02-27 13:10:38 +00:00
Adolfo Gómez
ddbcc5aec4 BIG work on pep8 adaption (easier to read, easier to maintain, etc..) 2014-02-25 03:57:29 +00:00
Adolfo Gómez
06ff8e32be BIG work on pep8 adaption (easier to read, easier to maintain, etc..) 2014-02-25 03:12:00 +00:00
Adolfo Gómez
89addaf585 More pep8 related fixes, also some refactoring 2014-02-19 15:17:55 +00:00
Adolfo Gómez
dab3e26223 Fixing up things to adapt to PEP8 2014-02-19 14:55:27 +00:00
Adolfo Gómez
72456baa8e fixed checkbox "beautifier" 2014-02-12 13:34:58 +00:00
Adolfo Gómez
6f4eca7da3 Fixed Service Pool removal from web interface 2014-02-11 18:35:37 +00:00
Adolfo Gómez
26c6ffdc8e Fixed more issues with transactions (they must be only where neded, not everywhere as i tried to "adapt" before...) 2014-02-11 11:34:47 +00:00
Adolfo Gómez
2fb857a870 Removed unnecesary binary (jar) from repository (created from jardesc file automatically) 2014-02-07 08:53:50 +00:00
Adolfo Gómez
d7219fcafc Removed unnecesary binary (jar) from repository (created from jardesc file automatically) 2014-02-07 08:52:22 +00:00
Adolfo Gómez
001cd91bf7 Removed unnecesary binary (jar) from repository (created from jardesc file automatically) 2014-02-07 08:50:16 +00:00
Adolfo Gómez
1f737a0f4e Removed unnecesary binary (jar) from repository (created from jardesc file automatically) 2014-02-07 08:49:28 +00:00
Adolfo Gómez
4f6071ddf8 Removed unnecesary binary (jar) from repository (created from jardesc file automatically) 2014-02-07 08:45:39 +00:00
Adolfo Gómez
c33d469304 Removed unnecesary binary (jar) from repository (created from jardesc file automatically) 2014-02-07 08:41:55 +00:00
Adolfo Gómez
e335fa88fa * Updated translations (still has work to be done)
* Almost finished aministration interface (needs "removing" cache & assigned, and a few more things)
2014-02-05 10:47:10 +00:00
Adolfo Gómez
83b8c474bd Adding "new group" functional form 2014-02-04 09:43:53 +00:00
Adolfo Gómez
b0756d8e3e Updated user services 2014-02-03 10:06:15 +00:00
Adolfo Gómez
03feee9ebc Updated to org.glyptodon.... 2014-01-30 06:45:17 +00:00
Adolfo Gómez
0304762fce Updated switches 2014-01-29 10:47:59 +00:00
Adolfo Gómez
93075e2cc3 Can create new services pools, needs more work on this anyway 2014-01-29 10:18:53 +00:00
Adolfo Gómez
3e036adbca 2014-01-29 07:24:30 +00:00
Adolfo Gómez
81439890e1 Added graphs for in use & assigned services 2014-01-28 10:02:32 +00:00
Adolfo Gómez
dcab2e120b Adding flot charts to administration 2014-01-28 09:29:16 +00:00
Adolfo Gómez
3bc044518f Adding first stats to admin interface 2014-01-28 06:59:45 +00:00
Adolfo Gómez
0a477cae68 aa 2014-01-28 06:28:00 +00:00
Adolfo Gómez
8a9f32dd03 Updated dashboared 2014-01-28 06:07:58 +00:00
Adolfo Gómez
0d3a724ab8 Advancing on admin interface 2014-01-27 06:57:42 +00:00
Adolfo Gómez
1e74a82a40 Configuration can now be saved 2014-01-25 10:58:53 +00:00
Adolfo Gómez
a50e1ecca8 Added configuration var editing to web admin (not saving right now) 2014-01-25 10:20:02 +00:00
Adolfo Gómez
5f99877bf7 Updated migration 18 (fixed) 2014-01-23 16:18:47 +00:00
Adolfo Gómez
3ad2a84d55 changed security var "allow web access" to a simpler one that can easily be used from command line 2014-01-23 06:01:29 +00:00
Adolfo Gómez
f5b4dd2ea6 Added loging capability from web to root user 2014-01-22 09:06:03 +00:00
Adolfo Gómez
e639911b38 * Added migration for moving "security" settings to "security" tab
* Fixed encryption (utf-8 related, not important)
2014-01-22 07:08:24 +00:00
Adolfo Gómez
ba1927b0fc Fixed a couple bugs on rest when running under apache 2014-01-21 09:19:59 +00:00
Adolfo Gómez
8ed7bd1cc0 Added "publish" method to publications, client && server part
Added "custom_methods" to detail handlers
2014-01-20 09:38:24 +00:00
Adolfo Gómez
cfc2dbb49e web admin interface progress 2014-01-15 06:29:20 +00:00
Adolfo Gómez
3b570f86df Fixed date columns sorting (marked as "uds-date" type, and made custom sorting methods for datatable) 2013-12-17 10:03:51 +00:00
Adolfo Gómez
edc03f4e7e Added logs
Added "restrained" info to services pool list
2013-12-17 09:28:36 +00:00
Adolfo Gómez
bf3dd99b63 Found a much better name for "Deployed Services", that is "Services Pools" (much accord with other VDI implementations, after almost 9 years of using a "custom" name ;-))
Advancing (a lot) with "Services pools"
2013-12-17 07:23:10 +00:00
Adolfo Gómez
363f8939d9 Advancing on deployed services 2013-12-16 09:27:57 +00:00
Adolfo Gómez
e925a2a356 Added support for custom "single" button to gui tables 2013-12-14 02:37:11 +00:00
Adolfo Gómez
53258f2d7b Fixed max services limited to 100 2013-12-13 15:16:51 +00:00
Adolfo Gómez
77127664af Added some more info to providers && services 2013-12-13 09:51:55 +00:00
Adolfo Gómez
2b7ad74f2f Started deployed services part 2013-12-13 01:15:25 +00:00
Adolfo Gómez
3cae37ca5c Keep solving some issues with new transaction.atomic 2013-12-12 20:59:09 +00:00
Adolfo Gómez
dbc001ea22 Added network edition (easy also.... :-) ) 2013-12-12 07:23:22 +00:00
Adolfo Gómez
895ef25b77 Basic transport new/edit done (easy this time, using all previous work... :-) ) 2013-12-11 22:59:26 +00:00
Adolfo Gómez
453be53125 Added all resources used in administration to admin (even duplicating them), to get full independence from User Interface 2013-12-11 21:59:48 +00:00
Adolfo Gómez
71d0cbaf8c 2013-12-11 09:59:48 +00:00
Adolfo Gómez
48dcd97f5c * Fixed another bug introduced with new transactions on Django 1.6
* Added all used js, even if duplicated, to "admin" so we do not depend on externals js
2013-12-11 09:59:17 +00:00
Adolfo Gómez
3c956e94df * Fixed dropdown to include icons (for "new")
* Added Os managers (client & server)
2013-12-10 23:21:29 +00:00
Adolfo Gómez
49dc0eb0c2 Finished Groups, and authenticators (hopefully.... :P) 2013-12-10 21:48:09 +00:00
Adolfo Gómez
de68a0cada Added group edition 2013-12-10 21:12:50 +00:00
Adolfo Gómez
a0ca068f54 Updated user & group form to be more consistent with editions 2013-12-10 19:52:47 +00:00
Adolfo Gómez
fb1a367e93 * Fixed current authenticators to use "real_name" instead of realName in createuser && modifyuser
* Finished (hopefully) Users add/edit
2013-12-10 03:16:58 +00:00
Adolfo Gómez
75a7a787b9 Updated "New" button with dropdown to a much better one 2013-12-10 00:14:34 +00:00
Adolfo Gómez
6676c62120 Advanced a lot with users part 2013-12-09 04:35:05 +00:00
Adolfo Gómez
db29667f4c Edit users done. I'll update the form, because now we can add all fields to 1 single tab 2013-12-09 02:10:55 +00:00
Adolfo Gómez
b3c6e46f0b * Fixed single user item get method in REST api
* Fixed single group item get method in REST api
* Divided gui-definition in several .js so it is more manageable
* Added method to convert several types on serialization to a more "standard" form
* Updated translations
2013-12-08 19:45:19 +00:00
Adolfo Gómez
828247831b 2013-12-08 07:31:00 +00:00
Adolfo Gómez
f3e7ec3be9 2013-12-08 07:22:16 +00:00
Adolfo Gómez
b9aff159d8 Improved Service providers section over administration client implementation. js now shows logs for providers & for services 2013-12-08 06:41:57 +00:00
Adolfo Gómez
744515f11f A little more organization 2013-12-08 04:41:52 +00:00
Adolfo Gómez
6eccaa9ddf Providers parts seems to be finished 2013-12-07 21:26:40 +00:00
Adolfo Gómez
52a8021e9d * Updated java detector plugin. Now it will not load ".jar" on loggin screen on some browsers (such as IE 11)
* Updated os detector to detect Windows Phone
2013-12-06 18:56:01 +00:00
Adolfo Gómez
735175badb * Fixed admin memory leak due to TableTools (fixed on section change in fact, removing all TableTools internal data)
* Fixed a bug with transactions on UserServiceManager
Now admin seems to work with stable memory... :-)
2013-12-06 18:45:36 +00:00
Adolfo Gómez
e071a1afbc Advancing on test buttons 2013-12-06 03:23:08 +00:00
Adolfo Gómez
c29e2d4dcb Adding the posibility to include custom buttons on modal footers, so we can for example add "test" buttons wherever they are needed 2013-12-05 05:34:35 +00:00
Adolfo Gómez
f5e5d88973 Improved js memory usage by deleting all datatables keep info on "page change" inside dashboard. This is not really necesary, because we have a limited number of different tables, but if we cleans up, memory comsumption will be lowered 2013-12-04 05:00:38 +00:00
Adolfo Gómez
64382b5afe * Added cache flush functionality to dashboard
* added rest method to flush cache
* Fixed tabletools "stuff" left behind, removing all this on any "main link" click
2013-12-04 04:12:06 +00:00
Adolfo Gómez
732840df42 Added choices & multichoices 2013-12-04 03:03:07 +00:00
Adolfo Gómez
61c9f4f975 Implemented callbacks for gui "fillers", that is, choices that calls server for information about how to fill other fields with returned values... 2013-12-04 01:57:33 +00:00
Adolfo Gómez
36bdbbfd37 * Added a few more tables to innodb, that will not impact access to platform 2013-12-03 18:17:03 +00:00
Adolfo Gómez
a6b3462748 * Fixed a bug with new transactions
* Added a few tables to innodb model
2013-12-03 18:12:49 +00:00
Adolfo Gómez
dcfee55122 * Editlist control finished
* fixed REST service put method
2013-12-03 04:26:23 +00:00
Adolfo Gómez
3c7a0b82d7 Updated DinamycFieldsManager to get new "EditList" format (as simple list)
Updated to be version 1.4

There is intention to remove this administration client once the Web admin interface is finished & usable. Probable, half of 2013 this admin interface will be removed and will only keep the "Web version"
2013-12-02 18:21:40 +00:00
Adolfo Gómez
ad69d8fa6c * Fixed a bug that makes all Instances of a specific "UserInterface" to share same "instance fields". This could be a problem if two access are done simultaneously (for example, 2 services of same type, or two authenticators of same class). Now every new "object" has its own UserInterface objects
* Changed the way the "EditList" are returned, now they are "lists", not "choices"

As always, a bit of refactoring
2013-12-02 18:01:12 +00:00
Adolfo Gómez
3ec517c90f 2013-12-02 15:17:01 +00:00
Adolfo Gómez
888f125dc6 Finished based model/detail methods 2013-12-02 03:43:17 +00:00
Adolfo Gómez
043b28cfb4 Advancing on table/model editing
More refactoring of code
2013-11-29 00:55:04 +00:00
Adolfo Gómez
c98e964bba Refactorized REST api (server) to be much more "coherent". URLs are much more coherent, we have fewer handlers to implement on models, fixed to register correctly methods, even when deriving from Handler, etc...
This gives better options to implement handlers based on models also
2013-11-28 11:55:40 +00:00
Adolfo Gómez
7ea7086ba9 * Implemented services REST part
* Added possibility of creating own types for DetailApi (useful for provicers/services, where services is a detail but also has types)
More refactoring
2013-11-27 11:14:53 +00:00
Adolfo Gómez
d46400c1f7 Done multi tab forms
Advancing on Transport new/edit (this & network will server as base for other tabs)
2013-11-27 00:41:03 +00:00
Adolfo Gómez
fa2335efd4 * Finished create/edit methods
* Added delete method
* a little more refactoring ( ofc :-) )
Need to debug a bit more this, and probably make some adaptions for models that do not serializes objects
2013-11-26 03:42:46 +00:00
Adolfo Gómez
63da672f30 * Adapted transactions on db to new django 1.6 model, much more versatile.
Removed all "autocommit, commit_on_success and commit_manually", and replaced with "transaction.atomic" calls. Of course, with code refinement in some parts to adapt to this new situation

* Added Changing Some table types from MyISAM to Mysql after migrations are done ALWAYS. This is not too slow, and will ensure that the database supports transactions where they are needed
2013-11-25 17:34:13 +00:00
Adolfo Gómez
8c04c88d86 A bit of refactoring with api, gui, etc...
solved some problems with PUT methods (need to solve a few ones anyway)
Create authenticator now works, but needs more elaboration
lots of changes i event remember.. :-)
2013-11-25 03:01:58 +00:00
Adolfo Gómez
a52e8dc548 * Added form validations (more work will be needed probably for numerics for example) 2013-11-23 22:39:07 +00:00
Adolfo Gómez
b7bfecf87c * Fixed Datatables tools width
* Refactoring of API (again...)
2013-11-22 11:33:54 +00:00
Adolfo Gómez
ceecb0823d Fixed read only "generic model editing" properties.
Also forgot in previous commits, i changed the template engine to Handlebars. Its much "versatile", and we need a bit of flexibility (such as conditionals, loops, etc...)
2013-11-22 02:33:06 +00:00
Adolfo Gómez
de4a9ff291 Advanced a lot with "generic model editing" 2013-11-22 02:22:41 +00:00
Adolfo Gómez
004e060aaf * Added modal to gui
* Advanced a bit with edition of components
2013-11-21 13:19:13 +00:00
Adolfo Gómez
127c36f364 * Added template "preload" ability
* Added caching templates as "compiled" templates
* moved table description panel to template
2013-11-21 11:01:30 +00:00
Adolfo Gómez
dbd4531376 Better pannels 2013-11-21 02:22:41 +00:00
Adolfo Gómez
17b20ab684 A cuople more fixes && refactoring 2013-11-20 11:31:23 +00:00
Adolfo Gómez
4b2eae58b1 Added gui basic elements
refactoring of existint javascript
translations of buttons moved to better place
added css class that will made button text dissapear for smaller displays
2013-11-20 11:09:30 +00:00
Adolfo Gómez
6144eb2f6a Fixing some js, started form renterer 2013-11-20 09:14:27 +00:00
Adolfo Gómez
2bf0c3e59a * Fixed a bunch of javascript things
* Added "gui" method to api, so we can get a description of what fields are needed for an specific item.
Added REST capacity to process gui requests
Updated translations
2013-11-20 03:16:56 +00:00
Adolfo Gómez
805b225552 I had 3d buttons not working (clicks events not fired). After a while of looking for why, i realized that in fact the button was moving, and the event was not fired sometimes for this reason.
So i have created a little "fix" on tools.js, where we use mousedown && mouse up events (on button & parent) to "simulate" a click over an static button.

Also, i have included a way of blocking UI (using jquery.blockUI plugin), so user know when something is going on.. 

hard work resolving the 3d buttons "bug" :-)
2013-11-19 11:26:27 +00:00
Adolfo Gómez
dbb4466c46 Advancing, but have a few probles with "cool 3d buttons". When pressed, many times click event seems not to be fired... O.o 2013-11-19 01:27:47 +00:00
Adolfo Gómez
67a691768e added "cute" 3d buttons :-) 2013-11-18 02:54:05 +00:00
Adolfo Gómez
96937a397c added xls, but i'm going to evolve it fast 2013-11-17 22:48:34 +00:00
Adolfo Gómez
47be643eac * Added responsive tables to admin
* Added language selection over REST API
* Added "renderers" so we can add icons or whatever to cells before rendering
* Lots of improvements
2013-11-17 03:48:05 +00:00
Adolfo Gómez
6bb538d941 * Finished (almost) details of master tables
* Added templating engine based on John Resig - http://ejohn.org/,
* Added capacity to scroll to make tables visible
* Added users detail view for authenticators
* added server template serving
2013-11-15 23:45:05 +00:00
Adolfo Gómez
d2cf0f6846 2013-11-15 21:14:46 +00:00
Adolfo Gómez
2615b5fca4 Added "details" to REST for children of certain elements (such as authenticators-->users, user services --> publications, cache, assignations, groups, transports, etc... 2013-11-15 16:04:51 +00:00
Adolfo Gómez
bf83de2f5e * Web Admin work
* Improved visualization & use of Generic Table for data visualization
2013-11-15 14:02:53 +00:00
Adolfo Gómez
e59ac8078d 2013-11-15 10:33:51 +00:00
Adolfo Gómez
caf250daa3 2013-11-15 10:33:21 +00:00
Adolfo Gómez
841580afda 2013-11-15 10:32:49 +00:00
Adolfo Gómez
0a0772a7c6 Advancing admin (in fact already playing around with components, but made some advances.. :-) ) 2013-11-14 17:02:30 +00:00
Adolfo Gómez
d68822eaf7 Advancing with very basic aspects of administration/REST api 2013-11-14 11:17:07 +00:00
Adolfo Gómez
6e0511add3 Updated checkbrowser to recognize ie, new ie (11), opera, safari, firefox & webkit based browsers 2013-11-13 22:52:14 +00:00
Adolfo Gómez
ae9f3c7e78 Some translations, and javascript catalog fixed so it gets correctly generated on each lang (and do not caches it) 2013-11-13 19:00:19 +00:00
Adolfo Gómez
89d27cbcd5 Playing around with administration interface, selecting components that seems to match what i'm looking for... :-) 2013-11-13 17:21:48 +00:00
Adolfo Gómez
59e9f65241 2013-11-12 01:10:03 +00:00
Adolfo Gómez
81d64162f4 Start the work over admin interface (Dashboard) in parallel with REST api 2013-11-12 01:09:17 +00:00
Adolfo Gómez
495ab90cc2 * Updated to django 1.6
* Ensured that, an user when has logged in from interface, has access to REST
The access will be restricted by user permissions of course (this is, simple user will have access to its services, preferences and little more... :-)) This part anyway, is not done yet
2013-11-11 20:08:23 +00:00
Adolfo Gómez
47dff34637 Started a REST api for UDS.
The idea is provide third party access to UDS, and try to use this as an starting point to make an web based administration, so we can deprecate .net administration tool (it is becoming an annoyance... :-) ), and web based admin is always more accesible than thin client admin
2013-11-11 19:38:23 +00:00
Adolfo Gómez
918259079a Some characters cause troubles on some devices (tablets, mobiles, ..) so we have removed anything outside ASCII 2013-11-11 00:12:39 +00:00
Adolfo Gómez
2bda255c2a * added popover on small names
* moved deployed services names under lauchn button
2013-11-09 09:11:15 +00:00
Adolfo Gómez
bfed62d833 * Basic htm5 template done
* Updated translations & texts
2013-11-08 14:40:52 +00:00
Adolfo Gómez
2b68a119e1 * Basic htm5 template done
* Updated translations & texts
2013-11-08 14:11:45 +00:00
Adolfo Gómez
7bbf86117b Updated templates, and started to simplify templates structure 2013-11-08 13:33:17 +00:00
Adolfo Gómez
aa2e532843 Advancing on html5 basic theme 2013-11-08 12:18:10 +00:00
Adolfo Gómez
fcc7bffb2e Advancing on html5 basic theme 2013-11-08 12:17:51 +00:00
Adolfo Gómez
b5aa6cd4b8 2013-11-08 11:31:39 +00:00
Adolfo Gómez
9dd35ebf1e * Fixed Html5RDP (guacamole) transport so it works on iphone/ipad (os now are recognized)
* Added css for using bootstrap on html5 part of UDS
2013-11-08 09:26:11 +00:00
Adolfo Gómez
aba57d8400 * Added support for Android OS
* Updated HTML5 part a bit
* Added printing support for guacamole
2013-11-05 22:00:12 +00:00
Adolfo Gómez
66d56dc6e5 Removed a few icons not used in this implementation 2013-11-05 21:21:03 +00:00
Adolfo Gómez
52c69a3521 After a close look at Guacomole, i noticed that i forgot a lot of things
Basically, i added the scripts, images, etc.. from Guacamole and this started to work fine!!! :-)

I had to fix a few thins that are not uset in this implementation, but not much..

* Added support for remote printing
* Added support for mobile devices
2013-11-05 21:19:15 +00:00
Adolfo Gómez
5fd0436ab6 Fixed a bit login form
trying things with services display
2013-11-05 11:15:42 +00:00
Adolfo Gómez
5cf101d3c8 Advancing on migrationg to HTML5
* Adding themes to UDS
2013-11-05 01:20:39 +00:00
Adolfo Gómez
36429e0443 2013-11-04 16:15:19 +00:00
Adolfo Gómez
e6d7944e2f * Started migration of user interface to HTML5, using bootstrap 2013-11-04 15:59:59 +00:00
Adolfo Gómez
15d7ca7a4b Updated sample settings to include new django var (for wsgi)
Updated NX Transport to show new url for downloading
Updated NX Tunneled Transport to show new url for downloading

Added a new configruation TAB, NX, that allows to change the download urls for MAC and Windows/Linux.
2013-10-18 08:20:48 +00:00
Adolfo Gómez
ea784bfeef Sorted alphabetically Services 2013-10-16 11:45:17 +00:00
Adolfo Gómez
fb463dee73 Updated so fixed credentials are correctly got 2013-10-16 11:32:16 +00:00
Adolfo Gómez
15011dea95 Added applet value to indicate permissions needed by applet 2013-10-16 10:48:01 +00:00
Adolfo Gómez
012dc2792b Updated to include permissions on manifest 2013-10-16 10:44:46 +00:00
Adolfo Gómez
a07e784af1 Updated to include permissions on manifest 2013-10-16 10:44:26 +00:00
Adolfo Gómez
59485e39de Updated to include permissions on manifest 2013-10-16 10:44:07 +00:00
Adolfo Gómez
b79cbcc4e8 Updated to include permissions on manifest 2013-10-16 10:43:28 +00:00
Adolfo Gómez
c7941017b5 Updated jars to include permissions on manifest 2013-10-16 10:43:02 +00:00
Adolfo Gómez
c5b3656d38 Integrated 1.2u1 with audio support selection 2013-10-02 03:05:39 +00:00
Adolfo Gómez
eda93e0be2 * Added by default to ignore certificates to RDP 2013-10-02 02:48:05 +00:00
Adolfo Gómez
53522724b3 * Updated to work with guacamole 0.8.3
* Added sound & video support to guacamole
2013-10-02 02:47:23 +00:00
Adolfo Gómez
a08b114aee Fixed a bug on utf conversión 2013-09-25 08:29:55 +00:00
Adolfo Gómez
79048a4271 Advancing on clustererd services providers 2013-09-20 05:56:43 +00:00
Adolfo Gómez
efb614ff10 Added new possible state for services: Balancing.
This state will only be triggered if a service can't be balanced if it is "in use"
2013-09-17 13:26:44 +00:00
Adolfo Gómez
650c13067d Removed caching of API connections to oVirt. Now it's opened/closed every time needed because this has given some problems.
Anyway, has to implement in a near future using REST a own api, because oVirt API does not work too "fine"
2013-09-17 12:47:15 +00:00
Adolfo Gómez
f220cf3651 * A couple of cosmetic changes :-) 2013-09-11 13:26:31 +00:00
Adolfo Gómez
46990f6b64 * added "extended" log for debug to insert operation into delayed tasks queue
* Created a delayed task thread that, is inserted after a publication is success, to remove "in use machine" after the configured time
* Advancing with clustering control
* Inserted "Cluster" tab into configuration, with required params
* Removed "display" param from ovirt
2013-09-11 13:24:32 +00:00
Adolfo Gómez
50b7a55be5 Started adding Automatic Cluster services support, so we can simplify using services as ProxMox, HyperV, ESXi (without VC), etc... as Providers.
This clusters are special type of providers, where that providers contains several nodes, and do not provide automatic placement of machines, etc...
2013-09-06 12:51:01 +00:00
Adolfo Gómez
81b1646458 Back to work :-)
* Fixed Domain part of credentials for HTML5RDP
* Fixed Domain part of credentials for RDP
* Fixed Domain part of credentials for Tunneler RDP
2013-09-02 10:45:21 +00:00
Adolfo Gómez
8f70298713 Fixed scroll bar not shown correctly on New deployed service, transports tab. 2013-07-09 23:23:29 +00:00
Adolfo Gómez
0b2e38a85d * Fixed a bug on oVirt
* Added devel support for "notify ready from os manager"
2013-07-05 11:06:33 +00:00
Adolfo Gómez
eb9993f607 Added "isDirty" to base module, so we can avoid "serializations" under some circunstances (work in progress, right now this does nothing) 2013-06-27 09:12:53 +00:00
Adolfo Gómez
5dbacb629b A couple of bug fixes on ovirt publication 2013-06-26 11:05:32 +00:00
Adolfo Gómez
c61ee0f72c 2013-06-26 10:15:11 +00:00
Adolfo Gómez
eea75c1736 2013-06-26 10:14:34 +00:00
Adolfo Gómez
0303fbf910 Fixed a possible bug with the use of the IP authenticator. Now it checks that the username "ip" is the same as request.ip 2013-06-25 15:42:05 +00:00
Adolfo Gómez
2cc81d2b8b Fixed a possible bug with the use of the IP authenticator. Now it checks that the username "ip" is the same as request.ip 2013-06-25 15:40:20 +00:00
1910 changed files with 171015 additions and 218345 deletions

166
.gitignore vendored Normal file
View File

@@ -0,0 +1,166 @@
*.pyc
*.pyo
*.orig
*~
*.swp
.DS_Store
*_enterprise.*
.settings/
.ipynb_checkpoints
# Debian buildings
*.debhelper*
*-stamp
*.substvars
# /client/administration/
/client/administration/*.suo
# /client/administration/UdsAdmin/
/client/administration/UdsAdmin/*.user
# /client/administration/UdsAdmin/bin/
/client/administration/UdsAdmin/bin/Debug
/client/administration/UdsAdmin/bin/Release
# /client/administration/UdsAdmin/obj/x86/
/client/administration/UdsAdmin/obj/x86/Debug
/client/administration/UdsAdmin/obj/x86/Release
# /client/administration/installer/UDSAdminInstaller/
/client/administration/installer/UDSAdminInstaller/MSChart.exe
/client/administration/installer/UDSAdminInstaller/UDSAdminSetup.exe
# /guacamole-tunnel/
/guacamole-tunnel/target
# /linuxActor/
/linuxActor/udsactor_*
# /linuxActor/src/debian/
/linuxActor/src/debian/udsactor
# /linuxActorNX/
/linuxActorNX/udsactor-nx_*
# /linuxActorNX/src/debian/
/linuxActorNX/src/debian/udsactor-nx
# /linuxActorXRDP/
/linuxActorXRDP/udsactor-xrdp_*
# /linuxActorXRDP/src/debian/
/linuxActorXRDP/src/debian/udsactor-xrdp
# /nxtransport/jar/
/nxtransport/jar/*.sh
/nxtransport/jar/*.jar
# /nxtuntransport/jar/
/nxtuntransport/jar/*.sh
/nxtuntransport/jar/*.jar
# /rdptransport/java/jar/
/rdptransport/java/jar/*.sh
/rdptransport/java/jar/*.jar
# /server/
*_enterprise
/server/openuds.sublime-project
/server/openuds.sublime-workspace
# /server/src/
/server/src/taskmanager.pid
/server/src/testing
/server/src/*_enterprise*
# /server/src/log/
/server/src/log/uds.log.*
/server/src/log/sql.log.*
/server/src/log/*.log.*
# /server/src/server/
/server/src/server/settings.py
/server/src/server/*_enterprise.py
/server/src/server/enterprise*
# /server/src/static/
/server/src/static/cache
# /server/src/uds/
/server/src/uds/*_enterprise.py
/server/src/uds/fixtures
/server/src/uds/tests
# /server/src/uds/auths/
/server/src/uds/auths/*-enterprise
/server/src/uds/auths/*_enterprise
# /server/src/uds/core/util/
/server/src/uds/core/util/*enterprise.py
# /server/src/uds/dispatchers/
/server/src/uds/dispatchers/*_enterprise
# /server/src/uds/locale/
/server/src/uds/locale/*.sh
# /server/src/uds/management/commands/
/server/src/uds/management/commands/*_enterprise.py
# /server/src/uds/models/
/server/src/uds/models/enterprise*
# /server/src/uds/plugins/
/server/src/uds/plugins/enterprise*
# /server/src/uds/services/
/server/src/uds/services/*-enterprise
/server/src/uds/services/*_enterprise
# /server/src/uds/static/adm/css/
/server/src/uds/static/adm/css/admin.min.css
# /server/src/uds/static/adm/js/
/server/src/uds/static/adm/js/admin.min.js
# /server/src/uds/templates/uds/admin/
/server/src/uds/templates/uds/admin/sample.html
# /server/src/uds/transports/
/server/src/uds/transports/*-enterprise
# /udsService/
/udsService/*.suo
# /udsService/installer/
/udsService/installer/UDSActorSetup.exe
# /udsService/rpc/bin/
/udsService/rpc/bin/Debug
/udsService/rpc/bin/Release
/udsService/rpc/bin/x86
# /udsService/rpc/obj/
/udsService/rpc/obj/Debug
/udsService/rpc/obj/Release
/udsService/rpc/obj/x86
# /udsService/udsService/bin/
/udsService/udsService/bin/Debug
/udsService/udsService/bin/Release
/udsService/udsService/bin/x64
# /udsService/udsService/obj/
/udsService/udsService/obj/x64
/udsService/udsService/obj/x86
# /udsService/udsgui/bin/
/udsService/udsgui/bin/Debug
/udsService/udsgui/bin/Release
/udsService/udsgui/bin/x86
# /udsService/udsgui/obj/
/udsService/udsgui/obj/Debug
/udsService/udsgui/obj/Release
/udsService/udsgui/obj/x86

7
README.md Normal file
View File

@@ -0,0 +1,7 @@
![UDS Logo](https://www.udsenterprise.com/static//img/logoUDSNav.png)
openuds
=======
OpenUDS Is an Open Source Source project, initiated by Spanish Company Virtualcable and released Open Source with the help of several Spanish Universities.

6
TODO.txt Normal file
View File

@@ -0,0 +1,6 @@
* Add "Scheduler" to manage pools, and posibbly other operations (Expect to release an version 1.7.1??)
* Improve stats
* Add App Virtualization support
* Add "Meta Pools"
* Manage to connect several UDS in "tree", so one UDS can be provider o another UDS

1
VERSION Normal file
View File

@@ -0,0 +1 @@
2.0.0

8
actors/.gitignore vendored Normal file
View File

@@ -0,0 +1,8 @@
bin
*_enterprise*
udsactor*.deb
udsactor*.build
udsactor*.changes
/udsactor_1.7.0.dsc
/udsactor_1.7.0.tar.xz
/udsactor*.rpm

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>linuxActor</name>
<name>actors</name>
<comment></comment>
<projects>
</projects>

View File

@@ -1,10 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?>
<pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">python2.6</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.6</pydev_property>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/linuxActor/src</path>
<path>/${PROJECT_DIR_NAME}/src</path>
</pydev_pathproperty>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
</pydev_project>

1
actors/linux/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/udsactor-*[1-9].*.spec

96
actors/linux/Makefile Normal file
View File

@@ -0,0 +1,96 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Directories
SOURCEDIR := ../src
LIBDIR := $(DESTDIR)/usr/share/UDSActor
BINDIR := $(DESTDIR)/usr/bin
SBINDIR = $(DESTDIR)/usr/sbin
APPSDIR := $(DESTDIR)/usr/share/applications
CFGDIR := $(DESTDIR)/etc/udsactor
INITDIR := $(DESTDIR)/etc/init.d
POLKITDIR := $(DESTDIR)/usr/share/polkit-1/actions/
XDGAUTOSTARTDIR := $(DESTDIR)/etc/xdg/autostart
KDEAUTOSTARTDIR := $(DESTDIR)/usr/share/autostart
PYC := $(shell find $(SOURCEDIR) -name '*.py[co]')
CACHES := $(shell find $(SOURCEDIR) -name '__pycache__')
clean:
rm -rf $(PYC) $(CACHES) $(DESTDIR)
install-udsactor-xrdp:
mkdir -p $(BINDIR)
cp scripts/uds-sesman.sh $(BINDIR)/uds-sesman
cp scripts/uds-wait-session.sh $(BINDIR)/uds-wait-session
chmod 0755 $(BINDIR)/uds-sesman
chmod 0755 $(BINDIR)/uds-wait-session
install-udsactor-nx:
mkdir -p $(BINDIR)
cp scripts/udsnxstart.sh $(BINDIR)/udsnxstart
cp scripts/udsnxstop.sh $(BINDIR)/udsnxstop
chmod 0755 $(BINDIR)/udsnxstart
chmod 0755 $(BINDIR)/udsnxstop
install-udsactor:
rm -rf $(DESTDIR)
mkdir -p $(LIBDIR)
mkdir -p $(BINDIR)
mkdir -p $(SBINDIR)
mkdir -p $(APPSDIR)
mkdir -p $(CFGDIR)
mkdir -p $(POLKITDIR)
mkdir -p $(XDGAUTOSTARTDIR)
mkdir -p $(KDEAUTOSTARTDIR)
mkdir $(LIBDIR)/img
# Cleans up .pyc and cache folders
rm -f $(PYC) $(CACHES)
cp -r $(SOURCEDIR)/udsactor $(LIBDIR)/udsactor
cp $(SOURCEDIR)/img/uds.png $(LIBDIR)/img
cp $(SOURCEDIR)/UDSActorConfig.py $(LIBDIR)
cp $(SOURCEDIR)/UDSActorUser.py $(LIBDIR)
# QT Dialogs & resources
cp $(SOURCEDIR)/*_ui.py $(LIBDIR)
cp $(SOURCEDIR)/UDSActor_rc.py $(LIBDIR)
# Menu GUI app
cp desktop/UDS_Actor_Configuration.desktop $(APPSDIR)
# Autostart elements for gnome/kde
cp desktop/UDSActorTool.desktop $(XDGAUTOSTARTDIR)
cp desktop/UDSActorTool.desktop $(KDEAUTOSTARTDIR)
# scripts
cp scripts/udsactor $(BINDIR)
cp scripts/UDSActorConfig-pkexec $(SBINDIR)
cp scripts/UDSActorTool-startup $(BINDIR)
# Policy to run as administrator
cp policy/org.openuds.pkexec.UDSActorConfig.policy $(POLKITDIR)
# Fix permissions
chmod 755 $(BINDIR)/udsactor
chmod 755 $(BINDIR)/UDSActorTool-startup
chmod 755 $(SBINDIR)/UDSActorConfig-pkexec
chmod 755 $(LIBDIR)/UDSActorConfig.py
chmod 755 $(LIBDIR)/UDSActorUser.py
chmod 644 $(POLKITDIR)/org.openuds.pkexec.UDSActorConfig.policy
# If for red hat based, copy init.d
ifeq ($(DISTRO),rh)
mkdir -p $(INITDIR)
cp debian/udsactor.init $(INITDIR)/udsactor
ln -s /usr/share/UDSActor/UDSActorConfig.py $(SBINDIR)/UDSActorConfig
ln -s /usr/share/UDSActor/UDSActorUser.py $(BINDIR)/UDSActorTool
endif
# chmod 0755 $(BINDIR)/udsactor
uninstall:
rm -rf $(LIBDIR)
# rm -f $(BINDIR)/udsactor
rm -rf $(CFGDIR)

34
actors/linux/build-packages.sh Executable file
View File

@@ -0,0 +1,34 @@
#!/bin/bash
VERSION=`cat ../../VERSION`
RELEASE=1
top=`pwd`
# Debian based
dpkg-buildpackage -b
cat udsactor-template.spec |
sed -e s/"version 0.0.0"/"version ${VERSION}"/g |
sed -e s/"release 1"/"release ${RELEASE}"/g > udsactor-$VERSION.spec
# Now fix dependencies for opensuse
cat udsactor-template.spec |
sed -e s/"version 0.0.0"/"version ${VERSION}"/g |
sed -e s/"name udsactor"/"name udsactor-opensuse"/g |
sed -e s/"PyQt4"/"python-qt4"/g |
sed -e s/"libXScrnSaver"/"libXss1"/g > udsactor-opensuse-$VERSION.spec
# Right now, udsactor-xrdp-1.7.0.spec is not needed
for pkg in udsactor-$VERSION.spec udsactor-opensuse-$VERSION.spec; do
rm -rf rpm
for folder in SOURCES BUILD RPMS SPECS SRPMS; do
mkdir -p rpm/$folder
done
rpmbuild -v -bb --clean --buildroot=$top/rpm/BUILD/$pkg-root --target noarch $pkg 2>&1
done
#rm udsactor-$VERSION

3
actors/linux/debian/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
/udsactor/
/udsactor-xrdp/
/udsactor-nx/

View File

@@ -0,0 +1,29 @@
udsactor (2.0.0) stable; urgency=medium
* Upgrade for 2.0.0
-- Adolfo Gómez García <agomez@virtualcable.es> Tue, 01 Mar 2016 03:39:21 +0100
udsactor (1.9.1) stable; urgency=medium
* Upgrade for 1.9.1
-- Adolfo Gómez García <agomez@virtualcable.es> Tue, 01 Mar 2016 03:19:21 +0100
udsactor (1.9.0) stable; urgency=medium
* Upgrade for 1.9.0 (fixed package version)
-- Adolfo Gómez García <agomez@virtualcable.es> Tue, 05 May 2015 07:10:27 +0200
udsactor (1.7.5) stable; urgency=medium
* Upgrade for 1.7.5
-- Adolfo Gómez García <agomez@virtualcable.es> Thu, 23 Apr 2015 06:08:53 +0200
udsactor (1.7.0) stable; urgency=medium
* Initial release.
-- Adolfo Gómez García <agomez@virtualcable.es> Mon, 17 Nov 2014 05:32:41 +0100

View File

@@ -0,0 +1 @@
9

View File

@@ -0,0 +1,31 @@
Source: udsactor
Section: admin
Priority: optional
Maintainer: Adolfo Gómez García <agomez@virtualcable.es>
Build-Depends: debhelper (>= 7), po-debconf
Standards-Version: 3.9.2
Homepage: http://www.virtualcable.es
Package: udsactor
Section: admin
Priority: optional
Architecture: all
Depends: policykit-1(>=0.100), python-requests (>=0.8.2), python-qt4 (>=4.9), python-six(>=1.1), python-prctl(>=1.1.1), python (>=2.7), libxss1, ${misc:Depends}
Description: Actor for Universal Desktop Services (UDS) Broker
This package provides the required components to allow this machine to work on an environment managed by UDS Broker.
Package: udsactor-xrdp
Section: x11
Priority: optional
Architecture: all
Depends: xrdp (>= 0.5.0), udsactor (>= ${binary:Version}), libpam-modules-bin (>=1.0), ${misc:Depends}
Description: UDS Actor component for xrdp
This package provides connection between uds actor and xrdp
Package: udsactor-nx
Section: x11
Priority: optional
Architecture: all
Depends: nxnode (>= 3.5.0), udsactor (>= ${binary:Version}), ${misc:Depends}
Description: UDS Actor component for nx
This package provides connection between uds actor and nx

View File

@@ -1,10 +1,10 @@
Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
Name: udsactor
Maintainer: Adolfo Gómez García
Source: http://www.virtualcable.es/
Source: http://www.udsenterprise.com/
Copyright: 2010 Virtual Cable S.L.
License: GPL-2+
Copyright: 2014 Virtual Cable S.L.U.
License: BSD-3-clause
License: GPL-2+
This program is free software; you can redistribute it and/or modify

View File

@@ -0,0 +1,3 @@
udsactor-nx_2.0.0_all.deb x11 optional
udsactor-xrdp_2.0.0_all.deb x11 optional
udsactor_2.0.0_all.deb admin optional

View File

@@ -21,7 +21,9 @@ install: build
dh_testroot
dh_prep
dh_installdirs
$(MAKE) DESTDIR=$(CURDIR)/debian/udsactor-nx install
$(MAKE) DESTDIR=$(CURDIR)/debian/udsactor install-udsactor
$(MAKE) DESTDIR=$(CURDIR)/debian/udsactor-xrdp install-udsactor-xrdp
$(MAKE) DESTDIR=$(CURDIR)/debian/udsactor-nx install-udsactor-nx
binary-arch: build install
# emptyness
binary-indep: build install
@@ -29,6 +31,9 @@ binary-indep: build install
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installdebconf
dh_installinit --no-start
dh_python2=python
dh_compress
dh_link
dh_fixperms

View File

@@ -0,0 +1 @@
3.0 (native)

View File

@@ -10,11 +10,13 @@ case "$1" in
purge)
;;
remove)
TMPFILE=$(mktemp /tmp/node.cfg.XXXXX)
trap "rm -f $TMPFILE" 0
cat $NXNODECFG | sed -e "s/.*udsnxst.*//" > $TMPFILE
cp $TMPFILE $NXNODECFG
invoke-rc.d nxserver restart
if [ -f $NXNODECFG ]; then
TMPFILE=$(mktemp /tmp/node.cfg.XXXXX)
trap "rm -f $TMPFILE" 0
cat $NXNODECFG | sed -e "s/.*udsnxst.*//" > $TMPFILE
cp $TMPFILE $NXNODECFG
invoke-rc.d nxserver restart
fi
;;
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;

View File

@@ -0,0 +1,39 @@
#!/bin/sh
SESMANFILE=/etc/pam.d/xrdp-sesman
. /usr/share/debconf/confmodule
set -e
case "$1" in
configure)
trap "cp $SESMANFILE $SESMANFILE.uds.old" 0
TMPFILE=$(mktemp /tmp/sesman.XXXXX)
trap "rm -f $TMPFILE" 0
grep -v uds $SESMANFILE > $TMPFILE # Removes all UDS lines from sesman if they exists
echo >> $TMPFILE
echo "# Added by udsactor-xrdp" >> $TMPFILE
echo "session optional pam_exec.so /usr/bin/uds-sesman" >> $TMPFILE
cp $TMPFILE $SESMANFILE
trap "rm -f $TMPFILE" 0
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
# Don't know why, but descriptors get "weird" when launched daemon, so we tell here to debconf to stop.
# Solved not starting the service right now, defered to next reboot
exit 0

View File

@@ -0,0 +1,30 @@
#!/bin/sh -e
SESMANFILE=/etc/pam.d/xrdp-sesman
. /usr/share/debconf/confmodule
set -e
case "$1" in
purge)
;;
remove)
if [ -f $SESMANFILE ]; then
TMPFILE=$(mktemp /tmp/sesman.XXXXX)
trap "rm -f $TMPFILE" 0
grep -v uds $SESMANFILE > $TMPFILE # Removes all UDS lines from sesman if they exists
cp $TMPFILE $SESMANFILE
trap "rm -f $TMPFILE" 0
fi
;;
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#

View File

@@ -0,0 +1,45 @@
#!/bin/sh -e
. /usr/share/debconf/confmodule
db_version 2.0
# This conf script is capable of backing up
db_capb backup
if [ -f /etc/udsactor/udsactor.cfg ] && [ "$1" != "reconfigure" ]; then
echo "/etc/udsactor/udsactor.cfg already exists, leaving untouched."
exit 0
fi
STATE=1
while [ "$STATE" != 0 -a "$STATE" != 4 ]; do
case "$STATE" in
1)
db_input high udsactor/host || true
;;
2)
db_input high udsactor/secure || true
;;
3)
db_input high udsactor/masterKey || true
;;
esac
if db_go; then
STATE=$(($STATE + 1))
else
STATE=$(($STATE - 1))
fi
done
# If "cancelled", exit
if [ "$STATE" = 0 ]; then
exit 0
fi
# If using reconfigure, and already exists an configuration file, move it to a backup
if [ -f /etc/udsactor/udsactor.cfg ] && [ "$1" = "reconfigure" ]; then
echo "/etc/udsactor.cfg backup to /etc/udsactor.cfg.back"
mv /etc/udsactor/udsactor.cfg /etc/udsactor/udsactor.cfg.back
fi

View File

@@ -1,6 +1,6 @@
#!/bin/sh -e
### BEGIN INIT INFO
# Provides: uds-actor
# Provides: udsactor
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Default-Start: 2 3 4 5
@@ -9,12 +9,14 @@
### END INIT INFO
#
# . /lib/lsb/init-functions
case "$1" in
start|stop|restart)
/usr/bin/udsactor $1
;;
;;
force-reload)
./actor restart
/usr/bin/udsactor restart
;;
*) echo "Usage: $0 {start|stop|restart|force-reload}" >&2; exit 1 ;;
esac

View File

@@ -0,0 +1,2 @@
/usr/share/UDSActor/UDSActorConfig.py /usr/sbin/UDSActorConfig
/usr/share/UDSActor/UDSActorUser.py /usr/bin/UDSActorTool

View File

@@ -0,0 +1,53 @@
#!/bin/sh
. /usr/share/debconf/confmodule
set -e
case "$1" in
configure)
# If new "fresh" install or if configuration file has disappeared...
if [ "$2" = "" ] || [ ! -f /etc/udsactor/udsactor.cfg ]; then
db_get udsactor/host
host=$RET
db_get udsactor/secure
ssl=$RET
if [ "$ssl" = "true" ]; then
ssl=True;
else
ssl=False;
fi
db_get udsactor/masterKey
masterKey=$RET
# If already has a config file there
if [ -f /etc/udsactor/udsactor.cfg ]; then
cp /etc/udsactor/udsactor.cfg /etc/udsactor/udsactor.cfg.dpkg-old
fi
echo "[uds]" > /etc/udsactor/udsactor.cfg
echo "host = $host" >> /etc/udsactor/udsactor.cfg
echo "logLevel = 30000" >> /etc/udsactor/udsactor.cfg
echo "ssl = $ssl" >> /etc/udsactor/udsactor.cfg
echo "masterKey = $masterKey" >> /etc/udsactor/udsactor.cfg
fi
# Fix perms so only root can access "masterKey"
chmod 0700 /etc/udsactor
chmod 0600 /etc/udsactor/udsactor.cfg
chown root:root /etc/udsactor
chown root:root /etc/udsactor/udsactor.cfg
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0

View File

@@ -0,0 +1,14 @@
#!/bin/sh -e
. /usr/share/debconf/confmodule
set -e
if [ "$1" = "purge" ] ; then
if [ -f /etc/udsactor/udsactor.cfg ]; then
mv /etc/udsactor/udsactor.cfg /etc/udsactor/udsactor.cfg.dpkg-backup
# Remove .pyc leaved behind
rm -rf /usr/share/UDSActor || true > /dev/null 2>&1
fi
fi

View File

@@ -0,0 +1 @@
#! /bin/bash -e

View File

@@ -1,19 +1,20 @@
Template: udsactor/server
Template: udsactor/host
Type: string
Default:
_Description: UDS Server address:
Description: UDS Server address:
The actor needs the address of the server in order to communicate with it.
Provide here full address (or i) of the UDS server
Template: udsactor/secure
Type: boolean
Default: true
_Description: Use secure (https) connection to communicate with UDS server?
Description: Use secure (https) connection to communicate with UDS server?
If selected, the communication will be done using https.
If not selected, the communication will be done using http
Template: udsactor/timeout
Template: udsactor/masterKey
Type: string
Default: 5
_Description: Timeout in communications with UDS server:
The timeout is expressed in seconds
Default:
Description: Master Key:
This key is available on UDS Administration interface.
Look for it under configuration, on Security tab.

View File

@@ -0,0 +1,12 @@
[Desktop Entry]
Name=UDS Actor Tool
Comment=UDS Actor Userspace tools
Exec=/usr/bin/UDSActorTool-startup
Icon=/usr/share/UDSActor/img/uds.png
Terminal=false
Type=Application
NoDisplay=true
X-KDE-autostart-after=panel
X-KDE-StartupNotify=false
X-DBUS-StartupType=Unique
X-KDE-UniqueApplet=true

View File

@@ -0,0 +1,11 @@
[Desktop Entry]
Name=UDS Actor Configuration
Version=1.0
Exec=/usr/sbin/UDSActorConfig-pkexec
Comment=UDS Actor Configuration Application. (Must be executed as root)
Icon=/usr/share/UDSActor/img/uds.png
Type=Application
Terminal=false
StartupNotify=true
Encoding=UTF-8
Categories=Settings;System;

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<action id="org.freedesktop.policykit.pkexec.run-UDSActorConfig">
<description>Run UDS Actor Configuration Program</description>
<message>Authentication is required to run UDS Actor Configuration</message>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/UDSActorConfig</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">TRUE</annotate>
</action>
</policyconfig>

3
actors/linux/readme.txt Normal file
View File

@@ -0,0 +1,3 @@
UDSActor is the client actor needed to get machines managed by UDS Broker.
Please, visit http://www.udsenterprise.com for more information

View File

@@ -0,0 +1,2 @@
#!/bin/sh
pkexec "/usr/sbin/UDSActorConfig" "$@"

View File

@@ -0,0 +1,10 @@
#!/bin/sh
# Simple hack to wait for systray to be present
# Exec tool if not already runned by session manager
ps -ef | grep "$USER" | grep -v grep | grep -v UDSActorTool-startup | grep 'UDSActorTool' -q
# If not already running
if [ $? -eq 1 ]; then
sleep 5
exec /usr/bin/UDSActorTool
fi

View File

@@ -0,0 +1,13 @@
#!/bin/sh
env > /tmp/env.txt
if [ "$PAM_TYPE" = "open_session" ]; then
nohup /usr/bin/udsactor login $PAM_USER &
# Wait in backgroud to TTY to close (close_session is not being invoked right now)
nohup /usr/bin/uds-wait-session &
elif [ "$PAM_TYPE" = "close_session" ]; then
nohup /usr/bin/udsactor logout $PAM_USER &
fi
return 0

View File

@@ -0,0 +1,12 @@
#!/bin/sh
while :
do
sleep 5 # Wait 5 seconds between checks
found=`ps -f -u$PAM_USER | grep -v grep | grep -v uds-wait-session | grep "$PAM_TTY" | wc -l`
if [ "$found" = "0" ]; then
/usr/bin/udsactor logout $PAM_USER
exit 0
fi
done

6
actors/linux/scripts/udsactor Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/sh
FOLDER=/usr/share/UDSActor
cd $FOLDER
python -m udsactor.linux.UDSActorService $@

View File

@@ -0,0 +1,69 @@
%define _topdir %(echo $PWD)/rpm
%define name udsactor
%define version 0.0.0
%define release 1
%define buildroot %{_topdir}/%{name}-%{version}-%{release}-root
BuildRoot: %{buildroot}
Name: %{name}
Version: %{version}
Release: %{release}
Summary: Actor for Universal Desktop Services (UDS) Broker
License: BSD3
Group: Admin
Requires: python-six python-requests PyQt4 libXScrnSaver
Vendor: Virtual Cable S.L.U.
URL: http://www.udsenterprise.com
Provides: udsactor
%define _rpmdir ../
%define _rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
%install
curdir=`pwd`
cd ../..
make DESTDIR=$RPM_BUILD_ROOT DISTRO=rh install-udsactor
cd $curdir
%clean
rm -rf $RPM_BUILD_ROOT
curdir=`pwd`
cd ../..
make DESTDIR=$RPM_BUILD_ROOT DISTRO=rh clean
cd $curdir
%post
systemctl enable udsactor.service > /dev/null 2>&1
%preun
systemctl disable udsactor.service > /dev/null 2>&1
systemctl stop udsactor.service > /dev/null 2>&1
%postun
# $1 == 0 on uninstall, == 1 on upgrade for preun and postun (just a reminder for me... :) )
if [ $1 -eq 0 ]; then
rm -rf /etc/udsactor
rm /var/log/udsactor.log
fi
# And, posibly, the .pyc leaved behind on /usr/share/UDSActor
rm -rf /usr/share/UDSActor > /dev/null 2>&1
%description
This package provides the required components to allow this machine to work on an environment managed by UDS Broker.
%files
%defattr(-,root,root)
/etc/udsactor
/etc/xdg/autostart/UDSActorTool.desktop
/etc/init.d/udsactor
/usr/bin/UDSActorTool-startup
/usr/bin/udsactor
/usr/bin/UDSActorTool
/usr/sbin/UDSActorConfig
/usr/sbin/UDSActorConfig-pkexec
/usr/share/UDSActor/*
/usr/share/applications/UDS_Actor_Configuration.desktop
/usr/share/autostart/UDSActorTool.desktop
/usr/share/polkit-1/actions/org.openuds.pkexec.UDSActorConfig.policy

4
actors/src/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
build
.idea
*_enterprise*
/samples/

5
actors/src/UDSActor.qrc Normal file
View File

@@ -0,0 +1,5 @@
<RCC>
<qresource prefix="images">
<file>img/uds.png</file>
</qresource>
</RCC>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
type="win32"
name="UDSActorConfig"
version="1.6.0.0"
processorArchitecture="x86"
/>
<description>Description</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

View File

@@ -0,0 +1,112 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from __future__ import unicode_literals
import sys
from PyQt4 import QtCore, QtGui
import six
from udsactor import store
from udsactor import REST
from udsactor import utils
from udsactor.log import logger
from setup_dialog_ui import Ui_UdsActorSetupDialog
class UDSConfigDialog(QtGui.QDialog):
def __init__(self, data, parent=None):
QtGui.QDialog.__init__(self, parent)
self.ui = Ui_UdsActorSetupDialog()
self.ui.setupUi(self)
if data is not None:
self.ui.host.setText(data.get('host', ''))
self.ui.masterKey.setText(data.get('masterKey', ''))
self.ui.useSSl.setCurrentIndex(1 if data.get('ssl', False) is True else 0)
self.ui.logLevelComboBox.setCurrentIndex(int(data.get('logLevel', '10000')) / 10000 - 1)
def _getCfg(self):
return {
'host': six.text_type(self.ui.host.text()),
'masterKey': six.text_type(self.ui.masterKey.text()),
'ssl': self.ui.useSSl.currentIndex() == 1,
'logLevel': (self.ui.logLevelComboBox.currentIndex() + 1) * 10000
}
def textChanged(self):
enableButtons = self.ui.host.text() != '' and self.ui.masterKey.text() != ''
self.ui.testButton.setEnabled(enableButtons)
self.ui.saveButton.setEnabled(enableButtons)
def cancelAndDiscard(self):
logger.debug('Cancelling changes')
self.close()
def testParameters(self):
logger.debug('Testing connection')
try:
cfg = self._getCfg()
api = REST.Api(
cfg['host'], cfg['masterKey'], cfg['ssl'])
api.test()
QtGui.QMessageBox.information(
self, 'Test Passed', 'The test was executed successfully', QtGui.QMessageBox.Ok)
logger.info('Test was passed successfully')
except Exception as e:
logger.info('Test error: {}'.format(utils.exceptionToMessage(e)))
QtGui.QMessageBox.critical(self, 'Test Error', utils.exceptionToMessage(e), QtGui.QMessageBox.Ok)
def acceptAndSave(self):
cfg = self._getCfg()
store.writeConfig(cfg)
self.close()
if __name__ == "__main__":
app = QtGui.QApplication(sys.argv)
if store.checkPermissions() is False:
QtGui.QMessageBox.critical(None, 'Notice', 'This Program must be executed as administrator', QtGui.QMessageBox.Ok)
sys.exit(1)
# Read configuration
cfg = store.readConfig()
if cfg is not None:
logger.setLevel(int(cfg.get('logLevel', 20000)))
else:
logger.setLevel(20000)
myapp = UDSConfigDialog(cfg)
myapp.show()
sys.exit(app.exec_())

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
type="win32"
name="UDSActorService"
version="1.6.0.0"
processorArchitecture="x86"
/>
<description>Description</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

342
actors/src/UDSActorUser.py Normal file
View File

@@ -0,0 +1,342 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from __future__ import unicode_literals
import sys
from PyQt4 import QtGui # @UnresolvedImport
from PyQt4 import QtCore # @UnresolvedImport
import pickle
import time
import datetime
import signal
from udsactor import ipc
from udsactor import utils
from udsactor.log import logger
from udsactor.service import IPC_PORT
from udsactor import operations
from about_dialog_ui import Ui_UDSAboutDialog
from message_dialog_ui import Ui_UDSMessageDialog
from udsactor.scriptThread import ScriptExecutorThread
from udsactor import VERSION
trayIcon = None
def sigTerm(sigNo, stackFrame):
if trayIcon:
trayIcon.quit()
# About dialog
class UDSAboutDialog(QtGui.QDialog):
def __init__(self, parent=None):
QtGui.QDialog.__init__(self, parent)
self.ui = Ui_UDSAboutDialog()
self.ui.setupUi(self)
self.ui.VersionLabel.setText("Version " + VERSION)
def closeDialog(self):
self.hide()
class UDSMessageDialog(QtGui.QDialog):
def __init__(self, parent=None):
QtGui.QDialog.__init__(self, parent)
self.ui = Ui_UDSMessageDialog()
self.ui.setupUi(self)
def displayMessage(self, message):
self.ui.message.setText(message)
self.show()
def closeDialog(self):
self.hide()
class MessagesProcessor(QtCore.QThread):
logoff = QtCore.pyqtSignal(name='logoff')
displayMessage = QtCore.pyqtSignal(QtCore.QString, name='displayMessage')
script = QtCore.pyqtSignal(QtCore.QString, name='script')
exit = QtCore.pyqtSignal(name='exit')
information = QtCore.pyqtSignal(dict, name='information')
def __init__(self):
super(self.__class__, self).__init__()
# Retries connection for a while
for _ in range(10):
try:
self.ipc = ipc.ClientIPC(IPC_PORT)
self.ipc.start()
break
except Exception:
logger.debug('IPC Server is not reachable')
self.ipc = None
time.sleep(2)
self.running = False
def stop(self):
self.running = False
if self.ipc:
self.ipc.stop()
def isAlive(self):
return self.ipc is not None
def requestInformation(self):
if self.ipc is not None:
info = self.ipc.requestInformation()
logger.debug('Request information: {}'.format(info))
def sendLogin(self, userName):
if self.ipc:
self.ipc.sendLogin(userName)
def sendLogout(self, userName):
if self.ipc:
self.ipc.sendLogout(userName)
def run(self):
if self.ipc is None:
return
self.running = True
# Wait a bit so we ensure IPC thread is running...
time.sleep(2)
while self.running and self.ipc.running:
try:
msg = self.ipc.getMessage()
if msg is None:
break
msgId, data = msg
logger.debug('Got Message on User Space: {}:{}'.format(msgId, data))
if msgId == ipc.MSG_MESSAGE:
self.displayMessage.emit(QtCore.QString.fromUtf8(data))
elif msgId == ipc.MSG_LOGOFF:
self.logoff.emit()
elif msgId == ipc.MSG_SCRIPT:
self.script.emit(QtCore.QString.fromUtf8(data))
elif msgId == ipc.MSG_INFORMATION:
self.information.emit(pickle.loads(data))
except Exception as e:
try:
logger.error('Got error on IPC thread {}'.format(utils.exceptionToMessage(e)))
except:
logger.error('Got error on IPC thread (an unicode error??)')
if self.ipc.running is False and self.running is True:
logger.warn('Lost connection with Service, closing program')
self.exit.emit()
class UDSSystemTray(QtGui.QSystemTrayIcon):
def __init__(self, app_, parent=None):
self.app = app_
# style = app.style()
# icon = QtGui.QIcon(style.standardPixmap(QtGui.QStyle.SP_ComputerIcon))
icon = QtGui.QIcon(':/images/img/uds.png')
QtGui.QSystemTrayIcon.__init__(self, icon, parent)
self.menu = QtGui.QMenu(parent)
exitAction = self.menu.addAction("About")
exitAction.triggered.connect(self.about)
self.setContextMenu(self.menu)
self.ipc = MessagesProcessor()
self.sessionStart = datetime.datetime.now()
self.maxIdleTime = None
self.showIdleWarn = True
self.maxSessionTime = None
self.showMaxSessionWarn = True
self.timer = QtCore.QTimer()
self.timer.timeout.connect(self.checkTimers)
if self.ipc.isAlive() is False:
raise Exception('No connection to service, exiting.')
self.stopped = False
self.ipc.displayMessage.connect(self.displayMessage)
self.ipc.exit.connect(self.quit)
self.ipc.script.connect(self.executeScript)
self.ipc.logoff.connect(self.logoff)
self.ipc.information.connect(self.information)
# Pre generate a request for information (general parameters) to daemon/service
self.ipc.requestInformation()
self.aboutDlg = UDSAboutDialog()
self.msgDlg = UDSMessageDialog()
self.counter = 0
self.timer.start(5000) # Launch idle checking every 5 seconds
self.graceTimerShots = 6 # Start counting for idle after 30 seconds after login, got on windows some "instant" logout because of idle timer not being reset??
self.ipc.start()
# If this is running, it's because he have logged in
self.ipc.sendLogin(operations.getCurrentUser())
def checkTimers(self):
self.checkIdle()
self.checkMaxSession()
def checkMaxSession(self):
if self.maxSessionTime is None or self.maxSessionTime == 0:
logger.debug('Returning because maxSessionTime is cero')
return
remainingTime = self.maxSessionTime - (datetime.datetime.now() - self.sessionStart).total_seconds()
logger.debug('Remaining time: {}'.format(remainingTime))
if self.showMaxSessionWarn is True and remainingTime < 300: # With five minutes, show a warning message
self.showMaxSessionWarn = False
self.msgDlg.displayMessage('Your session will expire in less that 5 minutes. Please, save your work and disconnect.')
return
if remainingTime <= 0:
logger.debug('Remaining time is less than cero, exiting')
self.quit()
def checkIdle(self):
if self.maxIdleTime is None: # No idle check
return
if self.graceTimerShots > 0:
self.graceTimerShots -= 1
return
idleTime = operations.getIdleDuration()
remainingTime = self.maxIdleTime - idleTime
if remainingTime > 120: # Reset show Warning dialog if we have more than 5 minutes left
self.showIdleWarn = True
logger.debug('User has been idle for: {}'.format(idleTime))
if self.showIdleWarn is True and remainingTime < 120: # With two minutes, show a warning message
self.showIdleWarn = False
self.msgDlg.displayMessage("You have been idle for too long. The session will end if you don't resume operations")
if remainingTime <= 0:
logger.info('User has been idle for too long, notifying Broker that service can be reclaimed')
self.quit()
def displayMessage(self, message):
logger.debug('Displaying message')
self.msgDlg.displayMessage(message)
def executeScript(self, script):
logger.debug('Executing script')
th = ScriptExecutorThread(script)
th.start()
def logoff(self):
self.counter += 1
# print("Logofff --", self.counter)
def information(self, info):
'''
Invoked when received information from service
'''
logger.info('Got information message: {}'.format(info))
if 'idle' in info:
idle = int(info['idle'])
operations.initIdleDuration(idle)
self.maxIdleTime = idle
logger.debug('Set screensaver launching to {}'.format(idle))
else:
self.maxIdleTime = None
if 'maxSession' in info:
maxSession = int(info['maxSession'])
# operations.initMaxSession(maxSession)
self.maxSessionTime = maxSession
logger.debug('Set maxsession to {}'.format(maxSession))
def about(self):
self.aboutDlg.exec_()
def quit(self):
logger.debug('Quit invoked')
if self.stopped is False:
self.stopped = True
try:
# If we close Client, send Logoff to Broker
self.ipc.sendLogout(operations.getCurrentUser())
self.timer.stop()
self.ipc.stop()
except Exception:
# May we have lost connection with server, simply exit in that case
pass
try:
operations.loggoff() # Invoke log off
except Exception:
pass
self.app.quit()
if __name__ == '__main__':
app = QtGui.QApplication(sys.argv)
if not QtGui.QSystemTrayIcon.isSystemTrayAvailable():
# QtGui.QMessageBox.critical(None, "Systray", "I couldn't detect any system tray on this system.")
sys.exit(1)
# This is important so our app won't close on message windows
QtGui.QApplication.setQuitOnLastWindowClosed(False)
try:
trayIcon = UDSSystemTray(app)
except Exception:
logger.error('UDS Service is not running, or it can\'t contact with UDS Server. User Tools stopped')
sys.exit(1)
# Sets a default idle duration, but will not be used unless idle is notified from server
operations.initIdleDuration(3600 * 10)
trayIcon.show()
# Catch kill and logout user :)
signal.signal(signal.SIGTERM, sigTerm)
res = app.exec_()
logger.debug('Exiting')
trayIcon.quit()
sys.exit(res)

203
actors/src/UDSActor_rc.py Normal file
View File

@@ -0,0 +1,203 @@
# -*- coding: utf-8 -*-
# Resource object code
#
# Created: Mon Apr 27 22:05:02 2015
# by: The Resource Compiler for PyQt (Qt v4.8.6)
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore
qt_resource_data = b"\
\x00\x00\x09\xd1\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x30\x00\x00\x00\x30\x08\x06\x00\x00\x00\x57\x02\xf9\x87\
\x00\x00\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\
\xa7\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\
\x0b\x13\x01\x00\x9a\x9c\x18\x00\x00\x00\x07\x74\x49\x4d\x45\x07\
\xdf\x04\x1b\x12\x2a\x1c\x39\xec\x95\x7d\x00\x00\x09\x5e\x49\x44\
\x41\x54\x68\xde\xd5\x9a\x7b\x8c\x54\xd5\x1d\xc7\x3f\xbf\xfb\x9a\
\x99\x65\x5f\xc8\x63\x41\x51\x40\x40\xac\xd1\x20\xd1\xc5\x68\x40\
\x51\xac\x6b\xb5\xe0\xa3\xb1\x94\xa8\x58\x6b\x2a\xad\xa6\x91\xc6\
\xd8\x54\xa5\x16\x9b\xf1\xd1\x2a\xa9\x68\x6b\x35\xd1\x1a\x27\xb6\
\x6b\xb5\xad\xb5\x69\x8b\x4b\x5c\xaa\x28\x0a\x2c\x2f\x95\x5d\x1e\
\x8b\x40\x61\xdd\x65\x60\xd8\xf7\xee\x9d\xb9\xaf\xd3\x3f\x76\x06\
\x76\x61\x76\x65\x67\xc6\x3f\xfc\x25\x37\x33\x39\xf7\xce\xf9\x9d\
\xef\xf9\x9e\xdf\x73\xae\x28\xa5\xf8\x3a\x8b\x51\xc8\xc9\x6a\xea\
\x2a\x8a\x95\xa2\xa8\xb4\x54\xc2\xe5\x65\x9a\x15\xb6\x24\xec\x78\
\x4a\xab\x6f\x70\xb5\xc6\x3d\x2e\x4d\xcd\x01\x89\xa3\x81\x4a\x24\
\x7c\x3f\xbd\x6f\x3d\x40\x2b\xd0\x59\x5b\x6d\xe7\xb4\x93\x32\x1c\
\x06\x6a\xea\x2a\x42\xc0\x4c\xe0\x7c\xe0\x1c\xe0\x6c\xe0\x2c\x60\
\x14\x10\x12\x41\xb7\x2c\xd1\x5a\x0e\xf9\xda\x8e\x9d\xae\x1c\x68\
\xf2\xb4\x44\x22\x10\xcf\x03\xa5\x14\x41\x00\x4a\x81\x52\x64\x94\
\x06\x80\x97\xbe\x6c\xe0\x20\x50\x0f\x6c\x04\x56\xd7\x56\xdb\xf1\
\x9c\x01\xd4\xd4\x55\x14\xa7\x17\x76\x05\x70\x3d\x70\x25\x30\x66\
\xa8\xc9\xbe\x68\xf6\x59\xfd\x6e\x92\x2f\x9a\x5d\x74\x5d\x10\xcd\
\x02\x31\x40\x04\x85\x96\x7e\x4a\x21\x4a\x01\x01\x22\x0a\x51\x6e\
\x7a\xfd\x00\x72\xc2\x27\xfb\x81\x95\xc0\x9b\x40\x4b\x6d\xb5\x1d\
\x7c\x29\x80\x9a\xba\x8a\x31\xc0\xf7\x81\xf9\xc0\xec\xfe\xb3\x0d\
\xba\x0b\x02\x07\x9b\x7c\x5e\x7f\xa3\x87\xc0\x4b\x62\x5b\x33\xe8\
\xd4\x66\x91\xd4\x26\xe3\x4a\x39\x81\x84\x51\x98\x7d\x53\x29\x1f\
\x4d\x7c\xcc\xe2\x22\x4c\xd3\x47\xf7\x5b\x31\xbc\x38\xa6\xdb\x84\
\xe5\xee\x23\xe4\xec\xc2\x70\x0f\xa1\x44\x50\x62\x65\xd4\xb7\x01\
\x2f\x03\xbf\xae\xad\xb6\x13\x83\x02\xa8\xa9\xab\xb8\x00\xf8\x37\
\x70\xe6\x70\xce\xa1\xae\xc3\xaa\xd5\x49\x36\x6f\x4e\xd2\x3c\xe2\
\x61\xda\x8c\x2b\xf0\x89\x00\x1a\x30\x70\x83\xc4\xb0\x30\x47\x4f\
\x40\x8c\xd0\x80\xbd\x11\xe5\x20\x2a\x89\xa6\x6c\x42\xce\x5e\xca\
\x3b\xfe\x42\x79\x47\x0c\x94\x8f\x12\x33\xf3\xd8\x27\xc0\xdc\xda\
\x6a\xbb\x3d\x33\x90\xe1\x95\x35\x5b\xc7\x45\x80\x2d\xc3\x5d\x3c\
\xf4\x9d\xeb\x33\x4e\x17\x12\xc6\x0d\x24\x8c\xaa\xf4\xe2\x33\x47\
\x5c\x1d\xbb\xc4\x0c\x61\x8d\x9d\x88\x18\x56\x7a\x2c\x38\x76\x29\
\x31\x08\xb4\x62\x3c\x7d\x0c\x3d\x91\x4b\x69\x1a\xff\x7b\x1a\xce\
\x69\xa1\xbd\xfc\x8e\x34\x13\x0a\x60\x06\xf0\x5e\x7f\xdd\xc7\x00\
\xb4\x75\xf8\x4b\x72\xf5\x4a\x41\x00\xe7\x4e\x33\x99\x32\x7d\x2c\
\x0a\x3d\x2b\x42\x2d\x54\x84\x35\x76\x22\xe8\xa7\xa2\x22\x40\x54\
\x0a\x25\x16\x4d\xe3\x5f\xa4\x65\xdc\x4a\xe4\x38\x9b\x33\xe6\x2d\
\x8a\xac\x38\x09\x40\xed\x47\x5d\xd3\x74\x4d\x72\x76\xa1\xba\xa1\
\x71\xc7\xd5\xef\x30\xa6\xf8\xf0\xc9\x36\x62\x58\x18\xa7\x9d\x0e\
\xa2\xf5\xd1\x75\xea\xdc\x22\xca\xa6\xad\x6c\x21\x2d\xe3\x56\xa0\
\x05\xa9\xcc\x8d\x5b\xe7\x2d\x8a\x9c\x3e\x90\x81\x4e\xdf\xde\x52\
\xdf\x8b\xa6\xe5\x1e\x07\x4a\x23\xed\x3c\x32\xff\x21\x4c\xdd\x43\
\xa9\xe3\x9b\xa1\x17\x9f\x86\xe8\x66\xce\xf3\x8a\xf2\xe8\x28\x9e\
\x8f\x63\x4d\xcb\xb0\x50\x0e\x5c\x3a\x00\x80\x69\xc8\xaa\x86\xc6\
\x24\x4d\x2d\x2e\x92\x23\x11\x7e\xa0\x33\x7e\xe4\x01\x1e\xb8\x36\
\x8a\x65\xb8\x28\x04\xd1\x74\xb4\x48\x49\xde\x41\x32\xd0\xc2\xd8\
\x91\x0b\x33\x00\x42\xc0\x94\x01\x00\x62\x51\xa7\x36\x50\x34\xac\
\xdf\xd6\x8b\x9d\x0a\x72\x56\xe4\xf9\x26\x17\x4c\xd8\xcc\xc2\x59\
\xaf\xa1\x49\x00\x22\x88\x61\x92\xbf\x18\xf8\xfa\x69\xfd\x07\xca\
\x07\x00\x48\xcb\x2d\x3d\xbd\x81\xbf\xe6\xa3\xee\xbc\xd5\xdd\x34\
\xf3\x75\x2e\x99\xbc\x1e\x3f\x18\xee\xb9\x1f\xea\x28\xf9\x27\x8d\
\x9d\x08\x60\x87\xa6\xf1\x58\xa2\xd5\xe3\x83\x4d\x3d\x27\xba\xf0\
\x61\x89\xeb\x1b\x2c\xfd\xe6\xe3\xcc\x9a\xb4\x9e\xa4\x5d\x80\xc5\
\xe3\xa2\xfb\x03\x62\x58\xc7\x49\x00\x62\x51\x47\x01\x51\x5d\x97\
\x86\x03\x5f\x38\x34\xec\x49\xe6\xac\x50\x21\x80\x62\xc9\xe5\x2b\
\x38\x6f\xd4\x7a\x02\xa5\xe5\xb9\xfb\x0e\xa6\xd7\x92\x09\x7e\x2e\
\xd0\x9c\x8d\x01\x62\x51\xc7\x05\xaa\x00\x7f\x6b\x83\xcd\x91\x56\
\x2f\x67\xa3\x56\x08\x25\x91\x76\xee\x9e\xb5\x9c\xd1\x91\x96\x34\
\xa8\x5c\x01\xb8\xe8\xde\x31\x17\x6d\x03\x7b\xb2\x02\x48\x83\x68\
\x02\x16\x2a\x05\xff\x5d\xdf\x4d\x47\x97\x9f\xb3\x7b\x55\x4a\xe3\
\xcc\xb2\x06\xee\xbb\xf8\xc7\x94\x85\x5a\xf1\x03\x23\x67\x00\xa6\
\xd7\x9c\x61\x20\x05\xec\x1e\x14\x40\x5a\xfe\x21\xc2\x8b\x8e\xa3\
\x78\x7f\x43\x37\xc9\x94\xca\xc3\x1e\x42\x4c\x2e\xdf\xc6\xcf\x2f\
\xb9\x8d\xb2\x70\x6b\x0e\x4c\x08\x96\xd7\x82\x1c\x0f\x64\x89\xda\
\x6a\xfb\xe8\x90\x00\x62\x51\xc7\x07\x1e\x16\x61\x5f\x47\x57\xc0\
\xe6\xed\xbd\x04\xb9\x7b\x57\x02\xa5\x31\xa1\x74\x07\x3f\xbd\xf8\
\x6e\x46\x47\x5a\x00\x49\xa6\xcf\xf2\x97\xb3\x28\x3a\xa1\x64\x7d\
\xff\xa1\x0f\x07\xf3\x42\x27\x82\x38\x7a\xb4\xdd\xbd\x51\xd7\x84\
\x3d\xfb\x1d\x76\xed\x4b\x62\x18\x92\x17\x88\x73\x47\xad\xe3\xa1\
\x4b\x17\x71\xcb\xb9\x4f\xbd\xdb\x91\x2a\xb9\x0d\xb8\x1f\xf8\x6d\
\x3a\x0b\x3e\x38\x48\xa2\x42\x24\xf5\x29\xea\xb8\x31\xae\x39\xa5\
\x8a\xac\xe1\xc0\xb7\xaf\xd7\x34\x79\xb4\x7e\xcf\xa1\x8b\xfe\xba\
\x6a\x0b\x86\xa1\x33\xf7\x92\x62\x26\x4e\xb0\xf0\x7d\x95\x87\x4b\
\x54\x20\xaa\x47\x17\xff\xee\x79\x17\xb5\xfe\x79\xfa\x13\xfb\xa5\
\x33\x35\x2a\x0c\x8c\x00\xc6\x01\xdf\x03\x7e\x94\x2e\xa8\x08\xb4\
\x22\xa6\xed\xbb\x9c\xb0\xbd\x11\x25\x06\xc0\xa8\xda\x6a\xbb\xf5\
\x24\x00\xbf\x7b\x63\xba\x5c\x36\x73\x52\x79\x24\x6c\xcd\x57\x4a\
\x2d\x07\x26\x83\x22\x50\x8a\xb7\x6b\xf7\xb0\xf3\xf3\xfd\x58\xa6\
\xf0\xad\x2b\x4a\x28\x29\xd6\x0b\x11\x9b\x5c\xe0\xca\xaa\xca\xf8\
\xba\x6c\x37\xc7\x2f\xef\xba\x13\x58\x11\x68\xc5\x23\x2f\xd8\x59\
\x8a\x52\x2e\x20\x87\x6b\xab\xed\x8a\xac\x47\x68\xe7\xde\x43\xa5\
\x1f\x6c\xfa\x7c\x75\x7b\x67\xef\xab\x96\xa9\x4f\xb6\x0c\x9b\xce\
\xe4\x18\x3e\xde\xfb\x5d\x5a\xb4\x18\x18\x67\xe1\xb8\x01\x1f\x6f\
\xeb\xcd\x8b\x81\x7e\x62\x02\xab\x6b\xea\x2a\xae\xca\x76\xb3\x65\
\x79\xc9\x2b\x81\x16\x59\x10\x72\x0e\xf4\x88\xdf\x9d\xf1\x40\xff\
\x19\xb4\x22\xbb\xfd\x61\xb3\x5c\x44\xde\x0b\x59\xc6\x8c\xf3\xa7\
\x4f\x45\x95\x3f\xc6\xb6\x83\x73\xe8\x49\x95\x11\x20\xe8\xee\x27\
\x44\x8e\x5c\x88\xaf\x4c\xa6\x4d\xb2\x98\x53\x59\x8c\xeb\x15\x04\
\xc8\x61\xe0\xda\xaa\xca\xf8\xd6\x6c\x37\xcf\xbf\xef\xb9\xbf\x8d\
\x8b\x2f\xbd\xb9\xaf\xb0\xe1\xe6\xda\x6a\xfb\xad\xac\x0c\x88\x48\
\x0a\x38\x90\x72\x3c\x36\x6e\xef\x64\x6d\xe3\x7c\xba\x53\xe5\x7d\
\x59\x25\x10\x58\x33\x48\x95\xbf\x80\x26\x2e\xbb\xf6\xa6\x68\xd8\
\x93\xcc\x2b\xfd\xee\x27\x63\x81\x97\x6b\xea\x2a\x46\x67\xbd\x79\
\xe4\x91\x86\xf4\xe2\x03\x60\xfd\x50\xb9\x50\xf2\x58\x84\x13\x1f\
\xbd\x2f\xdd\xe8\x1f\x5a\xf1\x8a\x7e\x88\x1f\x59\x88\x61\xc0\xe6\
\xcf\x6c\x0e\x1d\xc9\x3d\x52\x9f\x20\x33\x81\x97\xb2\x07\x31\x7b\
\x6a\xfa\xeb\x26\xa0\x6b\x50\x00\xe9\x5c\x68\x7b\x5f\x9f\x23\x85\
\xf8\x4d\x59\xa6\xd3\x70\x4a\x9f\x41\x69\x63\xf0\x03\xc5\x86\x6d\
\xbd\x85\x3a\x46\x00\x37\xd4\xd4\x55\x3c\x93\x05\xc2\xbd\xc0\x54\
\xe0\xa6\x74\x33\x6c\xf0\xb6\xca\xe2\x65\xd6\x37\x80\x75\x48\x68\
\xa4\x53\xf6\x2a\x5e\xe4\xe6\x6c\x7e\x10\x3d\xb9\x86\x50\xeb\x35\
\xf8\xbe\x70\xf6\x59\x21\xe6\x54\x8e\x28\x54\xd6\x6c\xa7\xed\x61\
\xed\xa9\x3c\x9c\x2d\x99\xdb\x01\x34\xa2\x92\x68\xee\xa6\xc1\xb2\
\x34\xbc\xf0\x55\xb8\x25\x4f\xa1\x6b\x1e\x9f\xff\x2f\xc5\xa7\x3b\
\x93\xe8\x05\xf1\xac\x44\x80\xfb\xd3\x5d\xc0\xe1\x03\x48\xcb\xd3\
\x00\xba\x53\x8b\xa8\xce\x41\x92\x2b\x70\x47\xdc\x83\x1f\xb9\x05\
\xc3\x50\x34\x34\x26\x39\xd8\xec\x16\xca\x1e\x16\x00\x13\x73\x06\
\x10\x8b\x3a\x6f\x82\x34\x6b\xce\x46\x34\xf7\xb3\x21\x42\x6a\x08\
\xb7\xf4\x09\x94\x76\x06\xae\x17\xb0\xb5\xde\xc6\x4e\x16\xcc\x1e\
\xee\xcc\x87\x01\x80\x9f\x28\x11\xac\x8e\x7b\x87\x6c\x2e\x06\xc6\
\x14\x9c\xb2\x17\x11\xf1\x48\xb4\x7b\x6c\xfa\xac\x17\x5d\x2f\x08\
\x0d\xf3\xf3\x05\xb0\x1a\x8c\x0f\xc4\xfd\x04\xb3\xfb\xe9\xc1\x41\
\x28\xf0\xc3\xd7\xe2\x96\x3e\x8f\xa1\x79\xec\x6b\x72\xd8\xd6\xd0\
\x8b\x69\xe4\x0d\x62\x52\x5e\x00\x62\x51\xa7\x1b\x78\x06\x31\x1d\
\xa3\xeb\x49\x34\x77\xf7\xd0\x49\x4d\xd1\x0f\xf0\xc3\x37\xa2\x89\
\xa2\xa1\x31\x45\xcb\x11\x37\x5f\x00\xad\xf9\x32\x40\x2c\xea\xfc\
\x1d\x78\x5b\x54\x07\x66\xe7\x03\x80\x3f\xb4\x3d\x94\x3d\x85\xd2\
\x46\xe3\x7a\x8a\x2d\xdb\xed\xbc\xea\x07\x60\x55\xde\x00\x32\x6d\
\x3c\x90\x16\x3d\xf9\x4f\xac\xae\x28\x6a\x48\x7b\x98\x8a\x53\xfe\
\x1a\x9a\x72\x89\x27\x3c\xea\x1b\x93\xf9\xd8\xc3\xca\x82\x00\x48\
\x17\xf9\xf3\x10\x33\x69\x76\x2d\xc7\xec\xad\x1e\xaa\x8a\xc7\x0f\
\xcf\xc3\x2d\x7d\x14\x4d\x5c\x36\x6f\xef\x6b\x0a\xe4\xd0\x72\x7d\
\x21\x53\xf3\x16\x82\x81\x4c\x70\xbb\x57\x89\x89\xd5\x71\x17\x46\
\xf2\xed\x21\x41\x38\x25\x0f\x12\x84\xae\xc1\xd4\x03\xd6\x6d\xea\
\x26\xe5\x0e\xcb\xb5\x6e\x04\x7e\x51\x55\x19\xf7\x0a\x06\x20\x0d\
\xe2\x8f\xc0\xaf\x50\x2e\x56\xdb\xed\xe8\xce\x87\x43\xb8\x57\x13\
\xa7\xf4\x71\xd0\x4a\xe9\xec\x0e\xd8\xb5\x37\x75\xaa\x6a\xb6\x02\
\x57\x55\x55\xc6\x13\xa7\xfa\x83\x61\x25\xc3\xb1\xa8\xf3\x4b\x90\
\x95\x60\x13\x4e\xcc\x41\x4f\xbe\x33\x78\xa3\xd7\xba\x08\x2f\xbc\
\x10\x94\xcb\xee\x7d\x29\xec\xe4\x97\x5a\xf4\xfb\xc0\x65\x55\x95\
\xf1\x9e\xe1\xac\x69\xd8\xd9\x7c\x2c\xea\x2c\x05\x79\x52\x89\x49\
\xa8\x75\x01\x66\xf7\x8a\xc1\x53\x8d\xb2\xdf\x80\x68\x74\x75\xfb\
\xec\xdc\x9b\x62\x88\xff\x1f\x5e\x06\x16\x54\x55\xc6\x87\xdd\x0a\
\xcc\xa9\x1c\x89\x45\x9d\x07\x81\xfb\x00\xcc\xae\x07\x09\xb7\x7d\
\x27\xbb\x39\x68\x25\x04\xd6\xd5\x18\xba\x47\xfd\xee\x24\x9e\x9f\
\x95\x85\x7b\x80\x25\x55\x95\xf1\xce\x5c\xd6\x92\x73\x3d\x15\x8b\
\x3a\xcf\xa6\xc3\x7d\x97\x96\x7c\x8b\x48\x7c\x22\xba\xbb\x81\xe3\
\x7f\x99\x66\x40\x8c\xea\x3b\x52\x81\xe2\xf0\xd1\x01\x1d\xbe\x36\
\xe0\xb6\xaa\xca\xf8\x1f\xaa\x2a\xe3\x7e\xae\xeb\xc8\xab\x20\x8c\
\x45\x9d\x7f\x01\x73\xc1\x58\x2b\x41\x13\xa1\xc4\x5c\x42\xed\x4b\
\xd0\x53\x35\x48\x70\x18\x3d\xb5\x16\x3d\xb5\x0a\xc4\x40\xa0\x7f\
\x23\x60\x03\x70\x5d\x55\x65\xfc\x4f\xf9\xb7\xdc\x0b\x50\x85\x2c\
\x5e\x66\x15\x01\x77\x01\xcf\x42\x00\x52\x8c\x92\x11\x88\xea\x01\
\xd5\xd3\xd7\x1c\xf7\x14\xb7\xde\x30\x12\xcb\x94\x97\x94\xe2\x67\
\x55\x95\xf1\xb6\x42\x64\x7c\x52\xc8\x97\x3d\x16\x2f\xb3\xa6\x00\
\xaf\xa4\xeb\xdb\xe2\xe3\x0d\x5e\x38\x67\x72\xa8\x73\x4e\xe5\x88\
\x65\x73\x67\x1c\x7a\x8e\x02\x8a\x7c\x15\x6f\xab\x2c\x5e\x66\xcd\
\x06\xae\x03\x2e\x04\xcc\xd2\x62\x6d\xfb\x35\xb3\x4b\x9f\x5f\x30\
\xfb\x70\x63\xa1\x75\xc9\x57\xf9\xba\xcd\xe2\x65\x56\x91\x08\x32\
\xf3\xbc\xb0\xbd\x74\x51\x67\xf0\x55\xe8\xf8\x3f\x66\x47\x07\xd4\
\xf8\xcc\x73\x31\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
\
"
qt_resource_name = b"\
\x00\x06\
\x07\x03\x7d\xc3\
\x00\x69\
\x00\x6d\x00\x61\x00\x67\x00\x65\x00\x73\
\x00\x03\
\x00\x00\x70\x37\
\x00\x69\
\x00\x6d\x00\x67\
\x00\x07\
\x0b\xb6\x57\xa7\
\x00\x75\
\x00\x64\x00\x73\x00\x2e\x00\x70\x00\x6e\x00\x67\
"
qt_resource_struct = b"\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
\x00\x00\x00\x12\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\
\x00\x00\x00\x1e\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
"
def qInitResources():
QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
def qCleanupResources():
QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
qInitResources()

240
actors/src/about-dialog.ui Normal file
View File

@@ -0,0 +1,240 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>UDSAboutDialog</class>
<widget class="QDialog" name="UDSAboutDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>466</width>
<height>402</height>
</rect>
</property>
<property name="font">
<font>
<family>Verdana</family>
<pointsize>9</pointsize>
</font>
</property>
<property name="windowTitle">
<string>About UDS Actor</string>
</property>
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<property name="modal">
<bool>true</bool>
</property>
<layout class="QVBoxLayout">
<property name="spacing">
<number>9</number>
</property>
<property name="margin">
<number>9</number>
</property>
<item>
<widget class="QLabel" name="LogoLabel">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/images/img/uds.png&quot;/&gt; UDS Actor Tools&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>5</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="TitleLabel">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:600;&quot;&gt;UDS Actor&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="VersionLabel">
<property name="text">
<string>Version 1.7.0</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>5</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>2</number>
</property>
<widget class="QWidget" name="aboutTab">
<attribute name="title">
<string>&amp;About</string>
</attribute>
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>9</number>
</property>
<item>
<widget class="QTextBrowser" name="aboutBrowser">
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Verdana'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-weight:600;&quot;&gt;(c) 2012-2016, Virtual Cable S.L.U.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-style:italic;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://www.udsenterprise.com&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.udsenterprise.com&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://www.openuds.org&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.openuds.org&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="authorsTab">
<attribute name="title">
<string>A&amp;uthors</string>
</attribute>
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>9</number>
</property>
<item>
<widget class="QTextBrowser" name="authorsBrowser">
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Verdana'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif';&quot;&gt;Adolfo Gómez García &amp;lt;agomez@virtualcable.es&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="licenseTab">
<attribute name="title">
<string>&amp;License Agreement</string>
</attribute>
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>9</number>
</property>
<item>
<widget class="QTextBrowser" name="licenseBrowser">
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Verdana'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;Copyright (c) 2012-2016 Virtual Cable S.L.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;All rights reserved.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;Redistribution and use in source and binary forms, with or without modification,&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;are permitted provided that the following conditions are met:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt; * Redistributions of source code must retain the above copyright notice,&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt; this list of conditions and the following disclaimer.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt; * Redistributions in binary form must reproduce the above copyright notice,&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt; this list of conditions and the following disclaimer in the documentation&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt; and/or other materials provided with the distribution.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt; * Neither the name of Virtual Cable S.L. nor the names of its contributors&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt; may be used to endorse or promote products derived from this software&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt; without specific prior written permission.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &amp;quot;AS IS&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="UDSActor.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>clicked(QAbstractButton*)</signal>
<receiver>UDSAboutDialog</receiver>
<slot>closeDialog()</slot>
<hints>
<hint type="sourcelabel">
<x>432</x>
<y>381</y>
</hint>
<hint type="destinationlabel">
<x>282</x>
<y>362</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>closeDialog()</slot>
</slots>
</ui>

View File

@@ -0,0 +1,164 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'about-dialog.ui'
#
# Created: Mon Apr 27 22:05:02 2015
# by: PyQt4 UI code generator 4.11.2
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_UDSAboutDialog(object):
def setupUi(self, UDSAboutDialog):
UDSAboutDialog.setObjectName(_fromUtf8("UDSAboutDialog"))
UDSAboutDialog.resize(466, 402)
font = QtGui.QFont()
font.setFamily(_fromUtf8("Verdana"))
font.setPointSize(9)
UDSAboutDialog.setFont(font)
UDSAboutDialog.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
UDSAboutDialog.setModal(True)
self.vboxlayout = QtGui.QVBoxLayout(UDSAboutDialog)
self.vboxlayout.setSpacing(9)
self.vboxlayout.setMargin(9)
self.vboxlayout.setObjectName(_fromUtf8("vboxlayout"))
self.LogoLabel = QtGui.QLabel(UDSAboutDialog)
self.LogoLabel.setObjectName(_fromUtf8("LogoLabel"))
self.vboxlayout.addWidget(self.LogoLabel)
spacerItem = QtGui.QSpacerItem(20, 5, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
self.vboxlayout.addItem(spacerItem)
self.TitleLabel = QtGui.QLabel(UDSAboutDialog)
self.TitleLabel.setObjectName(_fromUtf8("TitleLabel"))
self.vboxlayout.addWidget(self.TitleLabel)
self.VersionLabel = QtGui.QLabel(UDSAboutDialog)
self.VersionLabel.setObjectName(_fromUtf8("VersionLabel"))
self.vboxlayout.addWidget(self.VersionLabel)
spacerItem1 = QtGui.QSpacerItem(20, 5, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
self.vboxlayout.addItem(spacerItem1)
self.tabWidget = QtGui.QTabWidget(UDSAboutDialog)
self.tabWidget.setObjectName(_fromUtf8("tabWidget"))
self.aboutTab = QtGui.QWidget()
self.aboutTab.setObjectName(_fromUtf8("aboutTab"))
self.vboxlayout1 = QtGui.QVBoxLayout(self.aboutTab)
self.vboxlayout1.setSpacing(6)
self.vboxlayout1.setMargin(9)
self.vboxlayout1.setObjectName(_fromUtf8("vboxlayout1"))
self.aboutBrowser = QtGui.QTextBrowser(self.aboutTab)
self.aboutBrowser.setOpenExternalLinks(True)
self.aboutBrowser.setObjectName(_fromUtf8("aboutBrowser"))
self.vboxlayout1.addWidget(self.aboutBrowser)
self.tabWidget.addTab(self.aboutTab, _fromUtf8(""))
self.authorsTab = QtGui.QWidget()
self.authorsTab.setObjectName(_fromUtf8("authorsTab"))
self.vboxlayout2 = QtGui.QVBoxLayout(self.authorsTab)
self.vboxlayout2.setSpacing(6)
self.vboxlayout2.setMargin(9)
self.vboxlayout2.setObjectName(_fromUtf8("vboxlayout2"))
self.authorsBrowser = QtGui.QTextBrowser(self.authorsTab)
self.authorsBrowser.setOpenExternalLinks(True)
self.authorsBrowser.setObjectName(_fromUtf8("authorsBrowser"))
self.vboxlayout2.addWidget(self.authorsBrowser)
self.tabWidget.addTab(self.authorsTab, _fromUtf8(""))
self.licenseTab = QtGui.QWidget()
self.licenseTab.setObjectName(_fromUtf8("licenseTab"))
self.vboxlayout3 = QtGui.QVBoxLayout(self.licenseTab)
self.vboxlayout3.setSpacing(6)
self.vboxlayout3.setMargin(9)
self.vboxlayout3.setObjectName(_fromUtf8("vboxlayout3"))
self.licenseBrowser = QtGui.QTextBrowser(self.licenseTab)
self.licenseBrowser.setObjectName(_fromUtf8("licenseBrowser"))
self.vboxlayout3.addWidget(self.licenseBrowser)
self.tabWidget.addTab(self.licenseTab, _fromUtf8(""))
self.vboxlayout.addWidget(self.tabWidget)
self.buttonBox = QtGui.QDialogButtonBox(UDSAboutDialog)
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Close)
self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
self.vboxlayout.addWidget(self.buttonBox)
self.retranslateUi(UDSAboutDialog)
self.tabWidget.setCurrentIndex(0)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("clicked(QAbstractButton*)")), UDSAboutDialog.closeDialog)
QtCore.QMetaObject.connectSlotsByName(UDSAboutDialog)
def retranslateUi(self, UDSAboutDialog):
UDSAboutDialog.setWindowTitle(_translate("UDSAboutDialog", "About UDS Actor", None))
self.LogoLabel.setText(_translate("UDSAboutDialog", "<html><head/><body><p><img src=\":/images/img/uds.png\"/> UDS Actor Tools</p></body></html>", None))
self.TitleLabel.setText(_translate("UDSAboutDialog", "<html><head/><body><p><span style=\" font-family:\'Sans Serif\'; font-size:9pt; font-weight:600;\">UDS Actor</span></p></body></html>", None))
self.VersionLabel.setText(_translate("UDSAboutDialog", "Version 1.7.0", None))
self.aboutBrowser.setHtml(_translate("UDSAboutDialog", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Verdana\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'Sans Serif\';\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Sans Serif\'; font-weight:600;\">(c) 2014, Virtual Cable S.L.U.</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'Sans Serif\'; font-style:italic;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><a href=\"http://www.udsenterprise.com\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt; text-decoration: underline; color:#0000ff;\">http://www.udsenterprise.com</span></a></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><a href=\"http://www.openuds.org\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt; text-decoration: underline; color:#0000ff;\">http://www.openuds.org</span></a></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'Sans Serif\';\"><br /></p></body></html>", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.aboutTab), _translate("UDSAboutDialog", "&About", None))
self.authorsBrowser.setHtml(_translate("UDSAboutDialog", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Verdana\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Sans Serif\';\">Adolfo Gómez García &lt;agomez@virtualcable.es&gt;</span></p></body></html>", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.authorsTab), _translate("UDSAboutDialog", "A&uthors", None))
self.licenseBrowser.setHtml(_translate("UDSAboutDialog", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Verdana\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt;\">Copyright (c) 2014 Virtual Cable S.L.</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'MS Shell Dlg 2\'; font-size:8pt;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt;\">All rights reserved.</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'MS Shell Dlg 2\'; font-size:8pt;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt;\">Redistribution and use in source and binary forms, with or without modification,</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt;\">are permitted provided that the following conditions are met:</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'MS Shell Dlg 2\'; font-size:8pt;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt;\"> * Redistributions of source code must retain the above copyright notice,</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt;\"> this list of conditions and the following disclaimer.</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt;\"> * Redistributions in binary form must reproduce the above copyright notice,</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt;\"> this list of conditions and the following disclaimer in the documentation</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt;\"> and/or other materials provided with the distribution.</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt;\"> * Neither the name of Virtual Cable S.L. nor the names of its contributors</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt;\"> may be used to endorse or promote products derived from this software</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt;\"> without specific prior written permission.</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'MS Shell Dlg 2\'; font-size:8pt;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt;\">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt;\">AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt;\">IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt;\">DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt;\">FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt;\">DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt;\">SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt;\">CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt;\">OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt;\">OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'MS Shell Dlg 2\'; font-size:8pt;\"><br /></p></body></html>", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.licenseTab), _translate("UDSAboutDialog", "&License Agreement", None))
import UDSActor_rc
if __name__ == "__main__":
import sys
app = QtGui.QApplication(sys.argv)
UDSAboutDialog = QtGui.QDialog()
ui = Ui_UDSAboutDialog()
ui.setupUi(UDSAboutDialog)
UDSAboutDialog.show()
sys.exit(app.exec_())

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

BIN
actors/src/img/uds-512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

BIN
actors/src/img/uds.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

BIN
actors/src/img/uds.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>UDSMessageDialog</class>
<widget class="QDialog" name="UDSMessageDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>339</width>
<height>188</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>Verdana</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="windowTitle">
<string>UDS Actor</string>
</property>
<widget class="QWidget" name="verticalLayoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>321</width>
<height>171</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTextBrowser" name="message"/>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>15</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>clicked(QAbstractButton*)</signal>
<receiver>UDSMessageDialog</receiver>
<slot>closeDialog()</slot>
<hints>
<hint type="sourcelabel">
<x>203</x>
<y>161</y>
</hint>
<hint type="destinationlabel">
<x>337</x>
<y>125</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>closeDialog()</slot>
</slots>
</ui>

View File

@@ -0,0 +1,71 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'message-dialog.ui'
#
# Created: Mon Apr 27 22:05:02 2015
# by: PyQt4 UI code generator 4.11.2
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_UDSMessageDialog(object):
def setupUi(self, UDSMessageDialog):
UDSMessageDialog.setObjectName(_fromUtf8("UDSMessageDialog"))
UDSMessageDialog.resize(339, 188)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(UDSMessageDialog.sizePolicy().hasHeightForWidth())
UDSMessageDialog.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setFamily(_fromUtf8("Verdana"))
font.setPointSize(10)
UDSMessageDialog.setFont(font)
self.verticalLayoutWidget = QtGui.QWidget(UDSMessageDialog)
self.verticalLayoutWidget.setGeometry(QtCore.QRect(10, 10, 321, 171))
self.verticalLayoutWidget.setObjectName(_fromUtf8("verticalLayoutWidget"))
self.verticalLayout = QtGui.QVBoxLayout(self.verticalLayoutWidget)
self.verticalLayout.setMargin(0)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.message = QtGui.QTextBrowser(self.verticalLayoutWidget)
self.message.setObjectName(_fromUtf8("message"))
self.verticalLayout.addWidget(self.message)
spacerItem = QtGui.QSpacerItem(20, 15, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
self.verticalLayout.addItem(spacerItem)
self.buttonBox = QtGui.QDialogButtonBox(self.verticalLayoutWidget)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Ok)
self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
self.verticalLayout.addWidget(self.buttonBox)
self.retranslateUi(UDSMessageDialog)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("clicked(QAbstractButton*)")), UDSMessageDialog.closeDialog)
QtCore.QMetaObject.connectSlotsByName(UDSMessageDialog)
def retranslateUi(self, UDSMessageDialog):
UDSMessageDialog.setWindowTitle(_translate("UDSMessageDialog", "UDS Actor", None))
if __name__ == "__main__":
import sys
app = QtGui.QApplication(sys.argv)
UDSMessageDialog = QtGui.QDialog()
ui = Ui_UDSMessageDialog()
ui.setupUi(UDSMessageDialog)
UDSMessageDialog.show()
sys.exit(app.exec_())

327
actors/src/setup-dialog.ui Normal file
View File

@@ -0,0 +1,327 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>UdsActorSetupDialog</class>
<widget class="QDialog" name="UdsActorSetupDialog">
<property name="windowModality">
<enum>Qt::WindowModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>243</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>Verdana</family>
<pointsize>9</pointsize>
</font>
</property>
<property name="windowTitle">
<string>UDS Actor Configuration</string>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<property name="sizeGripEnabled">
<bool>false</bool>
</property>
<property name="modal">
<bool>true</bool>
</property>
<widget class="QPushButton" name="testButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>20</x>
<y>160</y>
<width>361</width>
<height>23</height>
</rect>
</property>
<property name="toolTip">
<string>Click to test the selecter parameters</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Click on this button to test the server host and master key parameters.&lt;/p&gt;&lt;p&gt;A window will be displayed with results after the test is executed.&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;This button will only be active if all parameters are filled.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Test parameters</string>
</property>
</widget>
<widget class="QPushButton" name="saveButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>20</x>
<y>190</y>
<width>101</width>
<height>23</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Accepts changes and saves them</string>
</property>
<property name="whatsThis">
<string>Clicking on this button will accept all changes and save them, closing the configuration window</string>
</property>
<property name="text">
<string>Accept &amp;&amp; Save</string>
</property>
</widget>
<widget class="QPushButton" name="cancelButton">
<property name="geometry">
<rect>
<x>260</x>
<y>190</y>
<width>121</width>
<height>23</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Cancel all changes and discard them</string>
</property>
<property name="whatsThis">
<string>Discards all changes and closes the configuration window</string>
</property>
<property name="text">
<string>Cancel &amp;&amp; Discard</string>
</property>
</widget>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>361</width>
<height>131</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<property name="verticalSpacing">
<number>16</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>UDS Server Host</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="host">
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Uds Broker Server Addres. Use IP or FQDN</string>
</property>
<property name="whatsThis">
<string>Enter here the UDS Broker Addres using either its IP address or its FQDN address</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>UDS Master Key</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="masterKey">
<property name="toolTip">
<string>Master key to communicate with UDS Broker</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enter the Master Key (found on&lt;span style=&quot; font-weight:600;&quot;&gt; UDS Configuration&lt;/span&gt; section) of the UDS Broker to allow communication of the Actor with Broker&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Security</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="useSSl">
<property name="toolTip">
<string>Select communication security with broker</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select the security for communications with UDS Broker.&lt;/p&gt;&lt;p&gt;The recommended method of communication is &lt;span style=&quot; font-weight:600;&quot;&gt;Use SSL&lt;/span&gt;, but selection needs to be acording to your broker configuration.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<item>
<property name="text">
<string>Do not use SSL</string>
</property>
</item>
<item>
<property name="text">
<string>Use SSL</string>
</property>
</item>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="logLevelLabel">
<property name="text">
<string>Log Level</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="logLevelComboBox">
<property name="currentIndex">
<number>1</number>
</property>
<property name="frame">
<bool>true</bool>
</property>
<item>
<property name="text">
<string notr="true">DEBUG</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">INFO</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">ERROR</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">FATAL</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections>
<connection>
<sender>host</sender>
<signal>textChanged(QString)</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>textChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>123</x>
<y>31</y>
</hint>
<hint type="destinationlabel">
<x>143</x>
<y>48</y>
</hint>
</hints>
</connection>
<connection>
<sender>masterKey</sender>
<signal>textChanged(QString)</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>textChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>258</x>
<y>75</y>
</hint>
<hint type="destinationlabel">
<x>299</x>
<y>84</y>
</hint>
</hints>
</connection>
<connection>
<sender>cancelButton</sender>
<signal>pressed()</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>cancelAndDiscard()</slot>
<hints>
<hint type="sourcelabel">
<x>315</x>
<y>165</y>
</hint>
<hint type="destinationlabel">
<x>231</x>
<y>161</y>
</hint>
</hints>
</connection>
<connection>
<sender>testButton</sender>
<signal>pressed()</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>testParameters()</slot>
<hints>
<hint type="sourcelabel">
<x>239</x>
<y>132</y>
</hint>
<hint type="destinationlabel">
<x>285</x>
<y>185</y>
</hint>
</hints>
</connection>
<connection>
<sender>saveButton</sender>
<signal>pressed()</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>acceptAndSave()</slot>
<hints>
<hint type="sourcelabel">
<x>71</x>
<y>165</y>
</hint>
<hint type="destinationlabel">
<x>124</x>
<y>181</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>textChanged()</slot>
<slot>cancelAndDiscard()</slot>
<slot>testParameters()</slot>
<slot>acceptAndSave()</slot>
</slots>
</ui>

View File

@@ -0,0 +1,152 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'setup-dialog.ui'
#
# Created: Mon Apr 27 22:05:03 2015
# by: PyQt4 UI code generator 4.11.2
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_UdsActorSetupDialog(object):
def setupUi(self, UdsActorSetupDialog):
UdsActorSetupDialog.setObjectName(_fromUtf8("UdsActorSetupDialog"))
UdsActorSetupDialog.setWindowModality(QtCore.Qt.WindowModal)
UdsActorSetupDialog.resize(400, 243)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(UdsActorSetupDialog.sizePolicy().hasHeightForWidth())
UdsActorSetupDialog.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setFamily(_fromUtf8("Verdana"))
font.setPointSize(9)
UdsActorSetupDialog.setFont(font)
UdsActorSetupDialog.setAutoFillBackground(False)
UdsActorSetupDialog.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
UdsActorSetupDialog.setSizeGripEnabled(False)
UdsActorSetupDialog.setModal(True)
self.testButton = QtGui.QPushButton(UdsActorSetupDialog)
self.testButton.setEnabled(False)
self.testButton.setGeometry(QtCore.QRect(20, 160, 361, 23))
self.testButton.setObjectName(_fromUtf8("testButton"))
self.saveButton = QtGui.QPushButton(UdsActorSetupDialog)
self.saveButton.setEnabled(False)
self.saveButton.setGeometry(QtCore.QRect(20, 190, 101, 23))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.saveButton.sizePolicy().hasHeightForWidth())
self.saveButton.setSizePolicy(sizePolicy)
self.saveButton.setObjectName(_fromUtf8("saveButton"))
self.cancelButton = QtGui.QPushButton(UdsActorSetupDialog)
self.cancelButton.setGeometry(QtCore.QRect(260, 190, 121, 23))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.cancelButton.sizePolicy().hasHeightForWidth())
self.cancelButton.setSizePolicy(sizePolicy)
self.cancelButton.setObjectName(_fromUtf8("cancelButton"))
self.layoutWidget = QtGui.QWidget(UdsActorSetupDialog)
self.layoutWidget.setGeometry(QtCore.QRect(20, 20, 361, 131))
self.layoutWidget.setObjectName(_fromUtf8("layoutWidget"))
self.formLayout = QtGui.QFormLayout(self.layoutWidget)
self.formLayout.setFieldGrowthPolicy(QtGui.QFormLayout.AllNonFixedFieldsGrow)
self.formLayout.setMargin(0)
self.formLayout.setVerticalSpacing(16)
self.formLayout.setObjectName(_fromUtf8("formLayout"))
self.label = QtGui.QLabel(self.layoutWidget)
self.label.setObjectName(_fromUtf8("label"))
self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.label)
self.host = QtGui.QLineEdit(self.layoutWidget)
self.host.setAcceptDrops(False)
self.host.setObjectName(_fromUtf8("host"))
self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.host)
self.label_3 = QtGui.QLabel(self.layoutWidget)
self.label_3.setObjectName(_fromUtf8("label_3"))
self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.label_3)
self.masterKey = QtGui.QLineEdit(self.layoutWidget)
self.masterKey.setObjectName(_fromUtf8("masterKey"))
self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.masterKey)
self.label_4 = QtGui.QLabel(self.layoutWidget)
self.label_4.setObjectName(_fromUtf8("label_4"))
self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.label_4)
self.useSSl = QtGui.QComboBox(self.layoutWidget)
self.useSSl.setObjectName(_fromUtf8("useSSl"))
self.useSSl.addItem(_fromUtf8(""))
self.useSSl.addItem(_fromUtf8(""))
self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.useSSl)
self.logLevelLabel = QtGui.QLabel(self.layoutWidget)
self.logLevelLabel.setObjectName(_fromUtf8("logLevelLabel"))
self.formLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.logLevelLabel)
self.logLevelComboBox = QtGui.QComboBox(self.layoutWidget)
self.logLevelComboBox.setFrame(True)
self.logLevelComboBox.setObjectName(_fromUtf8("logLevelComboBox"))
self.logLevelComboBox.addItem(_fromUtf8(""))
self.logLevelComboBox.setItemText(0, _fromUtf8("DEBUG"))
self.logLevelComboBox.addItem(_fromUtf8(""))
self.logLevelComboBox.setItemText(1, _fromUtf8("INFO"))
self.logLevelComboBox.addItem(_fromUtf8(""))
self.logLevelComboBox.setItemText(2, _fromUtf8("ERROR"))
self.logLevelComboBox.addItem(_fromUtf8(""))
self.logLevelComboBox.setItemText(3, _fromUtf8("FATAL"))
self.formLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.logLevelComboBox)
self.retranslateUi(UdsActorSetupDialog)
self.logLevelComboBox.setCurrentIndex(1)
QtCore.QObject.connect(self.host, QtCore.SIGNAL(_fromUtf8("textChanged(QString)")), UdsActorSetupDialog.textChanged)
QtCore.QObject.connect(self.masterKey, QtCore.SIGNAL(_fromUtf8("textChanged(QString)")), UdsActorSetupDialog.textChanged)
QtCore.QObject.connect(self.cancelButton, QtCore.SIGNAL(_fromUtf8("pressed()")), UdsActorSetupDialog.cancelAndDiscard)
QtCore.QObject.connect(self.testButton, QtCore.SIGNAL(_fromUtf8("pressed()")), UdsActorSetupDialog.testParameters)
QtCore.QObject.connect(self.saveButton, QtCore.SIGNAL(_fromUtf8("pressed()")), UdsActorSetupDialog.acceptAndSave)
QtCore.QMetaObject.connectSlotsByName(UdsActorSetupDialog)
def retranslateUi(self, UdsActorSetupDialog):
UdsActorSetupDialog.setWindowTitle(_translate("UdsActorSetupDialog", "UDS Actor Configuration", None))
self.testButton.setToolTip(_translate("UdsActorSetupDialog", "Click to test the selecter parameters", None))
self.testButton.setWhatsThis(_translate("UdsActorSetupDialog", "<html><head/><body><p>Click on this button to test the server host and master key parameters.</p><p>A window will be displayed with results after the test is executed.</p><p><br/></p><p>This button will only be active if all parameters are filled.</p></body></html>", None))
self.testButton.setText(_translate("UdsActorSetupDialog", "Test parameters", None))
self.saveButton.setToolTip(_translate("UdsActorSetupDialog", "Accepts changes and saves them", None))
self.saveButton.setWhatsThis(_translate("UdsActorSetupDialog", "Clicking on this button will accept all changes and save them, closing the configuration window", None))
self.saveButton.setText(_translate("UdsActorSetupDialog", "Accept && Save", None))
self.cancelButton.setToolTip(_translate("UdsActorSetupDialog", "Cancel all changes and discard them", None))
self.cancelButton.setWhatsThis(_translate("UdsActorSetupDialog", "Discards all changes and closes the configuration window", None))
self.cancelButton.setText(_translate("UdsActorSetupDialog", "Cancel && Discard", None))
self.label.setText(_translate("UdsActorSetupDialog", "UDS Server Host", None))
self.host.setToolTip(_translate("UdsActorSetupDialog", "Uds Broker Server Addres. Use IP or FQDN", None))
self.host.setWhatsThis(_translate("UdsActorSetupDialog", "Enter here the UDS Broker Addres using either its IP address or its FQDN address", None))
self.label_3.setText(_translate("UdsActorSetupDialog", "UDS Master Key", None))
self.masterKey.setToolTip(_translate("UdsActorSetupDialog", "Master key to communicate with UDS Broker", None))
self.masterKey.setWhatsThis(_translate("UdsActorSetupDialog", "<html><head/><body><p>Enter the Master Key (found on<span style=\" font-weight:600;\"> UDS Configuration</span> section) of the UDS Broker to allow communication of the Actor with Broker</p></body></html>", None))
self.label_4.setText(_translate("UdsActorSetupDialog", "Security", None))
self.useSSl.setToolTip(_translate("UdsActorSetupDialog", "Select communication security with broker", None))
self.useSSl.setWhatsThis(_translate("UdsActorSetupDialog", "<html><head/><body><p>Select the security for communications with UDS Broker.</p><p>The recommended method of communication is <span style=\" font-weight:600;\">Use SSL</span>, but selection needs to be acording to your broker configuration.</p></body></html>", None))
self.useSSl.setItemText(0, _translate("UdsActorSetupDialog", "Do not use SSL", None))
self.useSSl.setItemText(1, _translate("UdsActorSetupDialog", "Use SSL", None))
self.logLevelLabel.setText(_translate("UdsActorSetupDialog", "Log Level", None))
if __name__ == "__main__":
import sys
app = QtGui.QApplication(sys.argv)
UdsActorSetupDialog = QtGui.QDialog()
ui = Ui_UdsActorSetupDialog()
ui.setupUi(UdsActorSetupDialog)
UdsActorSetupDialog.show()
sys.exit(app.exec_())

215
actors/src/test.py Normal file
View File

@@ -0,0 +1,215 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import urllib3
from udsactor import operations
from udsactor import store
from udsactor import REST
from udsactor import ipc
from udsactor import httpserver
from time import sleep
import random
import requests
import json
import logging
def testRest():
# cfg = store.readConfig()
cfg = {'host': '172.27.0.1:8000', 'masterKey': '8f914604ad2c5c558575856299866bbb', 'ssl': False}
print(cfg)
print("Intefaces: ", list(operations.getNetworkInfo()))
print("Joined Domain: ", operations.getDomainName())
# renameComputer('win7-64')
# joinDomain('dom.dkmon.com', 'ou=pruebas_2,dc=dom,dc=dkmon,dc=com', 'administrador@dom.dkmon.com', 'Temporal2012', True)
# reboot()
r = REST.Api(cfg['host'], cfg['masterKey'], cfg['ssl'], scrambledResponses=True)
print("Connected: {}".format(r.isConnected))
r.test()
try:
r.init('02:46:00:00:00:07')
except REST.UnmanagedHostError:
print('Unmanaged host (confirmed)')
uuid = r.init('02:46:00:00:00:08')
print("Notify comm:", r.notifyComm('http://172.27.0.1:8000/'))
print("Connected: {}".format(r.isConnected))
print('uuid = {}'.format(uuid))
# print 'Login: {}'.format(r.login('test-user'))
# print 'Logout: {}'.format(r.logout('test-user'))
print("Information: >>{}<<".format(r.information()))
print("Login: >>{}<<".format(r.login('Pepito')))
print(r.setReady([(v.mac, v.ip) for v in operations.getNetworkInfo()]))
print(r.log(10000, 'Test error message'))
def ipcTest():
s = ipc.ServerIPC(39188) # I have got the enterprise number for Virtual Cable. This number is not about ports, but as good as any other selection :)
s.start()
sleep(1)
client = ipc.ClientIPC(39188)
client.start()
client2 = ipc.ClientIPC(39188)
client2.start()
print("Requesting information")
client.requestInformation()
print("Sending login info")
client.sendLogin('user1')
print("Sending logout info")
client.sendLogout('mariete' * 1000)
print('Sending message')
s.sendMessage(ipc.MSG_LOGOFF, None)
s.sendMessage(ipc.MSG_MESSAGE, 'Cierra la sesión')
s.sendMessage(33, 'invalid')
s.sendMessage(ipc.MSG_SCRIPT, 'print "hello"')
print('Message sent')
for c in (client, client2):
print(c.getMessage())
print(c.getMessage())
print(c.getMessage())
client.stop()
client.join()
s.sendMessage(ipc.MSG_LOGOFF, None)
s.sendMessage(ipc.MSG_MESSAGE, 'Cierra la sesión')
s.sendMessage(33, 'invalid')
s.sendMessage(ipc.MSG_SCRIPT, 'print "hello"')
print(client2.getMessage())
print(client2.getMessage())
print(client2.getMessage())
client2.stop()
s.stop()
client2.join()
s.join()
def ipcServer():
s = ipc.ServerIPC(39188, {'idle': 180}) # I have got the enterprise number for Virtual Cable. This number is not about ports, but as good as any other selection :)
s.start()
counter = 0
while True:
try:
counter += 1
print("Sending new message {}".format(counter))
s.sendMessage(ipc.MSG_MESSAGE, 'This is a test message ñöitó 33.3€ {}'.format(counter))
counter += 1
s.sendMessage(ipc.MSG_SCRIPT, 'print "This is a test message ñöitó 33.3€ {}"'.format(counter))
counter += 1
s.sendMessage(ipc.MSG_LOGOFF, None)
sleep(1)
except:
break
s.stop()
def testIdle():
for _ in range(1, 10):
print(operations.getIdleDuration())
sleep(1)
def testServer():
# Disable verify warinings
logging.getLogger("requests").setLevel(logging.ERROR)
urllib3.disable_warnings() # @UndefinedVariable
s = ipc.ServerIPC(39188) # I have got the enterprise number for Virtual Cable. This number is not about ports, but as good as any other selection :)
s.start()
client = ipc.ClientIPC(39188)
client.start()
while True:
try:
port = random.randrange(32000, 64000)
server = httpserver.HTTPServerThread(('172.27.0.8', port), s)
break
except:
pass
serverUrl = server.getServerUrl()
server.start()
print(serverUrl)
res = requests.post(serverUrl + '/message', data=json.dumps({'message': 'Test message'}), headers={'content-type': 'application/json'}, verify=False)
print(res)
print(res.json())
res = requests.post(serverUrl + '/script', data=json.dumps({'script': 'import time\ntime.sleep(1)\nfor v in xrange(10): print "Hello world, this is an script"'}), headers={'content-type': 'application/json'}, verify=False)
print(res)
print(res.json())
res = requests.post(serverUrl + '/script', data=json.dumps({'script': 'print "Hello world, this is an script"', 'user': True}), headers={'content-type': 'application/json'}, verify=False)
print(res)
print(res.json())
res = requests.get(serverUrl + '/information?param1=1&param2=2', headers={'content-type': 'application/json'}, verify=False)
print(res)
print(res.json())
print("Messages:")
print(client.getMessage())
print(client.getMessage())
# try:
# while True:
# Sleep(1000)
# except:
# pass
server.stop()
s.stop()
client.stop()
def testRemote():
serverUrl = "https://172.27.0.208:52562/633a1245873848b7b4017c23283bc195"
print(serverUrl)
res = requests.post(serverUrl + '/message', data=json.dumps({'message': 'Test message'}), headers={'content-type': 'application/json'}, verify=False)
print(res)
print(res.json())
res = requests.post(serverUrl + '/script', data=json.dumps({'script': 'import time\ntime.sleep(1)\nfor v in xrange(10): print "Hello world, this is an script"'}), headers={'content-type': 'application/json'}, verify=False)
print(res)
print(res.json())
res = requests.post(serverUrl + '/script', data=json.dumps({'script': 'print "Hello world, this is an script"', 'user': True}), headers={'content-type': 'application/json'}, verify=False)
print(res)
print(res.json())
res = requests.get(serverUrl + '/information?param1=1&param2=2', headers={'content-type': 'application/json'}, verify=False)
print(res)
print(res.json())
if __name__ == '__main__':
# ipcServer()
# ipcTest()
testRest()
# testIdle()
# testServer()
# testRemote()

237
actors/src/udsactor/REST.py Normal file
View File

@@ -0,0 +1,237 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 201 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
# pylint: disable-msg=E1101,W0703
from __future__ import unicode_literals
import requests
import logging
import json
import uuid
import six
import warnings
from udsactor.log import logger
from udsactor import VERSION
from .utils import exceptionToMessage
VERIFY_CERT = False
class RESTError(Exception):
ERRCODE = 0
class ConnectionError(RESTError):
ERRCODE = -1
# Errors ""raised"" from broker
class InvalidKeyError(RESTError):
ERRCODE = 1
class UnmanagedHostError(RESTError):
ERRCODE = 2
class UserServiceNotFoundError(RESTError):
ERRCODE = 3
class OsManagerError(RESTError):
ERRCODE = 4
# Disable warnings log messages
try:
import urllib3 # @UnusedImport
except Exception:
from requests.packages import urllib3 # @Reimport
try:
urllib3.disable_warnings() # @UndefinedVariable
warnings.simplefilter("ignore")
except Exception:
pass # In fact, isn't too important, but wil log warns to logging file
def ensureResultIsOk(result):
if 'error' not in result:
return
for i in (InvalidKeyError, UnmanagedHostError, UserServiceNotFoundError, OsManagerError):
if result['error'] == i.ERRCODE:
raise i(result['result'])
err = RESTError(result['result'])
err.ERRCODE = result['error']
raise err
class Api(object):
def __init__(self, host, masterKey, ssl):
self.host = host
self.masterKey = masterKey
self.useSSL = True if ssl else False
self.uuid = None
self.mac = None
self.url = "{}://{}/rest/actor/".format(('http', 'https')[self.useSSL], self.host)
self.idle = None
self.maxSession = None
self.secretKey = six.text_type(uuid.uuid4())
try:
self.newerRequestLib = requests.__version__.split('.')[0] >= '1'
except Exception:
self.newerRequestLib = False # I no version, guess this must be an old requests
# Disable logging requests messages except for errors, ...
logging.getLogger("requests").setLevel(logging.CRITICAL)
# Tries to disable all warnings
try:
warnings.simplefilter("ignore") # Disables all warnings
except Exception:
pass
def _getUrl(self, method, key=None, ids=None):
url = self.url + method
params = []
if key is not None:
params.append('key=' + key)
if ids is not None:
params.append('id=' + ids)
params.append('version=' + VERSION)
if len(params) > 0:
url += '?' + '&'.join(params)
return url
def _request(self, url, data=None):
try:
if data is None:
# Old requests version does not support verify, but they do not checks ssl certificate by default
if self.newerRequestLib:
r = requests.get(url, verify=VERIFY_CERT)
else:
logger.debug('Requesting with old')
r = requests.get(url) # Always ignore certs??
else:
if self.newerRequestLib:
r = requests.post(url, data=data, headers={'content-type': 'application/json'}, verify=VERIFY_CERT)
else:
logger.debug('Requesting with old')
r = requests.post(url, data=data, headers={'content-type': 'application/json'})
r = json.loads(r.content) # Using instead of r.json() to make compatible with oooold rquests lib versions
except requests.exceptions.RequestException as e:
raise ConnectionError(e)
except Exception as e:
raise ConnectionError(exceptionToMessage(e))
ensureResultIsOk(r)
return r
@property
def isConnected(self):
return self.uuid is not None
def test(self):
url = self._getUrl('test', self.masterKey)
return self._request(url)['result']
def init(self, ids):
'''
Ids is a comma separated values indicating MAC=ip
Server returns:
uuid, mac
Optionally can return an third parameter, that is max "idle" request time
'''
logger.debug('Invoking init')
url = self._getUrl('init', key=self.masterKey, ids=ids)
res = self._request(url)['result']
logger.debug('Got response parameters: {}'.format(res))
self.uuid, self.mac = res[0:2]
# Optional idle parameter
try:
self.idle = int(res[2])
if self.idle < 30:
self.idle = None # No values under 30 seconds are allowed :)
except Exception:
self.idle = None
return self.uuid
def postMessage(self, msg, data, processData=True):
logger.debug('Invoking post message {} with data {}'.format(msg, data))
if self.uuid is None:
raise ConnectionError('REST api has not been initialized')
if processData:
data = json.dumps({'data': data})
url = self._getUrl('/'.join([self.uuid, msg]))
return self._request(url, data)['result']
def notifyComm(self, url):
logger.debug('Notifying comms {}'.format(url))
return self.postMessage('notifyComms', url)
def login(self, username):
logger.debug('Notifying login {}'.format(username))
return self.postMessage('login', username)
def logout(self, username):
logger.debug('Notifying logout {}'.format(username))
return self.postMessage('logout', username)
def information(self):
logger.debug('Requesting information'.format())
return self.postMessage('information', '')
def setReady(self, ipsInfo):
logger.debug('Notifying readyness: {}'.format(ipsInfo))
data = ','.join(['{}={}'.format(v[0], v[1]) for v in ipsInfo])
return self.postMessage('ready', data)
def notifyIpChanges(self, ipsInfo):
logger.debug('Notifying ip changes: {}'.format(ipsInfo))
data = ','.join(['{}={}'.format(v[0], v[1]) for v in ipsInfo])
return self.postMessage('ip', data)
def log(self, logLevel, message):
data = json.dumps({'message': message, 'level': logLevel})
return self.postMessage('log', data, processData=False)

View File

@@ -0,0 +1,54 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from __future__ import unicode_literals
# On centos, old six release does not includes byte2int, nor six.PY2
import six
VERSION = '2.0.0'
__title__ = 'udsactor'
__version__ = VERSION
__build__ = 0x010750
__author__ = 'Adolfo Gómez <dkmaster@dkmon.com>'
__license__ = "BSD 3-clause"
__copyright__ = "Copyright 2014-2016 VirtualCable S.L.U."
if not hasattr(six, 'byte2int'):
if six.PY3:
import operator
six.byte2int = operator.itemgetter(0)
else:
def _byte2int(bs):
return ord(bs[0])
six.byte2int = _byte2int

View File

@@ -0,0 +1,101 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from tempfile import gettempdir
from os.path import exists, join
CERTFILE = 'UDSActor.pem'
def createSelfSignedCert(force=False):
certFile = join(gettempdir(), CERTFILE)
if exists(certFile) and not force:
return certFile
certData = '''-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCb50K3mIznNklz
yVAD7xSQOSJQ6+NPXj7U9/4zLZ+TvmbQ7RqUUsxbfxHbeRnoYTWV2nKk4+tHqmvz
ujLSS/loFhTSMqtrLn7rowSYJoQhKOUkAiQlWkqCfItWgL5pJopDpNHFul9Rn3ds
PMWQTiGeUNR4Y3RnBhr1Q1BsqAzf4m6zFUmgLPPmVLdF4uJ3Tuz8TSy2gWLs5aSr
5do4WamwUfYjRSVMJECmwjUM4rQ8SQgg0sHBeBuDUGNBvBQFac1G7qUcMReeu8Zr
DUtMsXma/l4rA8NB5CRmTrQbTBF4l+jb2BDFebDqDUK1Oqs9X35yOQfDOAFYHiix
PX0IsXOZAgMBAAECggEBAJi3000RrIUZUp6Ph0gzPMuCjDEEwWiQA7CPNX1gpb8O
dp0WhkDhUroWIaICYPSXtOwUTtVjRqivMoxPy1Thg3EIoGC/rdeSdlXRHMEGicwJ
yVyalFnatr5Xzg5wkxVh4XMd0zeDt7e3JD7s0QLo5lm1CEzd77qz6lhzFic5/1KX
bzdULtTlq60dazg2hEbcS4OmM1UMCtRVDAsOIUIZPL0M9j1C1d1iEdYnh2xshKeG
/GOfo95xsgdMlGjtv3hUT5ryKVoEsu+36rGb4VfhPfUvvoVbRx5QZpW+QvxaYh5E
Fi0JEROozFwG31Y++8El7J3yQko8cFBa1lYYUwwpNAECgYEAykT+GiM2YxJ4uVF1
OoKiE9BD53i0IG5j87lGPnWqzEwYBwnqjEKDTou+uzMGz3MDV56UEFNho7wUWh28
LpEkjJB9QgbsugjxIBr4JoL/rYk036e/6+U8I95lvYWrzb+rBMIkRDYI7kbQD/mQ
piYUpuCkTymNAu2RisK6bBzJslkCgYEAxVE23OQvkCeOV8hJNPZGpJ1mDS+TiOow
oOScMZmZpail181eYbAfMsCr7ri812lSj98NvA2GNVLpddil6LtS1cQ5p36lFBtV
xQUMZiFz4qVbEak+izL+vPaev/mXXsOcibAIQ+qI/0txFpNhJjpaaSy6vRCBYFmc
8pgSoBnBI0ECgYAUKCn2atnpp5aWSTLYgNosBU4vDA1PShD14dnJMaqyr0aZtPhF
v/8b3btFJoGgPMLxgWEZ+2U4ju6sSFhPf7FXvLJu2QfQRkHZRDbEh7t5DLpTK4Fp
va9vl6Ml7uM/HsGpOLuqfIQJUs87OFCc7iCSvMJDDU37I7ekT2GKkpfbCQKBgBrE
0NeY0WcSJrp7/oqD2sOcYurpCG/rrZs2SIZmGzUhMxaa0vIXzbO59dlWELB8pmnE
Tf20K//x9qA5OxDe0PcVPukdQlH+/1zSOYNliG44FqnHtyd1TJ/gKVtMBiAiE4uO
aSClod5Yosf4SJbCFd/s5Iyfv52NqsAyp1w3Aj/BAoGAVCnEiGUfyHlIR+UH4zZW
GXJMeqdZLfcEIszMxLePkml4gUQhoq9oIs/Kw+L1DDxUwzkXN4BNTlFbOSu9gzK1
dhuIUGfS6RPL88U+ivC3A0y2jT43oUMqe3hiRt360UQ1GXzp2dMnR9odSRB1wHoO
IOjEBZ8341/c9ZHc5PCGAG8=
-----END PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIID7zCCAtegAwIBAgIJAIrEIthCfxUCMA0GCSqGSIb3DQEBCwUAMIGNMQswCQYD
VQQGEwJFUzEPMA0GA1UECAwGTWFkcmlkMREwDwYDVQQHDAhBbGNvcmNvbjEMMAoG
A1UECgwDVURTMQ4wDAYDVQQLDAVBY3RvcjESMBAGA1UEAwwJVURTIEFjdG9yMSgw
JgYJKoZIhvcNAQkBFhlzdXBwb3J0QHVkc2VudGVycHJpc2UuY29tMB4XDTE0MTAy
NjIzNDEyNFoXDTI0MTAyMzIzNDEyNFowgY0xCzAJBgNVBAYTAkVTMQ8wDQYDVQQI
DAZNYWRyaWQxETAPBgNVBAcMCEFsY29yY29uMQwwCgYDVQQKDANVRFMxDjAMBgNV
BAsMBUFjdG9yMRIwEAYDVQQDDAlVRFMgQWN0b3IxKDAmBgkqhkiG9w0BCQEWGXN1
cHBvcnRAdWRzZW50ZXJwcmlzZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
ggEKAoIBAQCb50K3mIznNklzyVAD7xSQOSJQ6+NPXj7U9/4zLZ+TvmbQ7RqUUsxb
fxHbeRnoYTWV2nKk4+tHqmvzujLSS/loFhTSMqtrLn7rowSYJoQhKOUkAiQlWkqC
fItWgL5pJopDpNHFul9Rn3dsPMWQTiGeUNR4Y3RnBhr1Q1BsqAzf4m6zFUmgLPPm
VLdF4uJ3Tuz8TSy2gWLs5aSr5do4WamwUfYjRSVMJECmwjUM4rQ8SQgg0sHBeBuD
UGNBvBQFac1G7qUcMReeu8ZrDUtMsXma/l4rA8NB5CRmTrQbTBF4l+jb2BDFebDq
DUK1Oqs9X35yOQfDOAFYHiixPX0IsXOZAgMBAAGjUDBOMB0GA1UdDgQWBBRShS90
5lJTNvYPIEqP3GxWwG5iiDAfBgNVHSMEGDAWgBRShS905lJTNvYPIEqP3GxWwG5i
iDAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAU0Sp4gXhQmRVzq+7+
vRFUkQuPj4Ga/d9r5Wrbg3hck3+5pwe9/7APoq0P/M0DBhQpiJKjrD6ydUevC+Y/
43ZOJPhMlNw0o6TdQxOkX6FDwQanLLs7sfvJvqtVzYn3nuRFKT3dvl7Zg44QMw2M
ay42q59fAcpB4LaDx/i7gOYSS5eca3lYW7j7YSr/+ozXK2KlgUkuCUHN95lOq+dF
trmV9mjzM4CNPZqKSE7kpHRywgrXGPCO000NvEGSYf82AtgRSFKiU8NWLQSEPdcB
k//2dsQZw2cRZ8DrC2B6Tb3M+3+CA6wVyqfqZh1SZva3LfGvq/C+u+ItguzPqNpI
xtvM
-----END CERTIFICATE-----'''
with open(certFile, "wt") as f:
f.write(certData)
return certFile

View File

@@ -0,0 +1,221 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from __future__ import unicode_literals
from udsactor.log import logger
from udsactor import utils
from udsactor.certs import createSelfSignedCert
from udsactor.scriptThread import ScriptExecutorThread
import threading
import string
import random
import json
import six
from six.moves import socketserver # @UnresolvedImport, pylint: disable=import-error
from six.moves import BaseHTTPServer # @UnresolvedImport, pylint: disable=import-error
import time
import ssl
startTime = time.time()
class HTTPServerHandler(BaseHTTPServer.BaseHTTPRequestHandler):
protocol_version = 'HTTP/1.0'
server_version = 'UDS Actor Server'
sys_version = ''
uuid = None
service = None
lock = threading.Lock()
def sendJsonError(self, code, message):
self.send_response(code)
self.send_header('Content-type', 'application/json')
self.end_headers()
self.wfile.write(json.dumps({'error': message}))
return
def sendJsonResponse(self, data):
self.send_response(200)
data = json.dumps(data)
self.send_header('Content-type', 'application/json')
self.send_header('Content-Length', len(data))
self.end_headers()
# Send the html message
self.wfile.write(data)
def do_GET(self):
# Very simple path & params splitter
path = self.path.split('?')[0][1:].split('/')
try:
params = dict((v.split('=') for v in self.path.split('?')[1].split('&')))
except Exception:
params = {}
if path[0] != HTTPServerHandler.uuid:
self.sendJsonError(403, 'Forbidden')
return
if len(path) != 2:
self.sendJsonResponse("UDS Actor has been running for {} seconds".format(time.time() - startTime))
return
try:
operation = getattr(self, 'get_' + path[1])
result = operation(params) # Protect not POST methods
except AttributeError:
self.sendJsonError(404, 'Method not found')
return
except Exception as e:
logger.error('Got exception executing GET {}: {}'.format(path[1], utils.toUnicode(e.message)))
self.sendJsonError(500, str(e))
return
self.sendJsonResponse(result)
def do_POST(self):
path = self.path.split('?')[0][1:].split('/')
if path[0] != HTTPServerHandler.uuid:
self.sendJsonError(403, 'Forbidden')
return
if len(path) != 2:
self.sendJsonError(400, 'Invalid request')
return
try:
HTTPServerHandler.lock.acquire()
length = int(self.headers.getheader('content-length'))
content = self.rfile.read(length)
logger.debug('length: {}, content >>{}<<'.format(length, content))
params = json.loads(content)
operation = getattr(self, 'post_' + path[1])
result = operation(params) # Protect not POST methods
except AttributeError:
self.sendJsonError(404, 'Method not found')
return
except Exception as e:
logger.error('Got exception executing POST {}: {}'.format(path[1], utils.toUnicode(e.message)))
self.sendJsonError(500, str(e))
return
finally:
HTTPServerHandler.lock.release()
self.sendJsonResponse(result)
def post_logoff(self, params):
logger.debug('Sending LOGOFF to clients')
HTTPServerHandler.service.ipc.sendLoggofMessage()
return 'ok'
# Alias
post_logout = post_logoff
def post_message(self, params):
logger.debug('Sending MESSAGE to clients')
if 'message' not in params:
raise Exception('Invalid message parameters')
HTTPServerHandler.service.ipc.sendMessageMessage(params['message'])
return 'ok'
def post_script(self, params):
logger.debug('Received script: {}'.format(params))
if 'script' not in params:
raise Exception('Invalid script parameters')
if 'user' in params:
logger.debug('Sending SCRIPT to clients')
HTTPServerHandler.service.ipc.sendScriptMessage(params['script'])
else:
# Execute script at server space, that is, here
# as a secondary thread
th = ScriptExecutorThread(params['script'])
th.start()
return 'ok'
def post_preConnect(self, params):
logger.debug('Received Pre connection')
if 'user' not in params or 'protocol' not in params:
raise Exception('Invalid preConnect parameters')
return HTTPServerHandler.service.preConnect(params.get('user'), params.get('protocol'))
def get_information(self, params):
# TODO: Return something useful? :)
return 'Up and running'
def get_uuid(self, params):
return self.service.api.uuid
def log_error(self, fmt, *args):
logger.error('HTTP ' + fmt % args)
def log_message(self, fmt, *args):
logger.info('HTTP ' + fmt % args)
class HTTPServerThread(threading.Thread):
def __init__(self, address, service):
super(self.__class__, self).__init__()
if HTTPServerHandler.uuid is None:
HTTPServerHandler.uuid = ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(48))
self.certFile = createSelfSignedCert()
HTTPServerHandler.service = service
self.initiateServer(address)
def initiateServer(self, address):
self.server = socketserver.TCPServer(address, HTTPServerHandler)
self.server.socket = ssl.wrap_socket(self.server.socket, certfile=self.certFile, server_side=True)
def getServerUrl(self):
return 'https://{}:{}/{}'.format(self.server.server_address[0], self.server.server_address[1], HTTPServerHandler.uuid)
def stop(self):
logger.debug('Stopping REST Service')
self.server.shutdown()
def restart(self, address=None):
if address is None:
address = self.server.server_address
self.stop()
self.initiateServer(address)
def run(self):
self.server.serve_forever()

421
actors/src/udsactor/ipc.py Normal file
View File

@@ -0,0 +1,421 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from __future__ import unicode_literals
import socket
import threading
import sys
import six
import traceback
import pickle
from udsactor.utils import toUnicode
from udsactor.log import logger
# The IPC Server will wait for connections from clients
# Clients will open socket, and wait for data from server
# The messages sent (from server) will be the following (subject to future changes):
# Message_id Data Action
# ------------ -------- --------------------------
# MSG_LOGOFF None Logout user from session
# MSG_MESSAGE message,level Display a message with level (INFO, WARN, ERROR, FATAL) # TODO: Include level, right now only has message
# MSG_SCRIPT python script Execute an specific python script INSIDE CLIENT environment (this messages is not sent right now)
# The messages received (sent from client) will be the following:
# Message_id Data Action
# ------------ -------- --------------------------
# REQ_LOGOUT Logout user from session
# REQ_INFORMATION None Request information from ipc server (maybe configuration parameters in a near future)
# REQ_LOGIN python script Execute an specific python script INSIDE CLIENT environment (this messages is not sent right now)
#
# All messages are in the form:
# BYTE
# 0 1-2 3 4 ...
# MSG_ID DATA_LENGTH (little endian) Data (can be 0 length)
# With a previos "MAGIC" header in fron of each message
MSG_LOGOFF = 0xA1
MSG_MESSAGE = 0xB2
MSG_SCRIPT = 0xC3
MSG_INFORMATION = 0xD4
# Request messages
REQ_INFORMATION = MSG_INFORMATION
REQ_LOGIN = 0xE5
REQ_LOGOUT = MSG_LOGOFF
VALID_MESSAGES = (MSG_LOGOFF, MSG_MESSAGE, MSG_SCRIPT, MSG_INFORMATION)
REQ_INFORMATION = 0xAA
# Reverse msgs dict for debugging
REV_DICT = {
MSG_LOGOFF: 'MSG_LOGOFF',
MSG_MESSAGE: 'MSG_MESSAGE',
MSG_SCRIPT: 'MSG_SCRIPT',
MSG_INFORMATION: 'MSG_INFORMATION',
REQ_LOGIN: 'REQ_LOGIN',
REQ_LOGOUT: 'REQ_LOGOUT'
}
MAGIC = b'\x55\x44\x53\x00' # UDS in hexa with a padded 0 to the right
# Allows notifying login/logout from client for linux platform
ALLOW_LOG_METHODS = sys.platform != 'win32'
# States for client processor
ST_SECOND_BYTE = 0x01
ST_RECEIVING = 0x02
ST_PROCESS_MESSAGE = 0x02
class ClientProcessor(threading.Thread):
def __init__(self, parent, clientSocket):
super(self.__class__, self).__init__()
self.parent = parent
self.clientSocket = clientSocket
self.running = False
self.messages = six.moves.queue.Queue(32) # @UndefinedVariable
def stop(self):
logger.debug('Stoping client processor')
self.running = False
def processRequest(self, msg, data):
logger.debug('Got Client message {}={}'.format(msg, REV_DICT.get(msg)))
if self.parent.clientMessageProcessor is not None:
self.parent.clientMessageProcessor(msg, data)
def run(self):
self.running = True
self.clientSocket.setblocking(0)
state = None
recv_msg = None
recv_data = None
while self.running:
try:
counter = 1024
while counter > 0: # So we process at least the incoming queue every XX bytes readed
counter -= 1
b = self.clientSocket.recv(1)
if b == b'':
# Client disconnected
self.running = False
break
buf = six.byte2int(b) # Empty buffer, this is set as non-blocking
if state is None:
if buf in (REQ_INFORMATION, REQ_LOGIN, REQ_LOGOUT):
logger.debug('State set to {}'.format(buf))
state = buf
recv_msg = buf
continue # Get next byte
else:
logger.debug('Got unexpected data {}'.format(buf))
elif state in (REQ_INFORMATION, REQ_LOGIN, REQ_LOGOUT):
logger.debug('First length byte is {}'.format(buf))
msg_len = buf
state = ST_SECOND_BYTE
continue
elif state == ST_SECOND_BYTE:
msg_len += buf << 8
logger.debug('Second length byte is {}, len is {}'.format(buf, msg_len))
if msg_len == 0:
self.processRequest(recv_msg, None)
state = None
break
state = ST_RECEIVING
recv_data = b''
continue
elif state == ST_RECEIVING:
recv_data += six.int2byte(buf)
msg_len -= 1
if msg_len == 0:
self.processRequest(recv_msg, recv_data)
recv_data = None
state = None
break
else:
logger.debug('Got invalid message from request: {}, state: {}'.format(buf, state))
except socket.error as e:
# If no data is present, no problem at all, pass to check messages
pass
except Exception as e:
tb = traceback.format_exc()
logger.error('Error: {}, trace: {}'.format(e, tb))
if self.running is False:
break
try:
msg = self.messages.get(block=True, timeout=1)
except six.moves.queue.Empty: # No message got in time @UndefinedVariable
continue
logger.debug('Got message {}={}'.format(msg, REV_DICT.get(msg)))
try:
m = msg[1] if msg[1] is not None else b''
l = len(m)
data = MAGIC + six.int2byte(msg[0]) + six.int2byte(l & 0xFF) + six.int2byte(l >> 8) + m
try:
self.clientSocket.sendall(data)
except socket.error as e:
# Send data error
logger.debug('Socket connection is no more available: {}'.format(e.args))
self.running = False
except Exception as e:
logger.error('Invalid message in queue: {}'.format(e))
logger.debug('Client processor stopped')
try:
self.clientSocket.close()
except Exception:
pass # If can't close, nothing happens, just end thread
class ServerIPC(threading.Thread):
def __init__(self, listenPort, clientMessageProcessor=None):
super(self.__class__, self).__init__()
self.port = listenPort
self.running = False
self.serverSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.serverSocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
self.threads = []
self.clientMessageProcessor = clientMessageProcessor
def stop(self):
logger.debug('Stopping Server IPC')
self.running = False
for t in self.threads:
t.stop()
socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect(('localhost', self.port))
self.serverSocket.close()
for t in self.threads:
t.join()
def sendMessage(self, msgId, msgData):
'''
Notify message to all listening threads
'''
logger.debug('Sending message {}({}),{} to all clients'.format(msgId, REV_DICT.get(msgId), msgData))
# Convert to bytes so length is correctly calculated
if isinstance(msgData, six.text_type):
msgData = msgData.encode('utf8')
for t in self.threads:
if t.isAlive():
logger.debug('Sending to {}'.format(t))
t.messages.put((msgId, msgData))
def sendLoggofMessage(self):
self.sendMessage(MSG_LOGOFF, '')
def sendMessageMessage(self, message):
self.sendMessage(MSG_MESSAGE, message)
def sendScriptMessage(self, script):
self.sendMessage(MSG_SCRIPT, script)
def sendInformationMessage(self, info):
self.sendMessage(MSG_INFORMATION, pickle.dumps(info))
def cleanupFinishedThreads(self):
'''
Cleans up current threads list
'''
aliveThreads = []
for t in self.threads:
if t.isAlive():
logger.debug('Thread {} is alive'.format(t))
aliveThreads.append(t)
self.threads[:] = aliveThreads
def run(self):
self.running = True
self.serverSocket.bind(('localhost', self.port))
self.serverSocket.setblocking(1)
self.serverSocket.listen(4)
while True:
try:
(clientSocket, address) = self.serverSocket.accept()
# Stop processing if thread is mean to stop
if self.running is False:
break
logger.debug('Got connection from {}'.format(address))
self.cleanupFinishedThreads() # House keeping
logger.debug('Starting new thread, current: {}'.format(self.threads))
t = ClientProcessor(self, clientSocket)
self.threads.append(t)
t.start()
except Exception as e:
logger.error('Got an exception on Server ipc thread: {}'.format(e))
class ClientIPC(threading.Thread):
def __init__(self, listenPort):
super(ClientIPC, self).__init__()
self.port = listenPort
self.running = False
self.clientSocket = None
self.messages = six.moves.queue.Queue(32) # @UndefinedVariable
self.connect()
def stop(self):
self.running = False
def getMessage(self):
while self.running:
try:
return self.messages.get(timeout=1)
except six.moves.queue.Empty: # @UndefinedVariable
continue
return None
def sendRequestMessage(self, msg, data=None):
logger.debug('Sending request for msg: {}({}), {}'.format(msg, REV_DICT.get(msg), data))
if data is None:
data = b''
if isinstance(data, six.text_type): # Convert to bytes if necessary
data = data.encode('utf-8')
l = len(data)
msg = six.int2byte(msg) + six.int2byte(l & 0xFF) + six.int2byte(l >> 8) + data
self.clientSocket.sendall(msg)
def requestInformation(self):
self.sendRequestMessage(REQ_INFORMATION)
def sendLogin(self, username):
self.sendRequestMessage(REQ_LOGIN, username)
def sendLogout(self, username):
self.sendRequestMessage(REQ_LOGOUT, username)
def messageReceived(self):
'''
Override this method to automatically get notified on new message
received. Message is at self.messages queue
'''
pass # Messa
def receiveBytes(self, number):
msg = b''
while self.running and len(msg) < number:
try:
buf = self.clientSocket.recv(number - len(msg))
if buf == b'':
logger.debug('Buf {}, msg {}({})'.format(buf, msg, REV_DICT.get(msg)))
self.running = False
break
msg += buf
except socket.timeout:
pass
if self.running is False:
logger.debug('Not running, returning None')
return None
return msg
def connect(self):
self.clientSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.clientSocket.connect(('localhost', self.port))
self.clientSocket.settimeout(2) # 2 seconds timeout
def run(self):
self.running = True
while self.running:
try:
msg = b''
# We look for magic message header
while self.running: # Wait for MAGIC
try:
buf = self.clientSocket.recv(len(MAGIC) - len(msg))
if buf == b'':
self.running = False
break
msg += buf
if len(msg) != len(MAGIC):
continue # Do not have message
if msg != MAGIC: # Skip first byte an continue searchong
msg = msg[1:]
continue
break
except socket.timeout: # Timeout is here so we can get stop thread
continue
if self.running is False:
break
# Now we get message basic data (msg + datalen)
msg = bytearray(self.receiveBytes(3))
# We have the magic header, here comes the message itself
if msg is None:
continue
msgId = msg[0]
dataLen = msg[1] + (msg[2] << 8)
if msgId not in VALID_MESSAGES:
raise Exception('Invalid message id: {}'.format(msgId))
data = self.receiveBytes(dataLen)
if data is None:
continue
self.messages.put((msgId, data))
self.messageReceived()
except socket.error as e:
logger.error('Communication with server got an error: {}'.format(toUnicode(e.strerror)))
self.running = False
return
except Exception as e:
tb = traceback.format_exc()
logger.error('Error: {}, trace: {}'.format(e, tb))
try:
self.clientSocket.close()
except Exception:
pass # If can't close, nothing happens, just end thread

View File

@@ -0,0 +1,168 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from __future__ import unicode_literals
from udsactor import operations
from udsactor.service import CommonService
from udsactor.service import initCfg
from udsactor.service import IPC_PORT
from udsactor import ipc
from udsactor.log import logger
from udsactor.linux.daemon import Daemon
from udsactor.linux import renamer
import sys
import time
try:
from prctl import set_proctitle
except Exception: # Platform may not include prctl, so in case it's not available, we let the "name" as is
def set_proctitle(_):
pass
class UDSActorSvc(Daemon, CommonService):
def __init__(self, args=None):
Daemon.__init__(self, '/var/run/udsa.pid')
CommonService.__init__(self)
def rename(self, name, user=None, oldPassword=None, newPassword=None):
'''
Renames the computer, and optionally sets a password for an user
before this
'''
# Check for password change request for an user
if user is not None:
logger.info('Setting password for user {}'.format(user))
try:
operations.changeUserPassword(user, oldPassword, newPassword)
except Exception as e:
# We stop here without even renaming computer, because the
# process has failed
raise Exception(
'Could not change password for user {} (maybe invalid current password is configured at broker): {} '.format(user, unicode(e)))
renamer.rename(name)
self.setReady()
def joinDomain(self, name, domain, ou, account, password):
logger.fatal('Join domain is not supported on linux platforms right now')
def run(self):
initCfg()
logger.debug('Running Daemon')
set_proctitle('UDSActorDaemon')
# Linux daemon will continue running unless something is requested to
while True:
brokerConnected = self.interactWithBroker()
if brokerConnected is False:
logger.debug('Interact with broker returned false, stopping service after a while')
return
elif brokerConnected is True:
break
# If brokerConnected returns None, repeat the cycle
self.doWait(16000) # Wait for a looong while
if self.isAlive is False:
logger.debug('The service is not alive after broker interaction, stopping it')
return
if self.rebootRequested is True:
logger.debug('Reboot has been requested, stopping service')
return
self.initIPC()
# *********************
# * Main Service loop *
# *********************
# Counter used to check ip changes only once every 10 seconds, for
# example
counter = 0
while self.isAlive:
counter += 1
if counter % 10 == 0:
self.checkIpsChanged()
# In milliseconds, will break
self.doWait(1000)
self.endIPC()
self.endAPI()
self.notifyStop()
def usage():
sys.stderr.write("usage: {} start|stop|restart|login 'username'|logout 'username'\n".format(sys.argv[0]))
sys.exit(2)
if __name__ == '__main__':
logger.setLevel(20000)
if len(sys.argv) == 3 and sys.argv[1] in ('login', 'logout'):
logger.debug('Running client udsactor')
client = None
try:
client = ipc.ClientIPC(IPC_PORT)
if 'login' == sys.argv[1]:
client.sendLogin(sys.argv[2])
sys.exit(0)
elif 'logout' == sys.argv[1]:
client.sendLogout(sys.argv[2])
sys.exit(0)
else:
usage()
except Exception as e:
logger.error(e)
elif len(sys.argv) != 2:
usage()
logger.debug('Executing actor')
daemon = UDSActorSvc()
if len(sys.argv) == 2:
if 'start' == sys.argv[1]:
daemon.start()
elif 'stop' == sys.argv[1]:
daemon.stop()
elif 'restart' == sys.argv[1]:
daemon.restart()
else:
usage()
sys.exit(0)
else:
usage()

View File

@@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from __future__ import unicode_literals

View File

@@ -0,0 +1,182 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: : http://www.jejik.com/authors/sander_marechal/
@see: : http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/
'''
from __future__ import unicode_literals
import sys
import os
import time
import atexit
from udsactor.log import logger
from signal import SIGTERM
class Daemon:
"""
A generic daemon class.
Usage: subclass the Daemon class and override the run() method
"""
def __init__(self, pidfile, stdin='/dev/null', stdout='/dev/null', stderr='/dev/null'):
self.stdin = stdin
self.stdout = stdout
self.stderr = stderr
self.pidfile = pidfile
def daemonize(self):
"""
do the UNIX double-fork magic, see Stevens' "Advanced
Programming in the UNIX Environment" for details (ISBN 0201563177)
http://www.erlenstar.demon.co.uk/unix/faq_2.html#SEC16
"""
try:
pid = os.fork()
if pid > 0:
# exit first parent
sys.exit(0)
except OSError as e:
logger.error("fork #1 error: {}".format(e))
sys.stderr.write("fork #1 failed: {}\n".format(e))
sys.exit(1)
# decouple from parent environment
os.chdir("/")
os.setsid()
os.umask(0)
# do second fork
try:
pid = os.fork()
if pid > 0:
# exit from second parent
sys.exit(0)
except OSError as e:
logger.error("fork #2 error: {}".format(e))
sys.stderr.write("fork #2 failed: {}\n".format(e))
sys.exit(1)
# redirect standard file descriptors
sys.stdout.flush()
sys.stderr.flush()
si = open(self.stdin, 'r')
so = open(self.stdout, 'a+')
se = open(self.stderr, 'a+', 0)
os.dup2(si.fileno(), sys.stdin.fileno())
os.dup2(so.fileno(), sys.stdout.fileno())
os.dup2(se.fileno(), sys.stderr.fileno())
# write pidfile
atexit.register(self.delpid)
pid = str(os.getpid())
with open(self.pidfile, 'w+') as f:
f.write("{}\n".format(pid))
def delpid(self):
try:
os.remove(self.pidfile)
except Exception:
# Not found/not permissions or whatever...
pass
def start(self):
"""
Start the daemon
"""
logger.debug('Starting daemon')
# Check for a pidfile to see if the daemon already runs
try:
pf = open(self.pidfile, 'r')
pid = int(pf.read().strip())
pf.close()
except IOError:
pid = None
if pid:
message = "pidfile {} already exist. Daemon already running?\n".format(pid)
logger.error(message)
sys.stderr.write(message)
sys.exit(1)
# Start the daemon
self.daemonize()
try:
self.run()
except Exception as e:
logger.error('Exception running process: {}'.format(e))
if os.path.exists(self.pidfile):
os.remove(self.pidfile)
def stop(self):
"""
Stop the daemon
"""
# Get the pid from the pidfile
try:
pf = open(self.pidfile, 'r')
pid = int(pf.read().strip())
pf.close()
except IOError:
pid = None
if pid is None:
message = "pidfile {} does not exist. Daemon not running?\n".format(self.pidfile)
logger.info(message)
# sys.stderr.write(message)
return # not an error in a restart
# Try killing the daemon process
try:
while True:
os.kill(pid, SIGTERM)
time.sleep(1)
except OSError as err:
if err.errno == 3: # No such process
if os.path.exists(self.pidfile):
os.remove(self.pidfile)
else:
sys.stderr.write(err)
sys.exit(1)
def restart(self):
"""
Restart the daemon
"""
self.stop()
self.start()
# Overridables
def run(self):
"""
You should override this method when you subclass Daemon. It will be called after the process has been
daemonized by start() or restart().
"""

View File

@@ -0,0 +1,80 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from __future__ import unicode_literals
import logging
import os
import tempfile
import six
# Valid logging levels, from UDS Broker (uds.core.utils.log)
OTHER, DEBUG, INFO, WARN, ERROR, FATAL = (10000 * (x + 1) for x in six.moves.xrange(6)) # @UndefinedVariable
class LocalLogger(object):
def __init__(self):
# tempdir is different for "user application" and "service"
# service wil get c:\windows\temp, while user will get c:\users\XXX\temp
# Try to open logger at /var/log path
# If it fails (access denied normally), will try to open one at user's home folder, and if
# agaim it fails, open it at the tmpPath
for logDir in ('/var/log', os.path.expanduser('~'), tempfile.gettempdir()):
try:
fname = os.path.join(logDir, 'udsactor.log')
logging.basicConfig(
filename=fname,
filemode='a',
format='%(levelname)s %(asctime)s %(message)s',
level=logging.DEBUG
)
self.logger = logging.getLogger('udsactor')
os.chmod(fname, 0o0600)
return
except Exception:
pass
# Logger can't be set
self.logger = None
def log(self, level, message):
# Debug messages are logged to a file
# our loglevels are 10000 (other), 20000 (debug), ....
# logging levels are 10 (debug), 20 (info)
# OTHER = logging.NOTSET
self.logger.log(int(level / 1000) - 10, message)
def isWindows(self):
return False
def isLinux(self):
return True

View File

@@ -0,0 +1,245 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from __future__ import unicode_literals
import socket
import platform
import fcntl
import os
import ctypes # @UnusedImport
import ctypes.util
import subprocess
import struct
import array
import six
from udsactor import utils
from .renamer import rename
def _getMacAddr(ifname):
'''
Returns the mac address of an interface
Mac is returned as unicode utf-8 encoded
'''
if isinstance(ifname, list):
return dict([(name, _getMacAddr(name)) for name in ifname])
if isinstance(ifname, six.text_type):
ifname = ifname.encode('utf-8') # If unicode, convert to bytes (or str in python 2.7)
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
info = bytearray(fcntl.ioctl(s.fileno(), 0x8927, struct.pack(str('256s'), ifname[:15])))
return six.text_type(''.join(['%02x:' % char for char in info[18:24]])[:-1]).upper()
except Exception:
return None
def _getIpAddr(ifname):
'''
Returns the ip address of an interface
Ip is returned as unicode utf-8 encoded
'''
if isinstance(ifname, list):
return dict([(name, _getIpAddr(name)) for name in ifname])
if isinstance(ifname, six.text_type):
ifname = ifname.encode('utf-8') # If unicode, convert to bytes (or str in python 2.7)
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
return six.text_type(socket.inet_ntoa(fcntl.ioctl(
s.fileno(),
0x8915, # SIOCGIFADDR
struct.pack(str('256s'), ifname[:15])
)[20:24]))
except Exception:
return None
def _getInterfaces():
'''
Returns a list of interfaces names coded in utf-8
'''
max_possible = 128 # arbitrary. raise if needed.
space = max_possible * 16
if platform.architecture()[0] == '32bit':
offset, length = 32, 32
elif platform.architecture()[0] == '64bit':
offset, length = 16, 40
else:
raise OSError('Unknown arquitecture {0}'.format(platform.architecture()[0]))
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
names = array.array(str('B'), b'\0' * space)
outbytes = struct.unpack(str('iL'), fcntl.ioctl(
s.fileno(),
0x8912, # SIOCGIFCONF
struct.pack(str('iL'), space, names.buffer_info()[0])
))[0]
namestr = names.tostring()
# return namestr, outbytes
return [namestr[i:i + offset].split(b'\0', 1)[0].decode('utf-8') for i in range(0, outbytes, length)]
def _getIpAndMac(ifname):
ip, mac = _getIpAddr(ifname), _getMacAddr(ifname)
return (ip, mac)
def getComputerName():
'''
Returns computer name, with no domain
'''
return socket.gethostname().split('.')[0]
def getNetworkInfo():
for ifname in _getInterfaces():
ip, mac = _getIpAndMac(ifname)
if mac != '00:00:00:00:00:00': # Skips local interfaces
yield utils.Bunch(name=ifname, mac=mac, ip=ip)
def getDomainName():
return ''
def getLinuxVersion():
lv = platform.linux_distribution()
return lv[0] + ', ' + lv[1]
def reboot(flags=0):
'''
Simple reboot using os command
'''
# Workaround for dummy thread
if six.PY3 is False:
import threading
threading._DummyThread._Thread__stop = lambda x: 42
subprocess.call(['/sbin/shutdown', 'now', '-r'])
def loggoff():
'''
Right now restarts the machine...
'''
# Workaround for dummy thread
if six.PY3 is False:
import threading
threading._DummyThread._Thread__stop = lambda x: 42
subprocess.call(['/usr/bin/pkill', '-u', os.environ['USER']])
# subprocess.call(['/sbin/shutdown', 'now', '-r'])
# subprocess.call(['/usr/bin/systemctl', 'reboot', '-i'])
def renameComputer(newName):
rename(newName)
def joinDomain(domain, ou, account, password, executeInOneStep=False):
pass
def changeUserPassword(user, oldPassword, newPassword):
'''
Simple password change for user using command line
'''
os.system('echo "{1}\n{1}" | /usr/bin/passwd {0} 2> /dev/null'.format(user, newPassword))
class XScreenSaverInfo(ctypes.Structure):
_fields_ = [('window', ctypes.c_long),
('state', ctypes.c_int),
('kind', ctypes.c_int),
('til_or_since', ctypes.c_ulong),
('idle', ctypes.c_ulong),
('eventMask', ctypes.c_ulong)]
# Initialize xlib & xss
try:
xlibPath = ctypes.util.find_library('X11')
xssPath = ctypes.util.find_library('Xss')
xlib = ctypes.cdll.LoadLibrary(xlibPath)
xss = ctypes.cdll.LoadLibrary(xssPath)
# Fix result type to XScreenSaverInfo Structure
xss.XScreenSaverQueryExtension.restype = ctypes.c_int
xss.XScreenSaverAllocInfo.restype = ctypes.POINTER(XScreenSaverInfo) # Result in a XScreenSaverInfo structure
display = xlib.XOpenDisplay(None)
info = xss.XScreenSaverAllocInfo()
except Exception: # Libraries not accesible, not found or whatever..
xlib = xss = display = info = None
def initIdleDuration(atLeastSeconds):
'''
On linux we set the screensaver to at least required seconds, or we never will get "idle"
'''
# Workaround for dummy thread
if six.PY3 is False:
import threading
threading._DummyThread._Thread__stop = lambda x: 42
subprocess.call(['/usr/bin/xset', 's', '{}'.format(atLeastSeconds + 30)])
# And now reset it
subprocess.call(['/usr/bin/xset', 's', 'reset'])
def getIdleDuration():
'''
Returns idle duration, in seconds
'''
if xlib is None or xss is None:
return 0 # Libraries not available
event_base = ctypes.c_int()
error_base = ctypes.c_int()
available = xss.XScreenSaverQueryExtension(display, ctypes.byref(event_base), ctypes.byref(error_base))
if available != 1:
return 0 # No screen saver is available, no way of getting idle
xss.XScreenSaverQueryInfo(display, xlib.XDefaultRootWindow(display), info)
# Centos seems to set state to 1?? (weird, but it's happening don't know why... will try this way)
if info.contents.state != 0 and 'centos' not in platform.linux_distribution()[0].lower().strip():
return 3600 * 100 * 1000 # If screen saver is active, return a high enough value
return info.contents.idle / 1000.0
def getCurrentUser():
'''
Returns current logged in user
'''
return os.environ['USER']

View File

@@ -0,0 +1,61 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from __future__ import unicode_literals
import platform
import os
import sys
import pkgutil
from udsactor.log import logger
renamers = {}
# Renamers now are for IPv4 only addresses
def rename(newName):
distribution = platform.linux_distribution()[0].lower().strip()
if distribution in renamers:
return renamers[distribution](newName)
# Try Debian renamer, simplest one
logger.info('Renamer for platform "{0}" not found, tryin debian renamer'.format(distribution))
return renamers['debian'](newName)
# Do load of packages
def _init():
pkgpath = os.path.dirname(sys.modules[__name__].__file__)
for _, name, _ in pkgutil.iter_modules([pkgpath]):
__import__(__name__ + '.' + name, globals(), locals())
_init()

View File

@@ -0,0 +1,68 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from __future__ import unicode_literals
from udsactor.linux.renamer import renamers
from udsactor.log import logger
import os
def rename(newName):
'''
Debian renamer
Expects new host name on newName
Host does not needs to be rebooted after renaming
'''
logger.debug('using Debian renamer')
with open('/etc/hostname', 'w') as hostname:
hostname.write(newName)
# Force system new name
os.system('/bin/hostname %s' % newName)
# add name to "hosts"
with open('/etc/hosts', 'r') as hosts:
lines = hosts.readlines()
with open('/etc/hosts', 'w') as hosts:
hosts.write("127.0.1.1\t%s\n" % newName)
for l in lines:
if l[:9] == '127.0.1.1': # Skips existing 127.0.1.1. if it already exists
continue
hosts.write(l)
return True
# All names in lower case
renamers['debian'] = rename
renamers['ubuntu'] = rename

View File

@@ -0,0 +1,66 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from __future__ import unicode_literals
from udsactor.linux.renamer import renamers
from udsactor.log import logger
import os
def rename(newName):
'''
RH, Centos, Fedora Renamer
Expects new host name on newName
Host does not needs to be rebooted after renaming
'''
logger.debug('using SUSE renamer')
with open('/etc/hostname', 'w') as hostname:
hostname.write(newName)
# Force system new name
os.system('/bin/hostname %s' % newName)
# add name to "hosts"
with open('/etc/hosts', 'r') as hosts:
lines = hosts.readlines()
with open('/etc/hosts', 'w') as hosts:
hosts.write("127.0.1.1\t{}\n".format(newName))
for l in lines:
if l[:9] != '127.0.1.1': # Skips existing 127.0.1.1. if it already exists
hosts.write(l)
return True
# All names in lower case
renamers['opensuse'] = rename
renamers['suse'] = rename

View File

@@ -0,0 +1,74 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from __future__ import unicode_literals
from udsactor.linux.renamer import renamers
from udsactor.log import logger
import os
def rename(newName):
'''
RH, Centos, Fedora Renamer
Expects new host name on newName
Host does not needs to be rebooted after renaming
'''
logger.debug('using RH renamer')
with open('/etc/hostname', 'w') as hostname:
hostname.write(newName)
# Force system new name
os.system('/bin/hostname %s' % newName)
# add name to "hosts"
with open('/etc/hosts', 'r') as hosts:
lines = hosts.readlines()
with open('/etc/hosts', 'w') as hosts:
hosts.write("127.0.1.1\t{}\n".format(newName))
for l in lines:
if l[:9] != '127.0.1.1': # Skips existing 127.0.1.1. if it already exists
hosts.write(l)
with open('/etc/sysconfig/network', 'r') as net:
lines = net.readlines()
with open('/etc/sysconfig/network', 'w') as net:
net.write('HOSTNAME={}\n'.format(newName))
for l in lines:
if l[:8] != 'HOSTNAME':
net.write(l)
return True
# All names in lower case
renamers['centos linux'] = rename
renamers['fedora'] = rename

View File

@@ -0,0 +1,80 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
import six
import os
DEBUG = False
CONFIGFILE = '/etc/udsactor/udsactor.cfg' if DEBUG is False else '/tmp/udsactor.cfg'
def checkPermissions():
return True if DEBUG else os.getuid() == 0
def readConfig():
res = {}
try:
cfg = six.moves.configparser.SafeConfigParser() # @UndefinedVariable
cfg.optionxform = six.text_type
cfg.read(CONFIGFILE)
# Just reads 'uds' section
for key in cfg.options('uds'):
res[key] = cfg.get('uds', key)
if res[key].lower() in ('true', 'yes', 'si'):
res[key] = True
elif res[key].lower() in ('false', 'no'):
res[key] = False
except Exception:
pass
return res
def writeConfig(data):
cfg = six.moves.configparser.SafeConfigParser() # @UndefinedVariable
cfg.optionxform = six.text_type
cfg.add_section('uds')
for key, val in data.items():
cfg.set('uds', key, str(val))
# Ensures exists destination folder
dirname = os.path.dirname(CONFIGFILE)
if not os.path.exists(dirname):
os.mkdir(dirname, mode=0o700) # Will create only if route to path already exists, for example, /etc (that must... :-))
with open(CONFIGFILE, 'w') as f:
cfg.write(f)
os.chmod(CONFIGFILE, 0o0600)

103
actors/src/udsactor/log.py Normal file
View File

@@ -0,0 +1,103 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from __future__ import unicode_literals
import traceback
import sys
import six
if sys.platform == 'win32':
from udsactor.windows.log import LocalLogger # @UnusedImport
else:
from udsactor.linux.log import LocalLogger # @Reimport
# Valid logging levels, from UDS Broker (uds.core.utils.log)
OTHER, DEBUG, INFO, WARN, ERROR, FATAL = (10000 * (x + 1) for x in six.moves.xrange(6)) # @UndefinedVariable
class Logger(object):
def __init__(self):
self.logLevel = INFO
self.logger = LocalLogger()
self.remoteLogger = None
def setLevel(self, level):
'''
Sets log level filter (minimum level required for a log message to be processed)
:param level: Any message with a level below this will be filtered out
'''
self.logLevel = int(level) # Ensures level is an integer or fails
def setRemoteLogger(self, remoteLogger):
self.remoteLogger = remoteLogger
def log(self, level, message):
if level < self.logLevel: # Skip not wanted messages
return
# If remote logger is available, notify message to it
try:
if self.remoteLogger is not None and self.remoteLogger.isConnected and level >= INFO:
self.remoteLogger.log(level, message)
except Exception as e:
self.logger.log(FATAL, 'Error notifying log to broker: {}'.format(e.message))
self.logger.log(level, message)
def debug(self, message):
self.log(DEBUG, message)
def warn(self, message):
self.log(WARN, message)
def info(self, message):
self.log(INFO, message)
def error(self, message):
self.log(ERROR, message)
def fatal(self, message):
self.log(FATAL, message)
def exception(self):
try:
tb = traceback.format_exc()
except Exception:
tb = '(could not get traceback!)'
self.log(DEBUG, tb)
def flush(self):
pass
logger = Logger()

View File

@@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
# pylint: disable=unused-wildcard-import,wildcard-import
from __future__ import unicode_literals
import sys
if sys.platform == 'win32':
from .windows.operations import * # @UnusedWildImport
else:
from .linux.operations import * # @UnusedWildImport

View File

@@ -1,51 +1,51 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012 Virtual Cable S.L.
# Copyright (c) 201 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
# pylint: disable-msg=E1101,W0703
from ..auths.AdminAuth import needs_credentials
from udsactor.log import logger
import threading
import six
from uds.core.ui.UserInterface import gui
class ScriptExecutorThread(threading.Thread):
def __init__(self, script):
super(ScriptExecutorThread, self).__init__()
self.script = script
@needs_credentials
def chooseCallback(credentials, name, parameters):
res = {}
params = {}
for p in parameters:
params[p['name']] = p['value']
if gui.callbacks.has_key(name):
res = gui.callbacks[name](params)
return res
def registerCallbackFunctions(dispatcher):
dispatcher.register_function(chooseCallback, 'chooseCallback')
def run(self):
try:
logger.debug('Executing script: {}'.format(self.script))
six.exec_(self.script, globals(), None)
except Exception as e:
logger.error('Error executing script: {}'.format(e))

View File

@@ -0,0 +1,325 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from __future__ import unicode_literals
from udsactor.log import logger
from . import operations
from . import store
from . import REST
from . import ipc
from . import httpserver
from .scriptThread import ScriptExecutorThread
from .utils import exceptionToMessage
import socket
import time
import random
IPC_PORT = 39188
cfg = None
def initCfg():
global cfg # pylint: disable=global-statement
cfg = store.readConfig()
if logger.logger.isWindows():
# Logs will also go to windows event log for services
logger.logger.serviceLogger = True
if cfg is not None:
logger.setLevel(cfg.get('logLevel', 20000))
else:
logger.setLevel(20000)
cfg = {}
# If ANY var is missing, reset cfg
for v in ('host', 'ssl', 'masterKey'):
if v not in cfg:
cfg = None
break
class CommonService(object):
def __init__(self):
self.isAlive = True
self.api = None
self.ipc = None
self.httpServer = None
self.rebootRequested = False
self.knownIps = []
socket.setdefaulttimeout(20)
def reboot(self):
self.rebootRequested = True
def setReady(self):
self.api.setReady([(v.mac, v.ip) for v in operations.getNetworkInfo()])
def interactWithBroker(self):
'''
Returns True to continue to main loop, false to stop & exit service
'''
# If no configuration is found, stop service
if cfg is None:
logger.fatal('No configuration found, stopping service')
return False
self.api = REST.Api(cfg['host'], cfg['masterKey'], cfg['ssl'])
# Wait for Broker to be ready
counter = 0
while self.isAlive:
try:
# getNetworkInfo is a generator function
netInfo = tuple(operations.getNetworkInfo())
self.knownIps = dict(((i.mac, i.ip) for i in netInfo))
ids = ','.join([i.mac for i in netInfo])
if ids == '':
# Wait for any network interface to be ready
logger.debug('No valid network interfaces found, retrying in a while...')
raise Exception()
logger.debug('Ids: {}'.format(ids))
self.api.init(ids)
# Set remote logger to notify log info to broker
logger.setRemoteLogger(self.api)
break
except REST.InvalidKeyError:
logger.fatal('Can\'t sync with broker: Invalid broker Master Key')
return False
except REST.UnmanagedHostError:
# Maybe interface that is registered with broker is not enabled already?
# Right now, we thing that the interface connected to broker is
# the interface that broker will know, let's see how this works
logger.fatal('This host is not managed by UDS Broker (ids: {})'.format(ids))
return False # On unmanaged hosts, there is no reason right now to continue running
except Exception as e:
logger.debug('Exception on network info: retrying')
# Any other error is expectable and recoverable, so let's wait a bit and retry again
# but, if too many errors, will log it (one every minute, for
# example)
counter += 1
if counter % 60 == 0: # Every 5 minutes, raise a log
logger.info('Trying to inititialize connection with broker (last error: {})'.format(exceptionToMessage(e)))
# Wait a bit before next check
self.doWait(5000)
# Broker connection is initialized, now get information about what to
# do
counter = 0
while self.isAlive:
try:
logger.debug('Requesting information of what to do now')
info = self.api.information()
data = info.split('\r')
if len(data) != 2:
logger.error('The format of the information message is not correct (got {})'.format(info))
raise Exception
params = data[1].split('\t')
if data[0] == 'rename':
try:
if len(params) == 1: # Simple rename
logger.debug('Renaming computer to {}'.format(params[0]))
self.rename(params[0])
# Rename with change password for an user
elif len(params) == 4:
logger.debug('Renaming computer to {}'.format(params))
self.rename(params[0], params[1], params[2], params[3])
else:
logger.error('Got invalid parameter for rename operation: {}'.format(params))
return False
break
except Exception as e:
logger.error('Error at computer renaming stage: {}'.format(e.message))
return None # Will retry complete broker connection if this point is reached
elif data[0] == 'domain':
if len(params) != 5:
logger.error('Got invalid parameters for domain message: {}'.format(params))
return False # Stop running service
self.joinDomain(params[0], params[1], params[2], params[3], params[4])
break
else:
logger.error('Unrecognized action sent from broker: {}'.format(data[0]))
return False # Stop running service
except REST.UserServiceNotFoundError:
logger.error('The host has lost the sync state with broker! (host uuid changed?)')
return False
except Exception as err:
if counter % 60 == 0:
logger.warn('Too many retries in progress, though still trying (last error: {})'.format(exceptionToMessage(err)))
counter += 1
# Any other error is expectable and recoverable, so let's wait
# a bit and retry again
# Wait a bit before next check
self.doWait(5000)
if self.rebootRequested:
try:
operations.reboot()
except Exception as e:
logger.error('Exception on reboot: {}'.format(e.message))
return False # Stops service
return True
def checkIpsChanged(self):
if self.api is None or self.api.uuid is None:
return # Not connected
netInfo = tuple(operations.getNetworkInfo())
for i in netInfo:
# If at least one ip has changed
if i.mac in self.knownIps and self.knownIps[i.mac] != i.ip:
logger.info('Notifying ip change to broker (mac {}, from {} to {})'.format(i.mac, self.knownIps[i.mac], i.ip))
try:
# Notifies all interfaces IPs
self.api.notifyIpChanges(((v.mac, v.ip) for v in netInfo))
# Regenerates Known ips
self.knownIps = dict(((v.mac, v.ip) for v in netInfo))
# And notify new listening address to broker
address = (self.knownIps[self.api.mac], random.randrange(43900, 44000))
# And new listening address
self.httpServer.restart(address)
# sends notification
self.api.notifyComm(self.httpServer.getServerUrl())
except Exception as e:
logger.warn('Got an error notifiying IPs to broker: {} (will retry in a bit)'.format(e.message.decode('windows-1250', 'ignore')))
def clientMessageProcessor(self, msg, data):
logger.debug('Got message {}'.format(msg))
if self.api is None:
logger.info('Rest api not ready')
return
if msg == ipc.REQ_LOGIN:
res = self.api.login(data).split('\t')
# third parameter, if exists, sets maxSession duration to this.
# First & second parameters are ip & hostname of connection source
if len(res) >= 3:
self.api.maxSession = int(res[2]) # Third parameter is max session duration
msg = ipc.REQ_INFORMATION # Senf information, requested or not, to client on login notification
if msg == ipc.REQ_LOGOUT:
self.api.logout(data)
self.onLogout(data)
if msg == ipc.REQ_INFORMATION:
info = {}
if self.api.idle is not None:
info['idle'] = self.api.idle
if self.api.maxSession is not None:
info['maxSession'] = self.api.maxSession
self.ipc.sendInformationMessage(info)
def initIPC(self):
# ******************************************
# * Initialize listener IPC & REST threads *
# ******************************************
logger.debug('Starting IPC listener at {}'.format(IPC_PORT))
self.ipc = ipc.ServerIPC(IPC_PORT, clientMessageProcessor=self.clientMessageProcessor)
self.ipc.start()
if self.api.mac in self.knownIps:
address = (self.knownIps[self.api.mac], random.randrange(43900, 44000))
logger.info('Starting REST listener at {}'.format(address))
self.httpServer = httpserver.HTTPServerThread(address, self)
self.httpServer.start()
# And notify it to broker
self.api.notifyComm(self.httpServer.getServerUrl())
def endIPC(self):
# Remove IPC threads
if self.ipc is not None:
try:
self.ipc.stop()
except Exception:
logger.error('Couln\'t stop ipc server')
if self.httpServer is not None:
try:
self.httpServer.stop()
except Exception:
logger.error('Couln\'t stop REST server')
def endAPI(self):
if self.api is not None:
try:
self.api.notifyComm(None)
except Exception:
logger.error('Couln\'t remove comms url from broker')
self.notifyStop()
# ***************************************************
# Methods that ARE overriden by linux & windows Actor
# ***************************************************
def rename(self, name, user=None, oldPassword=None, newPassword=None):
'''
Invoked when broker requests a rename action
MUST BE OVERRIDEN
'''
raise NotImplementedError('Method renamed has not been implemented!')
def joinDomain(self, name, domain, ou, account, password):
'''
Invoked when broker requests a "domain" action
MUST BE OVERRIDEN
'''
raise NotImplementedError('Method renamed has not been implemented!')
# ****************************************
# Methods that CAN BE overriden by actors
# ****************************************
def doWait(self, miliseconds):
'''
Invoked to wait a bit
CAN be OVERRIDEN
'''
time.sleep(float(miliseconds) / 1000)
def notifyStop(self):
'''
Overriden to log stop
'''
logger.info('Service is being stopped')
def preConnect(self, user, protocol):
'''
Invoked when received a PRE Connection request via REST
'''
logger.debug('Pre-connect does nothing')
return 'ok'
def onLogout(self, user):
logger.debug('On logout invoked for {}'.format(user))

View File

@@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
# pylint: disable=unused-wildcard-import, wildcard-import
from __future__ import unicode_literals
import sys
if sys.platform == 'win32':
from udsactor.windows.store import * # @UnusedWildImport
else:
from udsactor.linux.store import * # @UnusedWildImport

View File

@@ -1,60 +1,72 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012 Virtual Cable S.L.
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from __future__ import unicode_literals
import cStringIO
import sys
import six
from xmlrpclib import Transport, ServerProxy
from django.test.client import Client
if sys.platform == 'win32':
_fromEncoding = 'windows-1250'
else:
_fromEncoding = 'utf-8'
class TestTransport(Transport,object):
""" Handles connections to XML-RPC server through Django test client."""
def toUnicode(msg):
try:
if not isinstance(msg, six.text_type):
if isinstance(msg, six.binary_type):
return msg.decode(_fromEncoding, 'ignore')
return six.text_type(msg)
else:
return msg
except Exception:
try:
return six.text_type(msg)
except Exception:
return ''
def __init__(self, *args, **kwargs):
super(TestTransport, self).__init__(*args, **kwargs)
self.client = Client()
def request(self, host, handler, request_body, verbose=0):
def exceptionToMessage(e):
msg = ''
for arg in e.args:
if isinstance(arg, Exception):
msg = msg + exceptionToMessage(arg)
else:
msg = msg + toUnicode(arg) + '. '
return msg
self.verbose = verbose
response = self.client.post(handler,
request_body,
content_type="text/xml")
class Bunch(dict):
def __init__(self, **kw):
dict.__init__(self, kw)
self.__dict__ = self
res = cStringIO.StringIO(response.content)
res.seek(0)
return self.parse_response(res)
rpcServer = ServerProxy("http://test:test@172.27.0.1:8000/xmlrpc", verbose = 1, transport=TestTransport())

View File

@@ -0,0 +1,148 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
# _*_ coding: iso-8859-1 _*_
from __future__ import unicode_literals
import win32com.client # @UnresolvedImport, pylint: disable=import-error
import win32com.server.policy # @UnresolvedImport, pylint: disable=import-error
import os
from udsactor.log import logger
# based on python SENS example from
# http://timgolden.me.uk/python/win32_how_do_i/track-session-events.html
# from Sens.h
SENSGUID_PUBLISHER = "{5fee1bd6-5b9b-11d1-8dd2-00aa004abd5e}"
SENSGUID_EVENTCLASS_LOGON = "{d5978630-5b9f-11d1-8dd2-00aa004abd5e}"
# from EventSys.h
PROGID_EventSystem = "EventSystem.EventSystem"
PROGID_EventSubscription = "EventSystem.EventSubscription"
IID_ISensLogon = "{d597bab3-5b9f-11d1-8dd2-00aa004abd5e}"
class SensLogon(win32com.server.policy.DesignatedWrapPolicy):
_com_interfaces_ = [IID_ISensLogon]
_public_methods_ = [
'Logon',
'Logoff',
'StartShell',
'DisplayLock',
'DisplayUnlock',
'StartScreenSaver',
'StopScreenSaver'
]
def __init__(self, service):
self._wrap_(self)
self.service = service
def Logon(self, *args):
logger.debug('Logon event: {}'.format(args))
if self.service.api is not None and self.service.api.isConnected:
try:
data = self.service.api.login(args[0])
logger.debug('Data received for login: {}'.format(data))
data = data.split('\t')
if len(data) >= 2:
logger.debug('Data is valid: {}'.format(data))
windir = os.environ['windir']
with open(os.path.join(windir, 'remoteip.txt'), 'w') as f:
f.write(data[0])
with open(os.path.join(windir, 'remoteh.txt'), 'w') as f:
f.write(data[1])
except Exception as e:
logger.fatal('Error notifying logon to server: {}'.format(e))
def Logoff(self, *args):
logger.debug('Logoff event: arguments: {}'.format(args))
if self.service is not None and self.service.api is not None and self.service.api.isConnected:
try:
self.service.api.logout(args[0])
except Exception as e:
logger.fatal('Error notifying logoff to server: {}'.format(e))
logger.debug('Invoking onLogout: {}'.format(self.service))
self.service.onLogout(args[0])
logger.debug('Invoked!!')
def StartShell(self, *args):
# logevent('StartShell : %s' % [args])
pass
def DisplayLock(self, *args):
# logevent('DisplayLock : %s' % [args])
pass
def DisplayUnlock(self, *args):
# logevent('DisplayUnlock : %s' % [args])
pass
def StartScreenSaver(self, *args):
# When finished basic actor, we will use this to provide a new parameter: logout on screensaver
# This will allow to easily close sessions of idle users
# logevent('StartScreenSaver : %s' % [args])
pass
def StopScreenSaver(self, *args):
# logevent('StopScreenSaver : %s' % [args])
pass
def logevent(msg):
logger.info(msg)
# def register():
# call the CoInitialize to allow the registration to run in an other
# thread
# pythoncom.CoInitialize()
# logevent('Registring ISensLogon')
# sl=SensLogon()
# subscription_interface=pythoncom.WrapObject(sl)
# event_system=win32com.client.Dispatch(PROGID_EventSystem)
# event_subscription=win32com.client.Dispatch(PROGID_EventSubscription)
# event_subscription.EventClassID=SENSGUID_EVENTCLASS_LOGON
# event_subscription.PublisherID=SENSGUID_PUBLISHER
# event_subscription.SubscriptionName='Python subscription'
# event_subscription.SubscriberInterface=subscription_interface
# event_system.Store(PROGID_EventSubscription, event_subscription)
# pythoncom.PumpMessages()
# #logevent('ISensLogon stopped')

View File

@@ -0,0 +1,331 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from __future__ import unicode_literals
# pylint: disable=unused-wildcard-import, wildcard-import
import win32serviceutil # @UnresolvedImport, pylint: disable=import-error
import win32service # @UnresolvedImport, pylint: disable=import-error
import win32security # @UnresolvedImport, pylint: disable=import-error
import win32net # @UnresolvedImport, pylint: disable=import-error
import win32event # @UnresolvedImport, pylint: disable=import-error
import win32com.client # @UnresolvedImport, @UnusedImport, pylint: disable=import-error
import pythoncom # @UnresolvedImport, pylint: disable=import-error
import servicemanager # @UnresolvedImport, pylint: disable=import-error
import os
from udsactor import operations
from udsactor.service import CommonService
from udsactor.service import initCfg
from udsactor.log import logger
from .SENS import SensLogon
from .SENS import logevent
from .SENS import SENSGUID_EVENTCLASS_LOGON
from .SENS import SENSGUID_PUBLISHER
from .SENS import PROGID_EventSubscription
from .SENS import PROGID_EventSystem
class UDSActorSvc(win32serviceutil.ServiceFramework, CommonService):
'''
This class represents a Windows Service for managing actor interactions
with UDS Broker and Machine
'''
_svc_name_ = "UDSActor"
_svc_display_name_ = "UDS Actor Service"
_svc_description_ = "UDS Actor for machines managed by UDS Broker"
# 'System Event Notification' is the SENS service
_svc_deps_ = ['EventLog', 'SENS']
def __init__(self, args):
win32serviceutil.ServiceFramework.__init__(self, args)
CommonService.__init__(self)
self.hWaitStop = win32event.CreateEvent(None, 1, 0, None)
self._user = None
def SvcStop(self):
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
self.isAlive = False
win32event.SetEvent(self.hWaitStop)
SvcShutdown = SvcStop
def notifyStop(self):
servicemanager.LogMsg(servicemanager.EVENTLOG_INFORMATION_TYPE,
servicemanager.PYS_SERVICE_STOPPED,
(self._svc_name_, ''))
def doWait(self, miliseconds):
win32event.WaitForSingleObject(self.hWaitStop, miliseconds)
def rename(self, name, user=None, oldPassword=None, newPassword=None):
'''
Renames the computer, and optionally sets a password for an user
before this
'''
hostName = operations.getComputerName()
if hostName.lower() == name.lower():
logger.info('Computer name is now {}'.format(hostName))
self.setReady()
return
# Check for password change request for an user
if user is not None:
logger.info('Setting password for user {}'.format(user))
try:
operations.changeUserPassword(user, oldPassword, newPassword)
except Exception as e:
# We stop here without even renaming computer, because the
# process has failed
raise Exception(
'Could not change password for user {} (maybe invalid current password is configured at broker): {} '.format(user, unicode(e)))
operations.renameComputer(name)
# Reboot just after renaming
logger.info('Rebooting computer got activate new name {}'.format(name))
self.reboot()
def oneStepJoin(self, name, domain, ou, account, password):
'''
Ejecutes the join domain in exactly one step
'''
currName = operations.getComputerName()
# If name is desired, simply execute multiStepJoin, because computer
# name will not change
if currName.lower() == name.lower():
self.multiStepJoin(name, domain, ou, account, password)
else:
operations.renameComputer(name)
logger.debug('Computer renamed to {} without reboot'.format(name))
operations.joinDomain(
domain, ou, account, password, executeInOneStep=True)
logger.debug(
'Requested join domain {} without errors'.format(domain))
self.reboot()
def multiStepJoin(self, name, domain, ou, account, password):
currName = operations.getComputerName()
if currName.lower() == name.lower():
currDomain = operations.getDomainName()
if currDomain is not None:
# logger.debug('Name: "{}" vs "{}", Domain: "{}" vs "{}"'.format(currName.lower(), name.lower(), currDomain.lower(), domain.lower()))
logger.info(
'Machine {} is part of domain {}'.format(name, domain))
self.setReady()
else:
operations.joinDomain(
domain, ou, account, password, executeInOneStep=False)
self.reboot()
else:
operations.renameComputer(name)
logger.info(
'Rebooting computer got activate new name {}'.format(name))
self.reboot()
def joinDomain(self, name, domain, ou, account, password):
ver = operations.getWindowsVersion()
ver = ver[0] * 10 + ver[1]
logger.debug('Starting joining domain {} with name {} (detected operating version: {})'.format(
domain, name, ver))
# Accepts one step joinDomain, also remember XP is no more supported by
# microsoft, but this also must works with it because will do a "multi
# step" join
if ver >= 60:
self.oneStepJoin(name, domain, ou, account, password)
else:
self.multiStepJoin(name, domain, ou, account, password)
def preConnect(self, user, protocol):
logger.debug('Pre connect invoked')
if protocol != 'rdp': # If connection is not using rdp, skip adding user
return 'ok'
# Well known SSID for Remote Desktop Users
REMOTE_USERS_SID = 'S-1-5-32-555'
p = win32security.GetBinarySid(REMOTE_USERS_SID)
groupName = win32security.LookupAccountSid(None, p)[0]
useraAlreadyInGroup = False
resumeHandle = 0
while True:
users, _, resumeHandle = win32net.NetLocalGroupGetMembers(None, groupName, 1, resumeHandle, 32768)
if user in [u['name'] for u in users]:
useraAlreadyInGroup = True
break
if resumeHandle == 0:
break
if useraAlreadyInGroup is False:
logger.debug('User not in group, adding it')
self._user = user
try:
userSSID = win32security.LookupAccountName(None, user)[0]
win32net.NetLocalGroupAddMembers(None, groupName, 0, [{'sid': userSSID}])
except Exception as e:
logger.error('Exception adding user to Remote Desktop Users: {}'.format(e))
else:
self._user = None
logger.debug('User {} already in group'.format(user))
return 'ok'
def onLogout(self, user):
logger.debug('Windows onLogout invoked: {}, {}'.format(user, self._user))
try:
REMOTE_USERS_SID = 'S-1-5-32-555'
p = win32security.GetBinarySid(REMOTE_USERS_SID)
groupName = win32security.LookupAccountSid(None, p)[0]
except Exception:
logger.error('Exception getting Windows Group')
return
if self._user is not None:
try:
win32net.NetLocalGroupDelMembers(None, groupName, [self._user])
except Exception as e:
logger.error('Exception removing user from Remote Desktop Users: {}'.format(e))
def SvcDoRun(self):
'''
Main service loop
'''
try:
initCfg()
logger.debug('running SvcDoRun')
servicemanager.LogMsg(servicemanager.EVENTLOG_INFORMATION_TYPE,
servicemanager.PYS_SERVICE_STARTED,
(self._svc_name_, ''))
# call the CoInitialize to allow the registration to run in an other
# thread
logger.debug('Initializing com...')
pythoncom.CoInitialize()
# ********************************************************
# * Ask brokers what to do before proceding to main loop *
# ********************************************************
while True:
brokerConnected = self.interactWithBroker()
if brokerConnected is False:
logger.debug('Interact with broker returned false, stopping service after a while')
self.notifyStop()
win32event.WaitForSingleObject(self.hWaitStop, 5000)
return
elif brokerConnected is True:
break
# If brokerConnected returns None, repeat the cycle
self.doWait(16000) # Wait for a looong while
if self.interactWithBroker() is False:
logger.debug('Interact with broker returned false, stopping service after a while')
self.notifyStop()
win32event.WaitForSingleObject(self.hWaitStop, 5000)
return
if self.isAlive is False:
logger.debug('The service is not alive after broker interaction, stopping it')
self.notifyStop()
return
if self.rebootRequested is True:
logger.debug('Reboot has been requested, stopping service')
self.notifyStop()
return
self.initIPC()
except Exception: # Any init exception wil be caught, service must be then restarted
logger.exception()
logger.debug('Exiting service with failure status')
os._exit(-1) # pylint: disable=protected-access
# ********************************
# * Registers SENS subscriptions *
# ********************************
logevent('Registering ISensLogon')
subscription_guid = '{41099152-498E-11E4-8FD3-10FEED05884B}'
sl = SensLogon(self)
subscription_interface = pythoncom.WrapObject(sl)
event_system = win32com.client.Dispatch(PROGID_EventSystem)
event_subscription = win32com.client.Dispatch(PROGID_EventSubscription)
event_subscription.EventClassID = SENSGUID_EVENTCLASS_LOGON
event_subscription.PublisherID = SENSGUID_PUBLISHER
event_subscription.SubscriptionName = 'UDS Actor subscription'
event_subscription.SubscriptionID = subscription_guid
event_subscription.SubscriberInterface = subscription_interface
event_system.Store(PROGID_EventSubscription, event_subscription)
logger.debug('Registered SENS, running main loop')
# *********************
# * Main Service loop *
# *********************
# Counter used to check ip changes only once every 10 seconds, for
# example
counter = 0
while self.isAlive:
counter += 1
# Process SENS messages, This will be a bit asyncronous (1 second
# delay)
pythoncom.PumpWaitingMessages()
if counter >= 15: # Once every 15 seconds
counter = 0
try:
self.checkIpsChanged()
except Exception as e:
logger.error('Error checking ip change: {}'.format(e))
# In milliseconds, will break
win32event.WaitForSingleObject(self.hWaitStop, 1000)
logger.debug('Exited main loop, deregistering SENS')
# *******************************************
# * Remove SENS subscription before exiting *
# *******************************************
event_system.Remove(
PROGID_EventSubscription, "SubscriptionID == " + subscription_guid)
self.endIPC() # Ends IPC servers
self.endAPI() # And deinitializes REST api if needed
self.notifyStop()
if __name__ == '__main__':
initCfg()
win32serviceutil.HandleCommandLine(UDSActorSvc)

View File

@@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from __future__ import unicode_literals

View File

@@ -0,0 +1,77 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from __future__ import unicode_literals
import servicemanager # @UnresolvedImport, pylint: disable=import-error
import logging
import os
import tempfile
# Valid logging levels, from UDS Broker (uds.core.utils.log)
OTHER, DEBUG, INFO, WARN, ERROR, FATAL = (10000 * (x + 1) for x in xrange(6))
class LocalLogger(object):
def __init__(self):
# tempdir is different for "user application" and "service"
# service wil get c:\windows\temp, while user will get c:\users\XXX\temp
logging.basicConfig(
filename=os.path.join(tempfile.gettempdir(), 'udsactor.log'),
filemode='a',
format='%(levelname)s %(asctime)s %(message)s',
level=logging.INFO
)
self.logger = logging.getLogger('udsactor')
self.serviceLogger = False
def log(self, level, message):
# Debug messages are logged to a file
# our loglevels are 10000 (other), 20000 (debug), ....
# logging levels are 10 (debug), 20 (info)
# OTHER = logging.NOTSET
self.logger.log(level / 1000 - 10, message)
if level < INFO or self.serviceLogger is False: # Only information and above will be on event log
return
if level < WARN: # Info
servicemanager.LogInfoMsg(message)
elif level < ERROR: # WARN
servicemanager.LogWarningMsg(message)
else: # Error & Fatal
servicemanager.LogErrorMsg(message)
def isWindows(self):
return True
def isLinux(self):
return False

View File

@@ -0,0 +1,220 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from __future__ import unicode_literals
import win32com.client # @UnresolvedImport, pylint: disable=import-error
import win32net # @UnresolvedImport, pylint: disable=import-error
import win32security # @UnresolvedImport, pylint: disable=import-error
import win32api # @UnresolvedImport, pylint: disable=import-error
import win32con # @UnresolvedImport, pylint: disable=import-error
import ctypes
from ctypes.wintypes import DWORD, LPCWSTR
import os
from udsactor import utils
from udsactor.log import logger
def getErrorMessage(res=0):
# sys_fs_enc = sys.getfilesystemencoding() or 'mbcs'
msg = win32api.FormatMessage(res)
return msg.decode('windows-1250', 'ignore')
def getComputerName():
return win32api.GetComputerNameEx(win32con.ComputerNamePhysicalDnsHostname)
def getNetworkInfo():
obj = win32com.client.Dispatch("WbemScripting.SWbemLocator")
wmobj = obj.ConnectServer("localhost", "root\cimv2")
adapters = wmobj.ExecQuery("Select * from Win32_NetworkAdapterConfiguration where IpEnabled=True")
try:
for obj in adapters:
for ip in obj.IPAddress:
if ':' in ip: # Is IPV6, skip this
continue
if ip is None or ip == '' or ip.startswith('169.254') or ip.startswith('0.'): # If single link ip, or no ip
continue
# logger.debug('Net config found: {}=({}, {})'.format(obj.Caption, obj.MACAddress, ip))
yield utils.Bunch(name=obj.Caption, mac=obj.MACAddress, ip=ip)
except Exception:
return
def getDomainName():
'''
Will return the domain name if we belong a domain, else None
(if part of a network group, will also return None)
'''
# Status:
# 0 = Unknown
# 1 = Unjoined
# 2 = Workgroup
# 3 = Domain
domain, status = win32net.NetGetJoinInformation()
if status != 3:
domain = None
return domain
def getWindowsVersion():
return win32api.GetVersionEx()
EWX_LOGOFF = 0x00000000
EWX_SHUTDOWN = 0x00000001
EWX_REBOOT = 0x00000002
EWX_FORCE = 0x00000004
EWX_POWEROFF = 0x00000008
EWX_FORCEIFHUNG = 0x00000010
def reboot(flags=EWX_FORCEIFHUNG | EWX_REBOOT):
hproc = win32api.GetCurrentProcess()
htok = win32security.OpenProcessToken(hproc, win32security.TOKEN_ADJUST_PRIVILEGES | win32security.TOKEN_QUERY)
privs = ((win32security.LookupPrivilegeValue(None, win32security.SE_SHUTDOWN_NAME), win32security.SE_PRIVILEGE_ENABLED),)
win32security.AdjustTokenPrivileges(htok, 0, privs)
win32api.ExitWindowsEx(flags, 0)
def loggoff():
win32api.ExitWindowsEx(EWX_LOGOFF)
def renameComputer(newName):
# Needs admin privileges to work
if ctypes.windll.kernel32.SetComputerNameExW(DWORD(win32con.ComputerNamePhysicalDnsHostname), LPCWSTR(newName)) == 0: # @UndefinedVariable
# win32api.FormatMessage -> returns error string
# win32api.GetLastError -> returns error code
# (just put this comment here to remember to log this when logger is available)
error = getErrorMessage()
computerName = win32api.GetComputerNameEx(win32con.ComputerNamePhysicalDnsHostname)
raise Exception('Error renaming computer from {} to {}: {}'.format(computerName, newName, error))
NETSETUP_JOIN_DOMAIN = 0x00000001
NETSETUP_ACCT_CREATE = 0x00000002
NETSETUP_ACCT_DELETE = 0x00000004
NETSETUP_WIN9X_UPGRADE = 0x00000010
NETSETUP_DOMAIN_JOIN_IF_JOINED = 0x00000020
NETSETUP_JOIN_UNSECURE = 0x00000040
NETSETUP_MACHINE_PWD_PASSED = 0x00000080
NETSETUP_JOIN_WITH_NEW_NAME = 0x00000400
NETSETUP_DEFER_SPN_SET = 0x1000000
def joinDomain(domain, ou, account, password, executeInOneStep=False):
'''
Joins machine to a windows domain
:param domain: Domain to join to
:param ou: Ou that will hold machine
:param account: Account used to join domain
:param password: Password of account used to join domain
:param executeInOneStep: If true, means that this machine has been renamed and wants to add NETSETUP_JOIN_WITH_NEW_NAME to request so we can do rename/join in one step.
'''
# If account do not have domain, include it
if '@' not in account and '\\' not in account:
if '.' in domain:
account = account + '@' + domain
else:
account = domain + '\\' + account
# Do log
flags = NETSETUP_ACCT_CREATE | NETSETUP_DOMAIN_JOIN_IF_JOINED | NETSETUP_JOIN_DOMAIN
if executeInOneStep:
flags |= NETSETUP_JOIN_WITH_NEW_NAME
flags = DWORD(flags)
domain = LPCWSTR(domain)
# Must be in format "ou=.., ..., dc=...,"
ou = LPCWSTR(ou) if ou is not None and ou != '' else None
account = LPCWSTR(account)
password = LPCWSTR(password)
res = ctypes.windll.netapi32.NetJoinDomain(None, domain, ou, account, password, flags)
# Machine found in another ou, use it and warn this on log
if res == 2224:
flags = DWORD(NETSETUP_DOMAIN_JOIN_IF_JOINED | NETSETUP_JOIN_DOMAIN)
res = ctypes.windll.netapi32.NetJoinDomain(None, domain, None, account, password, flags)
if res != 0:
# Log the error
error = getErrorMessage(res)
if res == 1355:
error = "DC Is not reachable"
logger.error('Error joining domain: {}, {}'.format(error, res))
raise Exception('Error joining domain {}, with credentials {}/*****{}: {}, {}'.format(domain, account, ', under OU {}'.format(ou) if ou is not None else '', res, error))
def changeUserPassword(user, oldPassword, newPassword):
computerName = LPCWSTR(getComputerName())
user = LPCWSTR(user)
oldPassword = LPCWSTR(oldPassword)
newPassword = LPCWSTR(newPassword)
res = ctypes.windll.netapi32.NetUserChangePassword(computerName, user, oldPassword, newPassword)
if res != 0:
# Log the error, and raise exception to parent
error = getErrorMessage()
raise Exception('Error changing password for user {}: {}'.format(user.value, error))
class LASTINPUTINFO(ctypes.Structure):
_fields_ = [
('cbSize', ctypes.c_uint),
('dwTime', ctypes.c_uint),
]
def initIdleDuration(atLeastSeconds):
'''
In windows, there is no need to set screensaver
'''
pass
def getIdleDuration():
lastInputInfo = LASTINPUTINFO()
lastInputInfo.cbSize = ctypes.sizeof(lastInputInfo)
ctypes.windll.user32.GetLastInputInfo(ctypes.byref(lastInputInfo))
millis = ctypes.windll.kernel32.GetTickCount() - lastInputInfo.dwTime # @UndefinedVariable
return millis / 1000.0
def getCurrentUser():
'''
Returns current logged in username
'''
return os.environ['USERNAME']

View File

@@ -0,0 +1,95 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from __future__ import unicode_literals
from win32com.shell import shell # @UnresolvedImport, pylint: disable=import-error
import _winreg as wreg # @UnresolvedImport, pylint: disable=import-error
import win32security # @UnresolvedImport, pylint: disable=import-error
import cPickle
DEBUG = False
# Can be changed to whatever we want, but registry key is protected by permissions
def encoder(data):
return data.encode('bz2')
def decoder(data):
return data.decode('bz2')
path = 'Software\\UDSActor'
baseKey = wreg.HKEY_CURRENT_USER if DEBUG is True else wreg.HKEY_LOCAL_MACHINE # @UndefinedVariable
def checkPermissions():
return True if DEBUG else shell.IsUserAnAdmin()
def fixRegistryPermissions(handle):
if DEBUG:
return
# Fix permissions so users can't read this key
v = win32security.GetSecurityInfo(handle, win32security.SE_REGISTRY_KEY, win32security.DACL_SECURITY_INFORMATION)
dacl = v.GetSecurityDescriptorDacl()
n = 0
# Remove all normal users access permissions to the registry key
while n < dacl.GetAceCount():
if unicode(dacl.GetAce(n)[2]) == u'PySID:S-1-5-32-545': # Whell known Users SID
dacl.DeleteAce(n)
else:
n += 1
win32security.SetSecurityInfo(handle, win32security.SE_REGISTRY_KEY,
win32security.DACL_SECURITY_INFORMATION | win32security.PROTECTED_DACL_SECURITY_INFORMATION,
None, None, dacl, None)
def readConfig():
try:
key = wreg.OpenKey(baseKey, path, 0, wreg.KEY_QUERY_VALUE) # @UndefinedVariable
data, _ = wreg.QueryValueEx(key, '') # @UndefinedVariable
wreg.CloseKey(key) # @UndefinedVariable
return cPickle.loads(decoder(data))
except Exception:
return None
def writeConfig(data, fixPermissions=True):
try:
key = wreg.OpenKey(baseKey, path, 0, wreg.KEY_ALL_ACCESS) # @UndefinedVariable
except Exception:
key = wreg.CreateKeyEx(baseKey, path, 0, wreg.KEY_ALL_ACCESS) # @UndefinedVariable
if fixPermissions is True:
fixRegistryPermissions(key.handle)
wreg.SetValueEx(key, "", 0, wreg.REG_BINARY, encoder(cPickle.dumps(data))) # @UndefinedVariable
wreg.CloseKey(key) # @UndefinedVariable

15
actors/src/update.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
function process {
pyuic4 about-dialog.ui -o about_dialog_ui.py -x
pyuic4 message-dialog.ui -o message_dialog_ui.py -x
pyuic4 setup-dialog.ui -o setup_dialog_ui.py -x
}
pyrcc4 -py3 UDSActor.qrc -o UDSActor_rc.py
# process current directory ui's
process

4
client/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
/bin
/udsclient_*
/udsclient-*.tar.gz
/*.rpm

View File

@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>tunnelLaucher</name>
<name>UDSclient</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>

8
client/.pydevproject Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/${PROJECT_DIR_NAME}/src</path>
</pydev_pathproperty>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
</pydev_project>

View File

@@ -1,30 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual C# Express 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UdsAdmin", "UdsAdmin\UdsAdmin.csproj", "{F8DBFEC2-6B52-4A89-AD0B-1886B2ABC11D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F8DBFEC2-6B52-4A89-AD0B-1886B2ABC11D}.Debug|Any CPU.ActiveCfg = Debug|x86
{F8DBFEC2-6B52-4A89-AD0B-1886B2ABC11D}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{F8DBFEC2-6B52-4A89-AD0B-1886B2ABC11D}.Debug|Mixed Platforms.Build.0 = Debug|x86
{F8DBFEC2-6B52-4A89-AD0B-1886B2ABC11D}.Debug|x86.ActiveCfg = Debug|x86
{F8DBFEC2-6B52-4A89-AD0B-1886B2ABC11D}.Debug|x86.Build.0 = Debug|x86
{F8DBFEC2-6B52-4A89-AD0B-1886B2ABC11D}.Release|Any CPU.ActiveCfg = Release|x86
{F8DBFEC2-6B52-4A89-AD0B-1886B2ABC11D}.Release|Mixed Platforms.ActiveCfg = Release|x86
{F8DBFEC2-6B52-4A89-AD0B-1886B2ABC11D}.Release|Mixed Platforms.Build.0 = Release|x86
{F8DBFEC2-6B52-4A89-AD0B-1886B2ABC11D}.Release|x86.ActiveCfg = Release|x86
{F8DBFEC2-6B52-4A89-AD0B-1886B2ABC11D}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -1,224 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Este código fue generado por una herramienta.
// Versión de runtime:4.0.30319.239
//
// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
// se vuelve a generar el código.
// </auto-generated>
//------------------------------------------------------------------------------
namespace UdsAdmin {
using System;
/// <summary>
/// Clase de recurso con establecimiento inflexible de tipos, para buscar cadenas traducidas, etc.
/// </summary>
// StronglyTypedResourceBuilder generó automáticamente esta clase
// a través de una herramienta como ResGen o Visual Studio.
// Para agregar o quitar un miembro, edite el archivo .ResX y, a continuación, vuelva a ejecutar ResGen
// con la opción /str o vuelva a generar su proyecto de VS.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Images {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Images() {
}
/// <summary>
/// Devuelve la instancia de ResourceManager almacenada en caché utilizada por esta clase.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("UdsAdmin.Images", typeof(Images).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Reemplaza la propiedad CurrentUICulture del subproceso actual para todas las
/// búsquedas de recursos mediante esta clase de recurso con establecimiento inflexible de tipos.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
internal static System.Drawing.Bitmap apply16 {
get {
object obj = ResourceManager.GetObject("apply16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap assignedServices16 {
get {
object obj = ResourceManager.GetObject("assignedServices16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap authenticators16 {
get {
object obj = ResourceManager.GetObject("authenticators16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap cache16 {
get {
object obj = ResourceManager.GetObject("cache16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap cancel16 {
get {
object obj = ResourceManager.GetObject("cancel16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap connectivity16 {
get {
object obj = ResourceManager.GetObject("connectivity16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap delete16 {
get {
object obj = ResourceManager.GetObject("delete16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap deployedService16 {
get {
object obj = ResourceManager.GetObject("deployedService16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap deployedServices16 {
get {
object obj = ResourceManager.GetObject("deployedServices16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap downarrow16 {
get {
object obj = ResourceManager.GetObject("downarrow16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap empty16 {
get {
object obj = ResourceManager.GetObject("empty16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap find16 {
get {
object obj = ResourceManager.GetObject("find16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap groups16 {
get {
object obj = ResourceManager.GetObject("groups16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Icon iconDeployedServices16 {
get {
object obj = ResourceManager.GetObject("iconDeployedServices16", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
internal static System.Drawing.Bitmap networks16 {
get {
object obj = ResourceManager.GetObject("networks16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap new16 {
get {
object obj = ResourceManager.GetObject("new16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap osmanagers16 {
get {
object obj = ResourceManager.GetObject("osmanagers16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap publications16 {
get {
object obj = ResourceManager.GetObject("publications16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap serviceProviders16 {
get {
object obj = ResourceManager.GetObject("serviceProviders16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap services16 {
get {
object obj = ResourceManager.GetObject("services16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap transports16 {
get {
object obj = ResourceManager.GetObject("transports16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap uparrow16 {
get {
object obj = ResourceManager.GetObject("uparrow16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap users16 {
get {
object obj = ResourceManager.GetObject("users16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@@ -1,191 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="apply16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\apply16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="assignedServices16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\assignedServices16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="authenticators16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\authenticators16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="cache16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\cache16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="cancel16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\cancel16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="connectivity16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\connectivity16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="delete16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\delete16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="deployedService16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\deployedService16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="deployedServices16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\deployedServices16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="downarrow16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\downarrow16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="empty16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\empty16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="find16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\find16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="groups16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\groups16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="iconDeployedServices16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\deployedServices16.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="networks16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\networks16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="new16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\new16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="osmanagers16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\osmanagers16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="publications16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\publications16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="serviceProviders16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\serviceProviders16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="services16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\services16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="transports16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\transports16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="uparrow16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\uparrow16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="users16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\users16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@@ -1,72 +0,0 @@
// Copyright (c) 2012 Virtual Cable S.L.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither the name of Virtual Cable S.L. nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// author: Adolfo Gómez, dkmaster at dkmon dot com
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Globalization;
using System.Threading;
namespace UdsAdmin
{
static class Program
{
/// <summary>
/// Punto de entrada principal para la aplicación.
/// </summary>
[STAThread]
static void Main()
{
string[] args = Environment.GetCommandLineArgs();
foreach (string arg in args)
{
if (arg == "--enabledebug" || arg == "--enabledevel")
UdsAdmin.Properties.Settings.Default.debug = true;
else if (arg == "--disabledebug" || arg == "--disabledevel")
UdsAdmin.Properties.Settings.Default.debug = false;
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
CultureInfo culture = new CultureInfo(UdsAdmin.Properties.Settings.Default.Locale);
Thread.CurrentThread.CurrentCulture = culture;
Thread.CurrentThread.CurrentUICulture = culture;
forms.LoginForm logForm = new forms.LoginForm();
DialogResult res = logForm.ShowDialog();
if (res == DialogResult.Cancel)
{
return;
}
Application.Run(new forms.MainForm());
Properties.Settings.Default.Save();
}
}
}

View File

@@ -1,38 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Resources;
// La información general sobre un ensamblado se controla mediante el siguiente
// conjunto de atributos. Cambie estos atributos para modificar la información
// asociada con un ensamblado.
[assembly: AssemblyTitle("UDS Administration Client")]
[assembly: AssemblyDescription("(c) 2012 Virtual Cable S.L.\nXML-RPC.NET Copyright (c) 2006 Charles Cook")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Virtual Cable S.L.")]
[assembly: AssemblyProduct("UDS Administration Client")]
[assembly: AssemblyCopyright("Copyright © Virtual Cable 2012")]
[assembly: AssemblyTrademark("UDS Admin")]
[assembly: AssemblyCulture("")]
// Si establece ComVisible como false, los tipos de este ensamblado no estarán visibles
// para los componentes COM. Si necesita obtener acceso a un tipo de este ensamblado desde
// COM, establezca el atributo ComVisible como true en este tipo.
[assembly: ComVisible(false)]
// El siguiente GUID sirve como identificador de typelib si este proyecto se expone a COM
[assembly: Guid("203d7325-5e07-455f-a27c-09d2c31d00a2")]
// La información de versión de un ensamblado consta de los cuatro valores siguientes:
//
// Versión principal
// Versión secundaria
// Número de compilación
// Revisión
//
// Puede especificar todos los valores o establecer como predeterminados los números de versión de compilación y de revisión
// mediante el asterisco ('*'), como se muestra a continuación:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.0.0")]
[assembly: AssemblyFileVersion("1.2.0.0")]
[assembly: NeutralResourcesLanguageAttribute("en")]

View File

@@ -1,63 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Este código fue generado por una herramienta.
// Versión de runtime:4.0.30319.225
//
// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
// se vuelve a generar el código.
// </auto-generated>
//------------------------------------------------------------------------------
namespace UdsAdmin.Properties {
using System;
/// <summary>
/// Clase de recurso con establecimiento inflexible de tipos, para buscar cadenas traducidas, etc.
/// </summary>
// StronglyTypedResourceBuilder generó automáticamente esta clase
// a través de una herramienta como ResGen o Visual Studio.
// Para agregar o quitar un miembro, edite el archivo .ResX y, a continuación, vuelva a ejecutar ResGen
// con la opción /str o vuelva a generar su proyecto de VS.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Devuelve la instancia de ResourceManager almacenada en caché utilizada por esta clase.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("UdsAdmin.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Reemplaza la propiedad CurrentUICulture del subproceso actual para todas las
/// búsquedas de recursos mediante esta clase de recurso con establecimiento inflexible de tipos.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -1,143 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.296
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace UdsAdmin.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("en-US")]
public string Locale {
get {
return ((string)(this["Locale"]));
}
set {
this["Locale"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("20000")]
public int TimeOut {
get {
return ((int)(this["TimeOut"]));
}
set {
this["TimeOut"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("93")]
public int wUsernameCol {
get {
return ((int)(this["wUsernameCol"]));
}
set {
this["wUsernameCol"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("220")]
public int wNameCol {
get {
return ((int)(this["wNameCol"]));
}
set {
this["wNameCol"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("81")]
public int wStateCol {
get {
return ((int)(this["wStateCol"]));
}
set {
this["wStateCol"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("93")]
public int wLastAccessCol {
get {
return ((int)(this["wLastAccessCol"]));
}
set {
this["wLastAccessCol"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("250")]
public int wCommentsCol {
get {
return ((int)(this["wCommentsCol"]));
}
set {
this["wCommentsCol"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("320")]
public int MaxControlWidth {
get {
return ((int)(this["MaxControlWidth"]));
}
set {
this["MaxControlWidth"] = value;
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("200")]
public int StatsItems {
get {
return ((int)(this["StatsItems"]));
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool debug {
get {
return ((bool)(this["debug"]));
}
set {
this["debug"] = value;
}
}
}
}

View File

@@ -1,36 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="UdsAdmin.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="Locale" Type="System.String" Scope="User">
<Value Profile="(Default)">en-US</Value>
</Setting>
<Setting Name="TimeOut" Type="System.Int32" Scope="User">
<Value Profile="(Default)">20000</Value>
</Setting>
<Setting Name="wUsernameCol" Type="System.Int32" Scope="User">
<Value Profile="(Default)">93</Value>
</Setting>
<Setting Name="wNameCol" Type="System.Int32" Scope="User">
<Value Profile="(Default)">220</Value>
</Setting>
<Setting Name="wStateCol" Type="System.Int32" Scope="User">
<Value Profile="(Default)">81</Value>
</Setting>
<Setting Name="wLastAccessCol" Type="System.Int32" Scope="User">
<Value Profile="(Default)">93</Value>
</Setting>
<Setting Name="wCommentsCol" Type="System.Int32" Scope="User">
<Value Profile="(Default)">250</Value>
</Setting>
<Setting Name="MaxControlWidth" Type="System.Int32" Scope="User">
<Value Profile="(Default)">320</Value>
</Setting>
<Setting Name="StatsItems" Type="System.Int32" Scope="Application">
<Value Profile="(Default)">200</Value>
</Setting>
<Setting Name="debug" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>

Some files were not shown because too many files have changed in this diff Show More