Fixed webportal bug where dasd list entry only contains 1 device. Renamed chhypervisor --smapi to --smcli.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14428 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
phamt 2012-11-26 16:41:31 +00:00
parent 4b5a7005b1
commit b0a21076e9
2 changed files with 14 additions and 5 deletions

View File

@ -261,9 +261,18 @@ sub provzlinux {
# Read XML file
my $data = $xml->XMLin($tmpl);
my $devices = $data->{'dasd'}->{'devices'}->{'listentry'};
foreach (@$devices) {
my $devices_ref = $data->{'dasd'}->{'devices'}->{'listentry'};
my @devices;
if (ref($devices_ref) eq 'HASH') {
# In the case of 1 device in the listentry, push hash into array
push(@devices, $devices_ref);
} else {
# Listentry is an array reference
@devices = @$devices_ref;
}
foreach (@devices) {
# Get disk virtual address and disk type
$type = $_->{'drivers'}->{'listentry'}->{'modules'}->{'module_entry'}->{'listentry'};
$virt_addr = $_->{'sysfs_bus_id'};

View File

@ -5527,8 +5527,8 @@ sub changeHypervisor {
$out = xCAT::zvmCPUtils->getNetwork( $hcp, $netName );
}
# smapi [api] [args]
elsif ( $args->[0] eq "--smapi" ) {
# smcli [api] [args]
elsif ( $args->[0] eq "--smcli" ) {
# Invoke SMAPI API directly through zHCP smcli
my $str = "@{$args}";
$str =~ s/$args->[0]//g;