Package backend :: Package server :: Package action :: Module rollback
[hide private]
[frames] | no frames]

Source Code for Module backend.server.action.rollback

 1  # 
 2  # Copyright (c) 2008--2015 Red Hat, Inc. 
 3  # 
 4  # This software is licensed to you under the GNU General Public License, 
 5  # version 2 (GPLv2). There is NO WARRANTY for this software, express or 
 6  # implied, including the implied warranties of MERCHANTABILITY or FITNESS 
 7  # FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2 
 8  # along with this software; if not, see 
 9  # http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. 
10  # 
11  # Red Hat trademarks are not licensed under GPLv2. No permission is 
12  # granted to use or replicate Red Hat trademarks that are incorporated 
13  # in this software or its documentation. 
14  # 
15  # rollback functions 
16  # 
17  # 
18   
19  from spacewalk.common.rhnLog import log_debug, log_error 
20  from spacewalk.server.rhnLib import InvalidAction 
21   
22  # the "exposed" functions 
23  __rhnexport__ = ['config', 'listTransactions', 'rollback'] 
24   
25   
26 -def config(serverId, actionId, dry_run=0):
27 log_debug(3) 28 # XXX Not working 29 return 1
30 31
32 -def listTransactions(serverId, actionId, dry_run=0):
33 log_debug(3) 34 return None
35 36
37 -def rollback(serverId, actionId, dry_run=0):
38 log_debug(3, dry_run) 39 # since rhnActionTransactions table is gone, this call have to fail 40 log_error("Invalid rollback.rollback action %s for server id %s" % 41 (actionId, serverId)) 42 raise InvalidAction( 43 "Invalid rollback.rollback action %s for server id %s" % 44 (actionId, serverId))
45