Fix regression with --mac option
# HG changeset patch
# User john.levon@sun.com # Date 1228365031 28800 # Node ID 09d307f7983dc9e29be7e1fe724ef12ade1a42a2 # Parent 152e0bfb277efb24679d7c7f440df0b0f6b21529 Fix regression with --mac option Older versions of virt-install allowed a MAC address to be specified and a default network would be created. For ease of use, if the user specifies exactly one MAC address, create a default network for it. Signed-off-by: John Levon <john.levon@sun.com> diff --git a/virtinst/cli.py b/virtinst/cli.py --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -295,6 +295,15 @@ def digest_networks(conn, macs, bridges, if bridges: networks = map(lambda b: "bridge:" + b, bridges) + # With just one mac, create a default network if one is not + # specified. + if len(macs) == 1 and len(networks) == 0: + if util.privileged_user(): + net = util.default_network(conn) + networks.append(net[0] + ":" + net[1]) + else: + networks.append("user") + # ensure we have less macs then networks. Auto fill in the remaining # macs if len(macs) > len(networks): _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools@redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools |
Fix regression with --mac option
On Wed, Dec 03, 2008 at 08:31:39PM -0800, john.levon@sun.com wrote:
> # HG changeset patch > # User john.levon@sun.com > # Date 1228365031 28800 > # Node ID 09d307f7983dc9e29be7e1fe724ef12ade1a42a2 > # Parent 152e0bfb277efb24679d7c7f440df0b0f6b21529 > Fix regression with --mac option > > Older versions of virt-install allowed a MAC address to be specified > and a default network would be created. For ease of use, if the user > specifies exactly one MAC address, create a default network for it. ACK Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools@redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools |
Fix regression with --mac option
john.levon@sun.com wrote:
> # HG changeset patch > # User john.levon@sun.com > # Date 1228365031 28800 > # Node ID 09d307f7983dc9e29be7e1fe724ef12ade1a42a2 > # Parent 152e0bfb277efb24679d7c7f440df0b0f6b21529 > Fix regression with --mac option > > Older versions of virt-install allowed a MAC address to be specified > and a default network would be created. For ease of use, if the user > specifies exactly one MAC address, create a default network for it. > > Signed-off-by: John Levon <john.levon@sun.com> > > Thanks, applied: http://hg.et.redhat.com/virt/applications/virtinst--devel?cs=2707387564df - Cole _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools@redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools |
| All times are GMT. The time now is 04:27 PM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.