Added test case to verify BMC version via xCAT.

Resolves openbmc/openbmc-test-automation#819

Change-Id: I5b5a6c5c6a990264ee4e0d132c56f6092403e17a
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/xcat/test_xcat_inventory.robot b/xcat/test_xcat_inventory.robot
new file mode 100644
index 0000000..65d3f74
--- /dev/null
+++ b/xcat/test_xcat_inventory.robot
@@ -0,0 +1,38 @@
+*** Settings ***
+Documentation   Module for testing BMC inventory via XCAT.
+
+Resource        ../lib/xcat/resource.txt
+Resource        ../lib/xcat/xcat_utils.robot
+Resource        ../lib/state_manager.robot
+
+Suite Setup     XCAT Suite Setup
+
+*** Variables ***
+
+*** Test Cases ***
+
+Verify BMC Version Via XCAT
+    [Documentation]  Verify BMC version using XCAT and REST.
+    [Tags]  Verify_BMC_Version_Via_XCAT
+
+    # Get BMC version info via xcat
+    ${version_via_xcat}=  Execute Command On XCAT  rinv  firm
+
+    # Get BMC version info via rest
+    ${version_via_rest}=  Get BMC Version
+
+    Should contain  ${version_via_xcat}  ${version_via_rest}
+
+
+*** Keywords ***
+
+XCAT Suite Setup
+    [Documentation]  XCAT suite setup.
+
+    Open Connection And Login To XCAT
+
+    # Check if XCAT is installed.
+    ${cmd_output}=  Execute Command  ${XCAT_DIR_PATH}/lsxcatd -v
+    Should Not Be Empty  ${cmd_output}  msg=XCAT not installed.
+
+    Add Nodes To XCAT  ${OPENBMC_HOST}