Signed-off-by: Balazs Lecz <[email protected]>
---
 lib/rapi/rlib2.py |    2 +-
 lib/ssconf.py     |    5 +++--
 lib/uidpool.py    |    9 +++++----
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/lib/rapi/rlib2.py b/lib/rapi/rlib2.py
index 020aae5..09e883d 100644
--- a/lib/rapi/rlib2.py
+++ b/lib/rapi/rlib2.py
@@ -22,7 +22,7 @@
 """Remote API version 2 baserlib.library.
 
   PUT or POST?
-  ------------
+  ============
 
   According to RFC2616 the main difference between PUT and POST is that
   POST can create new resources but PUT can only create the resource the
diff --git a/lib/ssconf.py b/lib/ssconf.py
index e561549..966f670 100644
--- a/lib/ssconf.py
+++ b/lib/ssconf.py
@@ -447,9 +447,10 @@ class SimpleStore(object):
 
     The separator character is a newline.
 
-    The return value can be parsed using uidpool.ParseUidPool():
+    The return value can be parsed using uidpool.ParseUidPool()::
+
       ss = ssconf.SimpleStore()
-      uid_pool = uidpool.ParseUidPool(ss.GetUidPool(), separator="\n")
+      uid_pool = uidpool.ParseUidPool(ss.GetUidPool(), separator="\\n")
 
     """
     data = self._ReadFile(constants.SS_UID_POOL)
diff --git a/lib/uidpool.py b/lib/uidpool.py
index 21c9113..9e3c8e5 100644
--- a/lib/uidpool.py
+++ b/lib/uidpool.py
@@ -222,16 +222,17 @@ class LockedUid(object):
 def RequestUnusedUid(all_uids):
   """Tries to find an unused uid from the uid-pool, locks it and returns it.
 
-  Usage pattern:
+  Usage pattern
+  =============
 
-    1) When starting a process
+  1. When starting a process::
 
       from ganeti import ssconf
       from ganeti import uidpool
 
       # Get list of all user-ids in the uid-pool from ssconf
       ss = ssconf.SimpleStore()
-      uid_pool = uidpool.ParseUidPool(ss.GetUidPool(), separator="\n")
+      uid_pool = uidpool.ParseUidPool(ss.GetUidPool(), separator="\\n")
       all_uids = set(uidpool.ExpandUidPool(uid_pool))
 
       uid = uidpool.RequestUnusedUid(all_uids)
@@ -243,7 +244,7 @@ def RequestUnusedUid(all_uids):
         # Return the UID to the pool
         uidpool.ReleaseUid(uid)
 
-    2) Stopping a process
+  2. Stopping a process::
 
       from ganeti import uidpool
 
-- 
1.7.0.1



-- 
Subscription settings: 
http://groups.google.com/group/ganeti-devel/subscribe?hl=en

Reply via email to