From 3e3eb858e5d05fb8be60f665a7a86c97837455b6 Mon Sep 17 00:00:00 2001 From: daniceexi Date: Tue, 6 Nov 2012 08:52:34 +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/branches/2.7@14256 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 10167a104..6a7443151 100644 --- a/xCAT-server/lib/xcat/plugins/rhevm.pm +++ b/xCAT-server/lib/xcat/plugins/rhevm.pm @@ -904,6 +904,7 @@ my $display = { 'stateless' => ["stateless"], 'placement_policy' => ["placement_policy/affinity"], 'memory_guaranteed' => ["memory_policy/guaranteed"], + 'host' => ["host", "id", "hosts", "/host/name"], }, 'templates' => { 'memory' => ["memory"], @@ -1996,7 +1997,7 @@ sub mkvm { if ($myvment->{cpus}) { my ($socketnum, $corenum) = split(':', $myvment->{cpus}); unless ($corenum) {$corenum = 1;} - $cpuele = ""; + $cpuele = ""; } elsif (!$hastpl) { $cpuele = "" } @@ -2485,7 +2486,7 @@ sub chvm { if ($myvment->{cpus}) { my ($socketnum, $corenum) = split(':', $myvment->{cpus}); unless ($corenum) {$corenum = 1;} - $cpuele = ""; + $cpuele = ""; } # configure bootorder @@ -2806,7 +2807,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()); @@ -3044,7 +3045,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") {