A peer can be added by specifying a list of NIDs
The first NID shall be used as the primary NID. The rest of
the NIDs will be added under the primary NID
A peer can be added by explicitly specifying the key NID, and then
by adding a set of other NIDs, all done through one API call
If a key NID already exists, but it's not an MR NI, then adding that
Key NID from DLC shall convert that NI to an MR NI
If a key NID already exists, and it is an MR NI, then re-adding the
Key NID shall have no effect
if a Key NID already exists as part of another peer, then adding that
NID as part of another peer or as primary shall fail
if a NID is being added to a peer NI and that NID is a non-MR, then
that NID is moved under the peer and is made to be MR capable
if a NID is being added to a peer and that NID is an MR NID and part
of another peer, then the operation shall fail
if a NID is being added to a peer and it is already part of that Peer
then the operation is a no-op.
Moreover, the code is structured to consider the addition of Dynamic
Discovery in later patches.
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I71f740192a31ae00f83014ca3e9e06b61ae4ecd5
Reviewed-on: http://review.whamcloud.com/20531