Author: remi
Date: 2009-06-03 13:38:01 +0200 (Wed, 03 Jun 2009)
New Revision: 4737

Modified:
   
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/03_resourceUgcServer.py
   
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/Gadget.py
   
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/ugc/Ugc.py
Log:
* configure "startedBy" parameter with "scheduler" when a gadget is started by 
the scheduler (alert)

Modified: 
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/03_resourceUgcServer.py
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/03_resourceUgcServer.py
        2009-06-03 11:03:57 UTC (rev 4736)
+++ 
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/03_resourceUgcServer.py
        2009-06-03 11:38:01 UTC (rev 4737)
@@ -269,12 +269,16 @@
             arguments = (
                 ugc.getDescription().getUuid(),
                 parentTask.getCommand(),
-                {})
+                {
+                    'startedBy' : 'scheduler',
+                })
             data = {
                 'commandType' : 'ugc_start',
                 'uuid' : ugc.getDescription().getUuid(),
                 'command' : parentTask.getCommand(),
-                'parameters' : {},
+                'parameters' : {
+                    'startedBy' : 'scheduler',
+                },
             }
             date = ugcTask.getDateDict()
             hoursBegin = ugcTask.getTimeDict(ugcTask.getHoursBegin())

Modified: 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/Gadget.py
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/Gadget.py
     2009-06-03 11:03:57 UTC (rev 4736)
+++ 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/gadget/Gadget.py
     2009-06-03 11:38:01 UTC (rev 4737)
@@ -494,6 +494,9 @@
                 myParameters[parameter.getName()] = parameter.getDefaultValue()
         if not parameters.has_key('uuid'):
             myParameters['uuid'] = self.getDescription().getUuid()
+        for key in parameters.keys():
+            if not myParameters.has_key(key):
+                myParameters[key] = parameters[key]
         return self.__parentPlugin.start(command, myParameters)
 
     # 
--------------------------------------------------------------------------

Modified: 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/ugc/Ugc.py
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/ugc/Ugc.py
   2009-06-03 11:03:57 UTC (rev 4736)
+++ 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/ugc/Ugc.py
   2009-06-03 11:38:01 UTC (rev 4737)
@@ -388,6 +388,9 @@
             else:
                 myParameters[parameter.getName()] = parameter.getValue()
         myParameters['uuid'] = self.getDescription().getUuid()
+        for key in parameters.keys():
+            if not myParameters.has_key(key):
+                myParameters[key] = parameters[key]
         return self.__parentGadget.start(command, myParameters)
 
     # 
--------------------------------------------------------------------------


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to