Add case to test Get Channel Info via IPMI
Command "Get Channel Info" is belongs to the IPMI Messaging
Support Commands in IPMI SPEC.
Signed-off-by: Tony Lee <tony.lee@quantatw.com>
Change-Id: Ia6c5e2c9b1ec8904df5859e450863f32b49f2558
diff --git a/lib/bmc_network_utils.py b/lib/bmc_network_utils.py
index 93f932b..7e91604 100644
--- a/lib/bmc_network_utils.py
+++ b/lib/bmc_network_utils.py
@@ -176,3 +176,31 @@
"""
return vf.filter_struct(get_channel_config(), "[('medium_type', 'other-lan|lan-802.3')]", regex=1)
+
+
+def get_channel_access_config():
+ r"""
+ Get the channel access config data and return as a dictionary.
+
+ Example:
+
+ channel_access_config = get_channel_access_config()
+ print_vars(channel_access_config)
+
+ channel_access_config:
+ [1]:
+ [priv_limit]: priv-admin
+ [per_msg_auth_disabled]: False
+ [access_mode]: always_available
+ [alerting_disabled]: False
+ [user_auth_disabled]: False
+ [2]:
+ [priv_limit]: priv-admin
+ [per_msg_auth_disabled]: False
+ [access_mode]: always_available
+ [alerting_disabled]: False
+ [user_auth_disabled]: False
+ """
+ stdout, stderr, rc = bsu.bmc_execute_command("cat /usr/share/ipmi-providers/channel_access.json")
+
+ return json.loads(stdout)