backend/server/handlers/config/rhn_config_management.py | 10 ++++++++++
backend/server/handlers/xmlrpc/queue.py | 2 ++
client/tools/rhncfg/config_client/rpc_cli_repository.py | 16 ++++++++--------
3 files changed, 20 insertions(+), 8 deletions(-)
New commits:
commit 025d3530215dd479acde563114d183a46477f02d
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Jul 23 15:23:47 2010 +0200
send only actions which we are able to cache
safe traffic and do not send actions which sents a lot of data, but we are unable to
cache it. yet.
e.g. config.*
diff --git a/backend/server/handlers/xmlrpc/queue.py
b/backend/server/handlers/xmlrpc/queue.py
index a62e692..1accc25 100644
--- a/backend/server/handlers/xmlrpc/queue.py
+++ b/backend/server/handlers/xmlrpc/queue.py
@@ -214,6 +214,8 @@ class Queue(rhnHandler):
and a.action_type = at.id
and sa.status in (0, 1) -- Queued or picked up
and a.earliest_action <= sysdate + (:time_window/24) -- Check
earliest_action
+ and at.label in ('packages.update',
'errata.update',
+ 'packages.runTransaction',
'packages.fullUpdate')
order by a.earliest_action, a.prerequisite nulls first, a.id
""")
commit c3d3b82c136c91b31b6167137a27a4fc6ed37092
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Jul 23 13:40:55 2010 +0200
code style - whitespace expansion
expand tabs so the file is actually readable even with different tab setting
diff --git a/client/tools/rhncfg/config_client/rpc_cli_repository.py
b/client/tools/rhncfg/config_client/rpc_cli_repository.py
index 97f3f5b..411b003 100644
--- a/client/tools/rhncfg/config_client/rpc_cli_repository.py
+++ b/client/tools/rhncfg/config_client/rpc_cli_repository.py
@@ -74,17 +74,17 @@ class ClientRepository(repository.RPC_Repository):
if result.has_key('missing'):
return None
- dirs_created = None
+ dirs_created = None
# Older servers will not return directories; if filetype is missing,
# assume file
- if result.get('filetype') == 'directory':
- if os.path.isfile(result['path']):
- raise cfg_exceptions.DirectoryEntryIsFile(result['path'])
- else:
- auto_delete = 0
- temp_file = result['path']
- else:
+ if result.get('filetype') == 'directory':
+ if os.path.isfile(result['path']):
+ raise cfg_exceptions.DirectoryEntryIsFile(result['path'])
+ else:
+ auto_delete = 0
+ temp_file = result['path']
+ else:
f = file_utils.FileProcessor()
temp_file, dirs_created = f.process(result, directory=dest_directory)
commit 2b3e2b511349acc55dad24eb7a6407950cdbf212
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Jul 23 13:36:42 2010 +0200
add comment to function
I spent dozens minutes trying to find what it does,
safe time to somebody else in future.
diff --git a/backend/server/handlers/config/rhn_config_management.py
b/backend/server/handlers/config/rhn_config_management.py
index 5b89e67..f2f2498 100644
--- a/backend/server/handlers/config/rhn_config_management.py
+++ b/backend/server/handlers/config/rhn_config_management.py
@@ -113,6 +113,7 @@ class ConfigManagement(configFilesHandler.ConfigFilesHandler):
""")
def client_list_files(self, systemid, config_channel=None):
+ """ Return array of files (its path), which we manage on that
system. """
log_debug(1)
self.auth_system(systemid)
@@ -150,6 +151,15 @@ class ConfigManagement(configFilesHandler.ConfigFilesHandler):
return result
def client_get_file(self, systemid, filename):
+ """ Returns requested config file.
+ If file do not exist or system is not subscribed to, then we return.
+ {'missing' : 1}
+ Otherwise dictionary is returned. It should contains keys:
+ path, config_channel, file_contents, checksum_type, checksum, delim_start
+ delim_end, revision, username, groupname, filemode, encoding, filetype and
+ selinux_ctx.
+ See server/configFilesHandler.py:format_file_results
+ """
self.auth_system(systemid)
server_id = self.server.getid()
Show replies by date