From d17b873107ea3124670a6da424dcfffb105a4ad3 Mon Sep 17 00:00:00 2001 From: daniceexi Date: Thu, 24 Jul 2014 09:32:43 -0400 Subject: [PATCH] Discover ip attributes for lsslp -s IVM; change the default discovred ivm named with ivm-mtm-sn instead of Server-mtm-sn --- xCAT-server/lib/xcat/plugins/lsslp.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/lsslp.pm b/xCAT-server/lib/xcat/plugins/lsslp.pm index d142fd99f..14ba0d96d 100755 --- a/xCAT-server/lib/xcat/plugins/lsslp.pm +++ b/xCAT-server/lib/xcat/plugins/lsslp.pm @@ -1099,6 +1099,7 @@ sub parse_responses { $atthash{id} = ${$attributes->{'lparid'}}[0]; $atthash{ip} = ${$attributes->{'ip-address'}}[0]; $atthash{hostname} = get_host_from_url($request, $attributes); + $atthash{hostname} =~ s/^Server/ivm/; my @ips = @{$attributes->{'ip-address'}}; foreach my $tmpip (@ips) { if (exists($::OLD_DATA_CACHE{"ivm*".$atthash{mtm}."*".$atthash{serial}})){ @@ -1584,6 +1585,9 @@ sub format_stanza { if ($type =~ /^fsp|bpa|cmm$/){ $result .= "\totherinterfaces=${$outhash->{$name}}{otherinterfaces}\n"; } + if ($type eq "ivm") { + $result .= "\tip=${$outhash->{$name}}{ip}\n"; + } $result .= "\thwtype=$globalhwtype{$type}\n"; } return( $result );