Port suite from mkumatag personal repo w/o history

All these files came from https://github.com/mkumatag/openbmc-automation
The decision to remove the commit history was because most of the 122
commits did not follow commit comment AND content best practices.
The ability to remove the commit history was possible because all
contributors where from the same company (IBM) making the coordination /
notification/acceptence easy.  See all the gory details about the
first try to commit with history here...
https://github.com/openbmc/openbmc-test-automation/pull/1

This suite of tests will run against an OpenBMC based server.  It will
run good/bad path testing against the REST interface.  There are tests
that will also run ipmitool on the victim BMC too.

If you want to support a new system in to the suite you should only
have to edit two files...
    data/<system>.py
    tox.ini

The README.md contains details on how to setup for the first time along
with how to execute the test suite

NOTE: some test cases require tools that do not exist on the system.
Currently the ipmitool is needed and if you do not manually copy / link
it in to the tools directory some suites will fail.
diff --git a/lib/utilities.py b/lib/utilities.py
new file mode 100755
index 0000000..95201dc
--- /dev/null
+++ b/lib/utilities.py
@@ -0,0 +1,105 @@
+#!/usr/bin/python -u
+import sys
+from robot.libraries.BuiltIn import BuiltIn
+import imp
+import string
+
+
+def get_sensor(module_name, value):
+	m = imp.load_source('module.name', module_name)
+
+	for i in m.ID_LOOKUP['SENSOR']:
+
+		if m.ID_LOOKUP['SENSOR'][i] == value:
+			return i
+
+	return 0xFF
+	
+
+def get_inventory_sensor (module_name, value):
+	m = imp.load_source('module.name', module_name)
+
+	value = string.replace(value, m.INVENTORY_ROOT, '<inventory_root>')
+
+	for i in m.ID_LOOKUP['SENSOR']:
+
+		if m.ID_LOOKUP['SENSOR'][i] == value:
+			return i
+
+	return 0xFF
+
+
+################################################################
+#  This will return the URI's of the FRU type 
+#
+#  i.e.  get_inventory_list('../data/Palmetto.py')
+#
+#  [/org/openbmc/inventory//system/chassis/motherboard/cpu0/core0,
+#   /org/openbmc/inventory/system/chassis/motherboard/dimm0]
+################################################################
+def get_inventory_list(module_name):
+
+	l = []
+	m = imp.load_source('module.name', module_name)
+
+	
+	for i in m.ID_LOOKUP['FRU']:
+		s = m.ID_LOOKUP['FRU'][i]
+		s = s.replace('<inventory_root>',m.INVENTORY_ROOT)
+		l.append(s)
+	
+	return l
+
+
+################################################################
+#  This will return the URI's of the FRU type 
+#
+#  i.e.  get_inventory_fru_type_list('../data/Barreleye.py', 'CPU')
+#
+#  [/org/openbmc/inventory//system/chassis/motherboard/cpu0,
+#   /org/openbmc/inventory//system/chassis/motherboard/cpu1]
+################################################################
+def  get_inventory_fru_type_list(module_name, fru):
+	l = []
+	m = imp.load_source('module.name', module_name)
+
+	for i in m.FRU_INSTANCES.keys():
+		if m.FRU_INSTANCES[i]['fru_type'] == fru:
+			s = i.replace('<inventory_root>',m.INVENTORY_ROOT)
+			l.append(s)
+	
+	return l
+
+
+################################################################
+#  This will return the URI's of the FRU type that contain VPD
+#
+#  i.e.  get_vpd_inventory_list('../data/Palmetto.py', 'DIMM')
+#
+#  [/org/openbmc/inventory/system/chassis/motherboard/dimm0,
+#   /org/openbmc/inventory/system/chassis/motherboard/dimm1]
+################################################################
+def  get_vpd_inventory_list(module_name, fru):
+	l = []
+	m = imp.load_source('module.name', module_name)
+
+	for i in m.ID_LOOKUP['FRU_STR']:
+		x = m.ID_LOOKUP['FRU_STR'][i]
+
+		if m.FRU_INSTANCES[x]['fru_type'] == fru:
+			s = x.replace('<inventory_root>',m.INVENTORY_ROOT)
+			l.append(s)
+	
+	return l
+
+
+def call_keyword(keyword):
+    return BuiltIn().run_keyword(keyword)
+
+
+def main():
+	print get_vpd_inventory_list('../data/Palmetto.py', 'DIMM')
+
+
+if __name__ == "__main__":
+   main()
\ No newline at end of file