[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH] Add documentation to the dm and dmraid pythong bindings. As well as to the



Hi,

Disclaimer: I'm not familiar with the code I just reviewed!

Joel Granados Moreno wrote:

<snip>

+	{"targets", (PyCFunction)pydm_targets, METH_NOARGS,
+		"Scans for suppoerted targets.  It does not expect any args.  "
+		"It returns a list of target objects."},

typo / spelling: "suppoerted" -> supported


 	{NULL, NULL}
 };
diff --git a/dmraid.c b/dmraid.c
index e693512..3100768 100644
--- a/dmraid.c
+++ b/dmraid.c
@@ -265,10 +265,12 @@ pydmraid_dev_scanparts(PyObject *self, PyObject *args, PyObject *kwds)
 static struct PyMethodDef pydmraid_dev_methods[] = {
 	{"rmpart",
 		(PyCFunction)pydmraid_dev_rmpart,
-		METH_VARARGS | METH_KEYWORDS},
+		METH_VARARGS | METH_KEYWORDS,
+		"Removes the partition devined by the partno argument"},

typo / spelling: "devined" -> defined

 	{"scanparts",
 		(PyCFunction)pydmraid_dev_scanparts,
-		METH_NOARGS},
+		METH_NOARGS,
+		"(Re)scans all partition for the current device"},

typo / spelling: "partition" -> partitions

@@ -1309,16 +1314,20 @@ out:
 static struct PyMethodDef pydmraid_ctx_methods[] = {
 	{"discover_disks",
 		(PyCFunction)pydmraid_ctx_discover_disks,
-		METH_VARARGS | METH_KEYWORDS},
+		METH_VARARGS | METH_KEYWORDS,
+		"Discover all disks in the system"},
 	{"discover_raiddevs",
 		(PyCFunction)pydmraid_ctx_discover_raiddevs,
-		METH_VARARGS | METH_KEYWORDS},
+		METH_VARARGS | METH_KEYWORDS,
+		"Identifies which disks are part of a raid set"},
 	{"discover_raidsets",
 		(PyCFunction)pydmraid_ctx_discover_raidsets,
-		METH_NOARGS},
+		METH_NOARGS,
+		"Discovers the raid sets in the system"},
 	{"get_raidsets",
 		(PyCFunction)pydmraid_ctx_get_raidsets,
-		METH_VARARGS | METH_KEYWORDS},
+		METH_VARARGS | METH_KEYWORDS,
+		"Returns a list of all the raid sets in the system"},
 	{NULL},
 };


I see that 3 of these methods take args, I think you should document which args and what they do.

Regards,

Hans


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]