[Et-mgmt-commits-list] [SCM] koan branch, master now at v0.2.8-10-g6dd7226

Michael DeHaan mdehaan at redhat.com
Fri Apr 20 17:37:01 UTC 2007


Hello,

This is an automated email from the git hooks/update script, it was
generated because a ref change was pushed to the repository.

Updating branch, master,
       via  6dd7226739473c52e198a7ae792029421d8af46f (commit)
       via  f00a7e2466789d41733e53318fdd9ed71b4a06f6 (commit)
      from  e4eaff5f72258699608899cea2f7d7607bcb8fa2 (commit)

- Log -----------------------------------------------------------------
commit 6dd7226739473c52e198a7ae792029421d8af46f
Author: Michael DeHaan <mdehaan at mdehaan.rdu.redhat.com>
Date:   Fri Apr 20 13:38:27 2007 -0400

    Update spec and changelog.

commit f00a7e2466789d41733e53318fdd9ed71b4a06f6
Author: Michael DeHaan <mdehaan at mdehaan.rdu.redhat.com>
Date:   Fri Apr 20 13:37:28 2007 -0400

    Add ability to override the name of a virtual domain using the koan command
    line, rather than taking the MAC address as the default.
    
    Also update manpage.
-----------------------------------------------------------------------

Diffstat:
 CHANGELOG          |    2 ++
 koan.pod           |    6 +++---
 koan.spec          |    4 +++-
 koan/app.py        |   15 +++++++++++----
 koan/virtcreate.py |   10 +++++++---
 5 files changed, 26 insertions(+), 11 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index c1d5569..b85f850 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,8 @@ Koan CHANGELOG
 
 * Thu Apr 19 2007 Michael DeHaan <mdehaan at redhat.com> - 0.2.9-1
 - koan now speaks XMLRPC with cobbler (requires cobbler > 0.4.7-4)
+- allow any RAM size >128MB.
+- add --virtname option (see manpage)
 
 * Fri Mar 23 2007 Michael DeHaan <mdehaan at redhat.com> - 0.2.8-3
 - Remove redundant code for --virt-name handling.
diff --git a/koan.pod b/koan.pod
index 1870c57..36c051e 100644
--- a/koan.pod
+++ b/koan.pod
@@ -8,9 +8,9 @@ koan --server=<host> --list-profiles
 
 koan --server=<host> --list-systems
 
-koan --virt --server=<host> --profile=<name>
+koan --virt --server=<host> --profile=<name> [--virtname=<name>]
 
-koan --virt --server=<host> --system=<name>
+koan --virt --server=<host> --system=<name> [--virtname=<name>]
 
 koan --replace-self --server=<host> --profile=<name>
 
@@ -20,7 +20,7 @@ koan --replace-self --server=<host> --system=<name>
 
 When invoked, koan requests profile information from a remote boot server that has been configured with cobbler.   What koan does with the profile data depends on whether it was invoked with --virt or --replace-self.
 
-For --virt, cobbler will create new virtualized guests on a machine in accordance to the orders from cobbler.  You can then, once finished, use "virsh" and "xm" commands on the guest.  Cobbler automatically names domains based on their mac addresses.   
+For --virt, cobbler will create new virtualized guests on a machine in accordance to the orders from cobbler.  You can then, once finished, use "virsh" and "xm" commands on the guest.  Cobbler automatically names domains based on their mac addresses.  To install using a more descriptive name, specify one with --virtname.
 
 For re-kickstarting ('--replace-self'), cobbler will reprovisioning the system, blowing away any current data and replacing it with the results of a network install.
 
diff --git a/koan.spec b/koan.spec
index a3c0430..cc68883 100644
--- a/koan.spec
+++ b/koan.spec
@@ -47,7 +47,9 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
 
 %changelog
 
-* Thu Apr 19 2007 - Michael DeHaan <mdehaan at redhat.com> - 0.2.9-1
+* Fri Apr 20 2007 - Michael DeHaan <mdehaan at redhat.com> - 0.2.9-1
+- Upstream changes (see CHANGELOG)
+- Removed yaml packages
 
 * Fri Mar 23 2007 - Michael DeHaan <mdehaan at redhat.com> - 0.2.8-2
 - Upstream changes (see CHANGELOG)
diff --git a/koan/app.py b/koan/app.py
index 91670dc..16657ef 100755
--- a/koan/app.py
+++ b/koan/app.py
@@ -56,6 +56,9 @@ def main():
                  dest="is_virt",
                  action="store_true",
                  help="requests new virtualized image installation")
+    p.add_option("-V", "--virtname",
+                 dest="virtname",
+                 help="force the virtual domain to use this name")
     p.add_option("-r", "--replace-self",
                  dest="is_auto_kickstart",
                  action="store_true",
@@ -98,9 +101,12 @@ def main():
         k.profile           = options.profile
         k.system            = options.system
         k.verbose           = options.verbose
+        if options.virtname is not None:
+            k.virtname          = options.virtname
         if options.port is not None:
-            k.port          = options.port
+            k.port              = options.port
         k.run()
+
     except InfoException, ie:
         print str(ie)
         return 1
@@ -137,6 +143,7 @@ class Koan:
         self.is_auto_kickstart = None
         self.dryrun            = None
         self.port              = 25151
+        self.virtname          = None
 
     def run(self):
         if self.server is None:
@@ -611,8 +618,8 @@ class Koan:
             uuid=virtcreate.get_uuid(self.calc_virt_uuid(pd)),
             kernel=self.safe_load(dd,'kernel_local'),
             initrd=self.safe_load(dd,'initrd_local'),
-            extra=kextra
-            # interactive=self.interactive
+            extra=kextra,
+            nameoverride=self.virtname
         )
         print results
 
@@ -648,7 +655,7 @@ class Koan:
             int(size)
         except:
             err = True
-        if size is None or size == '' or int(size) < 256:
+        if size is None or size == '' or int(size) < 128:
             err = True
         if err:
             self.debug("invalid RAM size specified, defaulting to 256 MB")
diff --git a/koan/virtcreate.py b/koan/virtcreate.py
index e028721..f573173 100755
--- a/koan/virtcreate.py
+++ b/koan/virtcreate.py
@@ -74,7 +74,7 @@ def get_mac(mac):
 
 
 def start_paravirt_install(ram=None, disk=None, mac=None,
-                           uuid=None, kernel=None, initrd=None, extra=None):
+                           uuid=None, kernel=None, initrd=None, extra=None, nameoverride=None):
 
 
     if mac == None:
@@ -84,7 +84,11 @@ def start_paravirt_install(ram=None, disk=None, mac=None,
     guest = virtinst.ParaVirtGuest()
     guest.set_boot((kernel,initrd))
     guest.set_extra_args(extra)
-    guest.set_name(macname)   
+    if nameoverride is None:
+        usename = macname
+    else:
+        usename = nameoverride
+    guest.set_name(usename)   
     guest.set_memory(ram)
     guest.set_vcpus(1)            # FIXME!
     guest.set_graphics(False)
@@ -101,5 +105,5 @@ def start_paravirt_install(ram=None, disk=None, mac=None,
 
     guest.start_install()
     
-    return "reconnect with xm console %s" % macname 
+    return "reconnect with xm console %s" % usename 
      

hooks/update
---
Git Source Code Management System
hooks/update refs/heads/master \
  e4eaff5f72258699608899cea2f7d7607bcb8fa2 \
  6dd7226739473c52e198a7ae792029421d8af46f




More information about the Et-mgmt-commits-list mailing list