fix bug 3856: rmvm could remove cec

This commit is contained in:
zhaoertao 2013-10-24 23:30:54 -07:00
parent 0059b61600
commit ecf7b06d5a

View File

@ -1720,6 +1720,10 @@ sub remove {
my @result = ();
while (my ($mtms, $h) = each (%$hash)) {
while (my ($name, $d) = each (%$h)) {
if (@$d[4] ne "lpar") {
push @result, [$name, "Node must be LPAR", 1];
last;
}
&clear_service_authority_lpar($request, $name, $d);
my $values = &set_lpar_undefined($request, $name, $d);
push @result, $values;
@ -1878,6 +1882,10 @@ sub mkspeclpar {
my @nodes = keys(%$h);
my $ent = $vmtab->getNodesAttribs(\@nodes, ['cpus', 'memory','physlots', 'othersettings']);
while (my ($name, $d) = each (%$h)) {
if (@$d[4] ne 'lpar') {
push @result, [$name, "Node must be LPAR", 1];
last;
}
if (!exists($memhash->{run})) {
my @td = @$d;
@td[0] = 0;
@ -1954,6 +1962,10 @@ sub mkfulllpar {
while (my ($mtms, $h) = each (%$hash)) {
my $rethash;
while (my ($name, $d) = each (%$h)) {
if (@$d[4] ne 'lpar') {
push @result, [$name, "Node must be LPAR", 1];
last;
}
if (!exists($rethash->{run})) {
my @td = @$d;
@td[0] = 0;