From edeac5de74bff59d62c069c4dda97a81ef3e1b99 Mon Sep 17 00:00:00 2001 From: daniceexi Date: Tue, 6 Nov 2012 08:51:40 +0000 Subject: [PATCH] added displaying of host which vm belongs to; added change for rmigrate; fixed issue of cpu configure during mkvm/chvm git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14255 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/rhevm.pm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/rhevm.pm b/xCAT-server/lib/xcat/plugins/rhevm.pm index ff2f0a292..0748910fc 100644 --- a/xCAT-server/lib/xcat/plugins/rhevm.pm +++ b/xCAT-server/lib/xcat/plugins/rhevm.pm @@ -909,6 +909,7 @@ my $display = { 'stateless' => ["stateless"], 'placement_policy' => ["placement_policy/affinity"], 'memory_guaranteed' => ["memory_policy/guaranteed"], + 'host' => ["host", "id", "hosts", "/host/name"], }, 'templates' => { 'memory' => ["memory"], @@ -2001,7 +2002,7 @@ sub mkvm { if ($myvment->{cpus}) { my ($socketnum, $corenum) = split(':', $myvment->{cpus}); unless ($corenum) {$corenum = 1;} - $cpuele = ""; + $cpuele = ""; } elsif (!$hastpl) { $cpuele = "" } @@ -2490,7 +2491,7 @@ sub chvm { if ($myvment->{cpus}) { my ($socketnum, $corenum) = split(':', $myvment->{cpus}); unless ($corenum) {$corenum = 1;} - $cpuele = ""; + $cpuele = ""; } # configure bootorder @@ -2811,7 +2812,7 @@ sub rmigrate { my $api = "/api/vms/$vmid/migrate"; my $method = "POST"; - my $content = ""; + my $content = "true"; my $request = genreq($ref_rhevm, $method, $api, $content); my $response; ($rc, $response) = send_req($ref_rhevm, $request->as_string()); @@ -3049,7 +3050,11 @@ sub search_src { if ($type eq "vms") { $idstr = "/vms/vm"; } elsif ($type eq "hosts") { - $idstr = "/hosts/host"; + if ($individual) { + $idstr = "/host"; + } else { + $idstr = "/hosts/host"; + } } elsif ($type eq "templates") { $idstr = "/templates/template"; } elsif ($type eq "storagedomains") {