From 1a20990699594de8c558688cd2ce9e5e5df4b48a Mon Sep 17 00:00:00 2001 From: daniceexi Date: Mon, 5 Nov 2012 02:37:53 +0000 Subject: [PATCH] fixed the approach to search objects in getrvidparms git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14237 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/rhevm.pm | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/rhevm.pm b/xCAT-server/lib/xcat/plugins/rhevm.pm index b73f659e2..ff2f0a292 100644 --- a/xCAT-server/lib/xcat/plugins/rhevm.pm +++ b/xCAT-server/lib/xcat/plugins/rhevm.pm @@ -3844,12 +3844,7 @@ sub getrvidparms { $consparam{method} = 'kvm'; # get the attributes for vm - my $api = "/api/vms?search=$node"; - my $method = "GET"; - my $content = ""; - - my $request = genreq($ref_rhevm, $method, $api, $content); - my ($rc, $response) = send_req($ref_rhevm, $request->as_string()); + my ($rc, undef, undef, $response) = search_src($ref_rhevm, "vms", "$node"); my $vmid; my $rsp; @@ -3880,11 +3875,11 @@ sub getrvidparms { } # get the password ticket for the external program to accesss the VNC - $api = "/api/vms/$vmid/ticket"; - $method = "POST"; - $content = "120"; + my $api = "/api/vms/$vmid/ticket"; + my $method = "POST"; + my $content = "120"; - $request = genreq($ref_rhevm, $method, $api, $content); + my $request = genreq($ref_rhevm, $method, $api, $content); ($rc, $response) = send_req($ref_rhevm, $request->as_string()); if ($rc) {