Re: [test-API 06/14] Improve the comments telling what the scripts does for utils/*.py

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

 



On 04/19/2012 10:25 AM, Osier Yang wrote:
What GNU recommends:

<quote>
    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C)<year>    <name of author>
</quote>

---
v1 was ACKed, but I forgot to push it, this is a rebasing on the same
files (some of them are moved to different place).
---
  src/env_parser.py     |    6 ++----
  utils/XMLParser.py    |    7 ++-----
  utils/format.py       |    6 ++----
  utils/log.py          |    6 ++----
  utils/xmlbuilder.py   |    6 ++----
  utils/xmlgenerator.py |    6 ++----
  6 files changed, 12 insertions(+), 25 deletions(-)

diff --git a/src/env_parser.py b/src/env_parser.py
index 58f05fc..0d2f2a2 100644
--- a/src/env_parser.py
+++ b/src/env_parser.py
@@ -1,5 +1,7 @@
  #!/usr/bin/env python
  #
+# env_parser.py: Parser for environment config (env.cfg).
+#
  # Copyright (C) 2010-2012 Red Hat, Inc.
  #
  # libvirt-test-API is free software; you can redistribute it and/or
@@ -14,10 +16,6 @@
  #
  # You should have received a copy of the GNU General Public License
  # along with this program. If not, see<http://www.gnu.org/licenses/>.
-#
-# Filename: env_parser.py
-# Summary: parse the env configuration file
-# Description: The module is a tool to parse the env configuration file

  import ConfigParser
  import os
diff --git a/utils/XMLParser.py b/utils/XMLParser.py
index b254023..20a376e 100644
--- a/utils/XMLParser.py
+++ b/utils/XMLParser.py
@@ -1,5 +1,7 @@
  #!/usr/bin/env python
  #
+# XMLParser.py: Parse XML document, the result is a python dict.
+#
  # Copyright (C) 2010-2012 Red Hat, Inc.
  #
  # libvirt-test-API is free software; you can redistribute it and/or
@@ -14,11 +16,6 @@
  #
  # You should have received a copy of the GNU General Public License
  # along with this program. If not, see<http://www.gnu.org/licenses/>.
-#
-# Filename: XMLParser.py
-# Summary: parse and xml document into a python dictionary
-# Description: The module is a tool to parses
-# and xml document into a python dictionary

  import os
  from xml.dom import minidom
diff --git a/utils/format.py b/utils/format.py
index cb2b8e0..5d69e5c 100644
--- a/utils/format.py
+++ b/utils/format.py
@@ -1,5 +1,7 @@
  #!/usr/bin/env python
  #
+# format.py: Print logging message in specific format.
+#
  # Copyright (C) 2010-2012 Red Hat, Inc.
  #
  # libvirt-test-API is free software; you can redistribute it and/or
@@ -14,10 +16,6 @@
  #
  # You should have received a copy of the GNU General Public License
  # along with this program. If not, see<http://www.gnu.org/licenses/>.
-#
-# Filename: format.py
-# Summary: generate specified kind of format string
-# Description: The module is a tool to generate specified kind of format string

  import os
  from string import Template
diff --git a/utils/log.py b/utils/log.py
index 3ca8729..4111fd9 100644
--- a/utils/log.py
+++ b/utils/log.py
@@ -1,5 +1,7 @@
  #!/usr/bin/env python
  #
+# log.py: Classes for logging.
+#
  # Copyright (C) 2010-2012 Red Hat, Inc.
  #
  # libvirt-test-API is free software; you can redistribute it and/or
@@ -14,10 +16,6 @@
  #
  # You should have received a copy of the GNU General Public License
  # along with this program. If not, see<http://www.gnu.org/licenses/>.
-#
-# Filename: log.py
-# Summary: log file operation
-# Description: The module is a tool to provide basic log file operation

  import time
  import os
diff --git a/utils/xmlbuilder.py b/utils/xmlbuilder.py
index a8a9871..d2ce6bb 100644
--- a/utils/xmlbuilder.py
+++ b/utils/xmlbuilder.py
@@ -1,5 +1,7 @@
  #!/usr/bin/env python
  #
+# xmlbuilder.py: Class for building XML for libvirt objects.
+#
  # Copyright (C) 2010-2012 Red Hat, Inc.
  #
  # libvirt-test-API is free software; you can redistribute it and/or
@@ -14,10 +16,6 @@
  #
  # You should have received a copy of the GNU General Public License
  # along with this program. If not, see<http://www.gnu.org/licenses/>.
-#
-# Filename: xmlbuilder.py
-# Summary: operation for building domain xml
-# Description: The module is to provide operation for building domain xml

  __DEBUG__ = False

diff --git a/utils/xmlgenerator.py b/utils/xmlgenerator.py
index 7f5839b..ee019b7 100644
--- a/utils/xmlgenerator.py
+++ b/utils/xmlgenerator.py
@@ -1,5 +1,7 @@
  #!/usr/bin/env python
  #
+# xmlgenerator.py: Generate XML for libvirt objects.
+#
  # Copyright (C) 2010-2012 Red Hat, Inc.
  #
  # libvirt-test-API is free software; you can redistribute it and/or
@@ -14,10 +16,6 @@
  #
  # You should have received a copy of the GNU General Public License
  # along with this program. If not, see<http://www.gnu.org/licenses/>.
-#
-# Filename: xmlgenerator.py
-# Summary: generate domain xml
-# Description: The module is a tool to generate domain xml

  import os
  import sys

       ACK

       Guannan Ren

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]