IPMI channel support test use case

Added:
   - Test case to verify supported IPMI channel of the system.
   - Test case to verify invalid IPMI channel response.
   - Keyword to get the MAC address.
   - Keyword to get the valid physical network count.
   - Added expect_error parameter to standard IPMI keyword args.

For reference: openbmc/openbmc#3036

Resolves  openbmc/openbmc-test-automation#1313

Change-Id: Ie94e87094056248c335822b1bdc41b8254bfa343
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/bmc_network_utils.robot b/lib/bmc_network_utils.robot
index 41b248c..8c0e2ef 100644
--- a/lib/bmc_network_utils.robot
+++ b/lib/bmc_network_utils.robot
@@ -85,6 +85,7 @@
 
     [Return]  ${cmd_output}
 
+# TODO: openbmc/openbmc-test-automation#1331
 Get BMC MAC Address
     [Documentation]  Get system MAC address.
 
@@ -103,6 +104,28 @@
 
     [Return]  ${words[1]}
 
+
+Get BMC MAC Address List
+    [Documentation]  Get system MAC address
+
+    # Sample output of "ip addr | grep ether":
+    # link/ether xx.xx.xx.xx.xx.xx brd ff:ff:ff:ff:ff:ff
+
+    ${cmd_output}=  BMC Execute Command  /sbin/ip addr | grep ether
+
+    # Split the line and return MAC address.
+    # Split list data:
+    # link/ether | xx:xx:xx:xx:xx:xx | brd | ff:ff:ff:ff:ff:ff
+    # link/ether | xx:xx:xx:xx:xx:xx | brd | ff:ff:ff:ff:ff:ff
+
+    ${mac_list}=  Create List
+    @{lines}=  Split To Lines  ${cmd_output[0]}
+    :FOR  ${line}  IN  @{lines}
+    \  @{words}=  Split String  ${line}
+    \   Append To List  ${mac_list}  ${words[1]}
+
+    [Return]  ${mac_list}
+
 Get BMC Hostname
     [Documentation]  Get BMC hostname.