Improved case 'Verify Get Channel Info via IPMI'

-The original way to verify this command was through the file
"/usr/share/ipmi-providers/channel_access.json".
However, this file may not exist for different projects.
Furthermore, the command "Set Channel Access" can changes the values but
it does not write to this file. Therefore, if the Channel Access setting
has changed and is different from this file, it will fail the test.

-The original way only validates attributes in 'volatile(active)_settings',
not 'Non-Volatile Settings'.

Signed-off-by: Tony Lee <tony.lee@quantatw.com>
Change-Id: I6dbf98e0fdffea98c39ca96708b71a93679e2579
diff --git a/lib/bmc_network_utils.py b/lib/bmc_network_utils.py
index 7e91604..f3c6fea 100644
--- a/lib/bmc_network_utils.py
+++ b/lib/bmc_network_utils.py
@@ -178,10 +178,14 @@
     return vf.filter_struct(get_channel_config(), "[('medium_type', 'other-lan|lan-802.3')]", regex=1)
 
 
-def get_channel_access_config():
+def get_channel_access_config(file_name):
     r"""
     Get the channel access config data and return as a dictionary.
 
+    Description of argument:
+    file_name     File name for channel access settings (e.g. '/run/ipmi/channel_access_volatile.json',
+                 '/var/lib/ipmi/channel_access_nv.json'.).
+
     Example:
 
     channel_access_config =  get_channel_access_config()
@@ -201,6 +205,6 @@
             [alerting_disabled]:                          False
             [user_auth_disabled]:                         False
     """
-    stdout, stderr, rc = bsu.bmc_execute_command("cat /usr/share/ipmi-providers/channel_access.json")
+    stdout, stderr, rc = bsu.bmc_execute_command("cat " + file_name)
 
     return json.loads(stdout)