55# (at your option) any later version.
66
77from turbogears .database import session
8- from turbogears import config
8+ from turbogears import config , expose
99from bkr .server import identity
1010from bkr .server .xmlrpccontroller import RPCRoot
1111from bkr .server .distrotrees import DistroTrees
@@ -297,7 +297,7 @@ class LabControllers(RPCRoot):
297297 # For XMLRPC methods in this class.
298298 exposed = True
299299
300- @cherrypy . expose
300+ @expose ()
301301 @identity .require (identity .in_group ("lab_controller" ))
302302 def add_distro_tree (self , new_distro ):
303303 lab_controller = identity .current .user .lab_controller
@@ -366,7 +366,7 @@ def add_distro_tree(self, new_distro):
366366
367367 return distro_tree .id
368368
369- @cherrypy . expose
369+ @expose ()
370370 @identity .require (identity .in_group ("lab_controller" ))
371371 def remove_distro_trees (self , distro_tree_ids ):
372372 lab_controller = identity .current .user .lab_controller
@@ -375,7 +375,7 @@ def remove_distro_trees(self, distro_tree_ids):
375375 distro_tree .expire (lab_controller = lab_controller )
376376 return True
377377
378- @cherrypy . expose
378+ @expose ()
379379 @identity .require (identity .in_group ('lab_controller' ))
380380 def get_running_command_ids (self ):
381381 lab_controller = identity .current .user .lab_controller
@@ -386,7 +386,7 @@ def get_running_command_ids(self):
386386 .values (Command .id )
387387 return [id for id , in running_commands ]
388388
389- @cherrypy . expose
389+ @expose ()
390390 @identity .require (identity .in_group ('lab_controller' ))
391391 def get_queued_command_details (self ):
392392 lab_controller = identity .current .user .lab_controller
@@ -471,7 +471,7 @@ def get_queued_command_details(self):
471471 result .append (d )
472472 return result
473473
474- @cherrypy . expose
474+ @expose ()
475475 def get_installation_for_system (self , fqdn ):
476476 system = System .by_fqdn (fqdn , identity .current .user )
477477 if not system .installations :
@@ -504,7 +504,7 @@ def get_installation_for_system(self, fqdn):
504504 if lca .lab_controller == system .lab_controller ],
505505 }
506506
507- @cherrypy . expose
507+ @expose ()
508508 @identity .require (identity .in_group ('lab_controller' ))
509509 def mark_command_running (self , command_id ):
510510 lab_controller = identity .current .user .lab_controller
@@ -517,7 +517,7 @@ def mark_command_running(self, command_id):
517517 cmd .change_status (CommandStatus .running )
518518 return True
519519
520- @cherrypy . expose
520+ @expose ()
521521 @identity .require (identity .in_group ('lab_controller' ))
522522 def mark_command_completed (self , command_id ):
523523 lab_controller = identity .current .user .lab_controller
@@ -536,7 +536,7 @@ def mark_command_completed(self, command_id):
536536 cmd .log_to_system_history ()
537537 return True
538538
539- @cherrypy . expose
539+ @expose ()
540540 @identity .require (identity .in_group ('lab_controller' ))
541541 def add_completed_command (self , fqdn , action ):
542542 # Reports completion of a command that was executed
@@ -551,7 +551,7 @@ def add_completed_command(self, fqdn, action):
551551 cmd .log_to_system_history ()
552552 return True
553553
554- @cherrypy . expose
554+ @expose ()
555555 @identity .require (identity .in_group ('lab_controller' ))
556556 def mark_command_aborted (self , command_id , message = None ):
557557 lab_controller = identity .current .user .lab_controller
@@ -569,7 +569,7 @@ def mark_command_aborted(self, command_id, message=None):
569569 return True
570570
571571
572- @cherrypy . expose
572+ @expose ()
573573 @identity .require (identity .in_group ('lab_controller' ))
574574 def mark_command_failed (self , command_id , message = None , system_broken = True ):
575575 lab_controller = identity .current .user .lab_controller
@@ -595,7 +595,7 @@ def mark_command_failed(self, command_id, message=None, system_broken=True):
595595 cmd .log_to_system_history ()
596596 return True
597597
598- @cherrypy . expose
598+ @expose ()
599599 @identity .require (identity .in_group ('lab_controller' ))
600600 def clear_running_commands (self , message = None ):
601601 """
@@ -631,7 +631,7 @@ def clear_running_commands(self, message=None):
631631 cmd .abort (message )
632632 return True
633633
634- @cherrypy . expose
634+ @expose ()
635635 @identity .require (identity .in_group ('lab_controller' ))
636636 def get_distro_trees (self , filter = None ):
637637 """
0 commit comments