fixed the approach to search objects in getrvidparms

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14238 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
daniceexi 2012-11-05 02:38:45 +00:00
parent 8935e432a2
commit c1bf69de94

View File

@ -3839,12 +3839,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;
@ -3875,11 +3870,11 @@ sub getrvidparms {
}
# get the password ticket for the external program to accesss the VNC
$api = "/api/vms/$vmid/ticket";
$method = "POST";
$content = "<action><ticket><expiry>120</expiry></ticket></action>";
my $api = "/api/vms/$vmid/ticket";
my $method = "POST";
my $content = "<action><ticket><expiry>120</expiry></ticket></action>";
$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) {