Fix for cpu inventory path for Get_a_Property test case

Why the test case failing:
   - The URL for CPU is not same for Barreleye and Palmetto.

This fix includes:
   - Enumerates the inventory to find cpu URL path
   - Removed this test from skip list
   - Added keywork in utils.robot to get url paths ending
     particular string

Resolves openbmc/openbmc-test-automation#208

Change-Id: I59c1969ad01a6aee88af99aa7ccc7a46359584f1
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/lib/utils.robot b/lib/utils.robot
index 5d95454..b7134a1 100644
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -486,3 +486,21 @@
     :FOR  ${var}  IN Range  1  4
     \     BMC Mem Performance check
 
+Get Endpoint Paths
+    [Documentation]   Returns all url paths ending with given endpoint
+    ...               Example:
+    ...               Given the following endpoint: cpu
+    ...               This keyword will return: list of all urls ending with cpu -
+    ...               /org/openbmc/inventory/system/chassis/motherboard/cpu0,
+    ...               /org/openbmc/inventory/system/chassis/motherboard/cpu1
+    ...               Description of arguments:
+    ...               path       URL path for enumeration
+    ...               endpoint   string for which url path ending
+    [Arguments]   ${path}   ${endpoint}
+
+    ${resp}=   Read Properties   ${path}/enumerate   timeout=30
+    log Dictionary   ${resp}
+
+    ${list}=   Get Dictionary Keys   ${resp}
+    ${resp}=   Get Matches   ${list}   regexp=^.*[0-9a-z_].${endpoint}[0-9]*$
+    [return]   ${resp}