fix bridge name with score or underscore version 0.1.7.8
authorJens Kasten <jens@kasten-edv.de>
Sat, 24 Aug 2013 14:44:11 +0200
changeset 127 8eb957db5ee1
parent 126 c854d476e762
child 128 dcbcfd2a5421
fix bridge name with score or underscore
.hgignore
CHANGELOG.txt
README.txt
bin/kvm-admin
kvmtools/config/build_config.py
scripts/bridge_starter
scripts/bridge_stoper
setup.py
--- a/.hgignore	Thu May 17 16:41:20 2012 +0200
+++ b/.hgignore	Sat Aug 24 14:44:11 2013 +0200
@@ -1,4 +1,4 @@
 syntax: glob
-^build/
+^build/*
 *.pyc
 *.swp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CHANGELOG.txt	Sat Aug 24 14:44:11 2013 +0200
@@ -0,0 +1,4 @@
+* 0.1.7.8 [20130823] 
+    - fix issue when bridge have score or underscore in his name
+      in kvmtools/config/build_config.py
+    - some very small fixes but not affect the code
--- a/README.txt	Thu May 17 16:41:20 2012 +0200
+++ b/README.txt	Sat Aug 24 14:44:11 2013 +0200
@@ -8,7 +8,7 @@
 Usage
 =====
 ### kvm-admin ####
-usage: kvm-admin [-h] [--debug] [--verbose]
+usage: kvm-admin [-h] [--debug] [--verbose] [--version]
                  {boot,create,kill,modify,monitor,reboot,show,shutdown,status}
                  ...
 kvm-admin: error: too few arguments
--- a/bin/kvm-admin	Thu May 17 16:41:20 2012 +0200
+++ b/bin/kvm-admin	Sat Aug 24 14:44:11 2013 +0200
@@ -23,7 +23,7 @@
 #
 
 """
-(c) 2007-2012 Jens Kasten <jens@kasten-edv.de> 
+(c) 2007-2013 Jens Kasten <jens@kasten-edv.de> 
 """
 
 import os
@@ -98,6 +98,8 @@
         help=_("Print full python traceback if an error occur."))
     parser.add_argument("--verbose", default=False, action="store_true",
         help=_("Show additional information."))
+    parser.add_argument("--version", default=False, action="store_true",
+        help=_("Show version number."))
     
     # add action as subparser
     subparser = parser.add_subparsers(title="All commands for kvm-admin",
@@ -145,7 +147,7 @@
         kvm_admin.monitor = args.args_monitor        
     else:
         # set default monitor to help
-        kvm_admin.monitor =["help"] 
+        kvm_admin.monitor = ["help"] 
 
     # assign optional argumente for shutdown
     if kvm_admin.action == "shutdown":
--- a/kvmtools/config/build_config.py	Thu May 17 16:41:20 2012 +0200
+++ b/kvmtools/config/build_config.py	Sat Aug 24 14:44:11 2013 +0200
@@ -141,7 +141,7 @@
                     bridge_key
                 # search for bridge value
                 if re.search("bridge", value):
-                    bridge = re.search("(,|)bridge=([a-zA-Z0-9]+)", value)
+                    bridge = re.search("(,|)bridge=([a-zA-Z0-9-_]+)", value)
                     if bridge:
                         # remove the bridge from string
                         value = value.replace(bridge.group(0), "")
--- a/scripts/bridge_starter	Thu May 17 16:41:20 2012 +0200
+++ b/scripts/bridge_starter	Sat Aug 24 14:44:11 2013 +0200
@@ -1,4 +1,6 @@
 #!/bin/bash
+# obsolet only for examine the old style
+#
 # rename a existing network interface
 # create a bridge 
 # add the renamed network interface to the bridge
--- a/scripts/bridge_stoper	Thu May 17 16:41:20 2012 +0200
+++ b/scripts/bridge_stoper	Sat Aug 24 14:44:11 2013 +0200
@@ -1,4 +1,6 @@
 #!/bin/bash
+# obsolete only to examine the old style
+#
 # bring down nic and bridge
 # rename a existing network interface
 # destroy bridge 
--- a/setup.py	Thu May 17 16:41:20 2012 +0200
+++ b/setup.py	Sat Aug 24 14:44:11 2013 +0200
@@ -4,7 +4,9 @@
 #
 
 """
-(c) 2011-2012 Jens Kasten <jens@kasten-edv.de>
+(c) 2011-2013 Jens Kasten <jens@kasten-edv.de>
+
+last modified: 20130823
 """
 
 from distutils.core import setup
@@ -31,7 +33,7 @@
     copytree("config", path.kvm_config_dir)
     os.chmod(path.kvm_config_dir, 0755)
     if not os.path.isdir(path.kvm_domains_dir):
-        os.mkdir(self.kvm_domains_dir)
+        os.mkdir(path.kvm_domains_dir)
     os.chmod(path.kvm_domains_dir, 0755)
     copy("domains/example", example)
     if not os.path.isdir(path.kvm_auto_dir):
@@ -49,7 +51,7 @@
 
 setup(
     name = "kvmtools",
-    version = "0.1.7.7",
+    version = "0.1.7.8",
     keywords = ["kvm-admin", "kvmtools"],
     author = "Jens Kasten",
     author_email = "jens@kasten-edv.de",