Added a test case to create a session with clientid and verify
its exsistence
Changes:
- Added test case "Create A Session With ClientID And Verify".
- Added logic in lib to find test bed system IP(s).
Change-Id: I6f49d3c36c179bb22785352544b69ac25f46d484
Signed-off-by: Sushil Singh <susilsi7@in.ibm.com>
diff --git a/lib/bmc_network_utils.py b/lib/bmc_network_utils.py
index a01ee78..b6e2ba0 100644
--- a/lib/bmc_network_utils.py
+++ b/lib/bmc_network_utils.py
@@ -12,10 +12,25 @@
import collections
import re
import ipaddress
+import subprocess
from robot.libraries.BuiltIn import BuiltIn
import json
import bmc_ssh_utils as bsu
+ip_regex = r"\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}"
+
+
+def get_running_system_ip():
+ r"""
+ Get the IP address of server from which robot code is running.
+ """
+
+ stdout = subprocess.check_output("ifconfig", shell=True)
+ stdout = stdout.decode("utf-8")
+ ip_list = re.findall(ip_regex, stdout)
+
+ return ip_list
+
def netmask_prefix_length(netmask):
r"""