From 338c4e1337320807a143d39e29e2de3babf96c64 Mon Sep 17 00:00:00 2001 From: phamt Date: Thu, 27 Jan 2011 21:44:56 +0000 Subject: [PATCH] Update zvm code to handle class B/A networks. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8761 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/zvm.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/zvm.pm b/xCAT-server/lib/xcat/plugins/zvm.pm index 7e42c468b..a70e2668d 100644 --- a/xCAT-server/lib/xcat/plugins/zvm.pm +++ b/xCAT-server/lib/xcat/plugins/zvm.pm @@ -3053,6 +3053,10 @@ sub nodeSet { # Get first 3 octets of node IP (IPv4) @words = split( /\./, $hostIP ); my $octets = "$words[0].$words[1].$words[2]"; + + # Class B and A networks + my $octetsB = "$words[0].$words[1].0"; + my $octetsA = "$words[0].0.0"; # Get networks in 'networks' table my $entries = xCAT::zvmUtils->getAllTabEntries('networks'); @@ -3065,7 +3069,7 @@ sub nodeSet { $network = $_->{'net'}; # If networks contains the first 3 octets of the node IP - if ( $network =~ m/$octets/i ) { + if ( $network =~ m/$octets/i || $network =~ m/$octetsB/i || $network =~ m/$octetsA/i) { # Exit loop last;