[Ovirt-devel] [PATCH] Fix how taskomatic adds NICs to the System prior to creating it in Cobbler.
Darryl L. Pierce
dpierce at redhat.com
Fri Aug 22 19:59:19 UTC 2008
Taskomatic was using the old constructor for Cobbler::NetworkInterface, which took
two arguments: the interface name and a map of the attributes. With rubygem-cobbler
v0.0.2 that constructor was changed to take just the map of attributes, and gets
the interface name from there.
This patch fixes the call to create the NetworkInterface when creating a new VM,
by removing the interface name.
Signed-off-by: Darryl L. Pierce <dpierce at redhat.com>
---
wui/ovirt-wui.spec | 2 +-
wui/src/task-omatic/task_vm.rb | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/wui/ovirt-wui.spec b/wui/ovirt-wui.spec
index 0b17151..519a223 100644
--- a/wui/ovirt-wui.spec
+++ b/wui/ovirt-wui.spec
@@ -18,7 +18,7 @@ Requires: rubygem(activeldap) >= 0.10.0
Requires: rubygem(rails) >= 2.0.1
Requires: rubygem(mongrel) >= 1.0.1
Requires: rubygem(krb5-auth) >= 0.6
-Requires: rubygem(cobbler) = 0.0.1
+Requires: rubygem(cobbler) = 0.0.2
Requires: ruby-gettext-package
Requires: postgresql-server
Requires: ruby-postgres
diff --git a/wui/src/task-omatic/task_vm.rb b/wui/src/task-omatic/task_vm.rb
index fca978f..3588224 100644
--- a/wui/src/task-omatic/task_vm.rb
+++ b/wui/src/task-omatic/task_vm.rb
@@ -159,9 +159,7 @@ def create_vm(task)
if provisioning_arr[1]==Vm::PROFILE_PREFIX
system = Cobbler::System.new('name' => vm.uuid,
'profile' => provisioning_arr[2])
- system.interfaces=[Cobbler::NetworkInterface.new(
- ["intf",{'mac_address' => vm.vnic_mac_addr}]
- )]
+ system.interfaces=[Cobbler::NetworkInterface.new({'mac_address' => vm.vnic_mac_addr})]
system.save
elsif provisioning_arr[1]==Vm::IMAGE_PREFIX
#FIXME handle cobbler images
--
1.5.5.1
More information about the ovirt-devel
mailing list