#
#
-# Copyright (C) 2006, 2007, 2010 Google Inc.
+# Copyright (C) 2006, 2007, 2010, 2011 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
pass
+class FakeGLM:
+ """Fake global lock manager object"""
+
+ def list_owned(self, level):
+ return set()
+
+
class FakeContext:
"""Fake context object"""
def __init__(self):
self.cfg = FakeConfig()
- self.glm = None
+ self.glm = FakeGLM()
class FakeGetentResolver:
self.rapi_uid = uid
self.rapi_gid = gid
self.noded_uid = uid
+ self.noded_gid = gid
self.daemons_gid = gid
self.admin_gid = gid
+
+ def LookupUid(self, uid):
+ return "user%s" % uid
+
+ def LookupGid(self, gid):
+ return "group%s" % gid