LU-13750 lnet: Fix peer add command
The peer add command is suppose to add one peer per command.
The primary NID can be specified followed by a set of constituent
NIDs. This patch restores this behavior and ensures that for
peer add the primary NID must be specified to make the command
syntax more consistent with the peer del command. And behave in
a similar way as net add/del commands.
The APIs have been changed as well to make it more easily testable
from the LUTF.
There a few cleanups to avoid having to do unnecessary parsing.
Test-Parameters: trivial testlist=sanity-lnet
Fixes:
892f675e660 (LU-12410 lnet: Convert lnetctl peer add and del)
Signed-off-by: Amir Shehata <ashehata@whamcloud.com>
Change-Id: I32ed53742f2c379abb47f7acd3f7f336062e0458
Reviewed-on: https://review.whamcloud.com/39392
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>