2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-07-19 02:51:09 +00:00

issue1308 lsdef and Rest API issues with regex on nicks

This commit is contained in:
bybai
2016-06-16 03:47:51 -04:00
parent 321abc8984
commit 4d5734558b

View File

@@ -2458,6 +2458,10 @@ sub expandnicsattr()
# Value: eth0!1.1.1.1|2.1.1.1,eth1!3.1.1.1|4.1.1.1
my $nicval=$2;
#In the lsdef, remove the ^| and |$ before displaying
$nicval=~s/(^\||\|$)//g;
# $nicarr[0]: eth0!1.1.1.1|2.1.1.1
# $nicarr[1]: eth1!3.1.1.1|4.1.1.1
my @nicarr = split(/,/, $nicval);