Fix for GPU regex, object path and spacing changes.

Change-Id: Id3b16faf8f056acae80729b8f8a62d27fd8d0034
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/utils.robot b/lib/utils.robot
index 4f05617..43f3133 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -789,12 +789,15 @@
     ...               endpoint   string for which url path ending
     [Arguments]   ${path}   ${endpoint}
 
-    ${resp}=   Read Properties   ${path}/enumerate   timeout=30
-    log Dictionary   ${resp}
+    ${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}
+    ${list}=  Get Dictionary Keys  ${resp}
+    # For a given string, look for prefix and suffix for matching expression.
+    # Start of string followed by zero or more of any character followed by
+    # any digit or lower case character.
+    ${resp}=  Get Matches  ${list}  regexp=^.*[0-9a-z_].${endpoint}[0-9a-z]*$
+    [Return]  ${resp}
 
 Check Zombie Process
     [Documentation]    Check if any defunct process exist or not on BMC
diff --git a/tests/test_inventory.robot b/tests/test_inventory.robot
index 08ed746..7e60414 100644
--- a/tests/test_inventory.robot
+++ b/tests/test_inventory.robot
@@ -322,7 +322,8 @@
     # },
 
 
-    ${gpu_list}=  Get Endpoint Paths  ${HOST_INVENTORY_URI}system  gv*
+    ${gpu_list}=  Get Endpoint Paths
+    ...  ${HOST_INVENTORY_URI}system/chassis/motherboard  gv*
     Should Not Be Empty  ${gpu_list}
     :FOR  ${gpu_uri}  IN  @{gpu_list}
     \  ${status}=  Run Keyword And Return Status