Fixed inventory related issues in test_inventory and test_sensors test files

This change includes:
      - Inventory path cpu, dimm and other componenet are now taken using enumerate
      - Updated test_inventory TCs to get component count using enumerate.
      - Palmetto.py file updated with recent changes in skeleton.
      - This changes will not have any impact on other system run like Berreleye

What this check in does not include
      - Remove complete dependency on skeleton file. This
        will be taken care in our automation one by one.

resolves : openbmc/openbmc-test-automation#119

Change-Id: I3266d48c2484d0a8f0b91b47e06a805def1a8486
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/tests/test_inventory.robot b/tests/test_inventory.robot
index 91dc35c..d007638 100644
--- a/tests/test_inventory.robot
+++ b/tests/test_inventory.robot
@@ -13,91 +13,90 @@
 Variables         ../data/variables.py
 
 
-Suite setup		setup the suite
+Suite setup        setup the suite
 
 Force Tags  chassisboot
 
 *** Test Cases ***
 
 minimal cpu inventory
-	${count} = 	Get Total Present 	CPU
-	Should Be True 	${count}>${0}
+    ${count} =     Get Total Present     cpu
+    Should Be True     ${count}>${0}
 
 minimal dimm inventory
-	${count} = 	Get Total Present 	DIMM
-	Should Be True 	${count}>=${2}
+    ${count} =     Get Total Present     dimm
+    Should Be True     ${count}>=${2}
 
 minimal core inventory
-	${count} = 	Get Total Present 	CORE
-	Should Be True 	${count}>${0}
+    ${count} =     Get Total Present     core
+    Should Be True     ${count}>${0}
 
 minimal memory buffer inventory
-	${count} = 	Get Total Present 	MEMORY_BUFFER
-	Should Be True 	${count}>${0}
+    ${count} =     Get Total Present     membuf
+    Should Be True     ${count}>${0}
 
 minimal fan inventory
     [Tags]  minimal_fan_inventory
-	${count} = 	Get Total Present 	FAN
-	Should Be True 	${count}>${2}
+    ${count} =     Get Total Present     fan
+    Should Be True     ${count}>${2}
 
 minimal main planar inventory
-	${count} = 	Get Total Present 	MAIN_PLANAR
-	Should Be True 	${count}>${0}
+    ${count} =     Get Total Present     motherboard
+    Should Be True     ${count}>${0}
 
 minimal system inventory
-	${count} = 	Get Total Present 	SYSTEM
-	Should Be True 	${count}>${0}
+    ${count} =     Get Total Present     system
+    Should Be True     ${count}>${0}
 
 Verify CPU VPD Properties
-	Verify Properties 	CPU
+    Verify Properties     CPU
 
 Verify DIMM VPD Properties
-	Verify Properties 	DIMM
+    Verify Properties     DIMM
 
 Verify Memory Buffer VPD Properties
-	Verify Properties 	MEMORY_BUFFER
+    Verify Properties     MEMORY_BUFFER
 
 Verify Fan VPD Properties
-	Verify Properties 	FAN
+    Verify Properties     FAN
 
 Verify System VPD Properties
     [Tags]  Verify_System_VPD_Properties
-	Verify Properties 	SYSTEM
+    Verify Properties     SYSTEM
 
 
 *** Keywords ***
 
-Setup The Suite
-	BMC Power On
 
-	@{ret} = 	Get Inventory List 	${OPENBMC_MODEL}
-	Set Suite Variable 	@{sys_inv} 	@{ret}
-	${resp} = 	Read Properties 	/org/openbmc/inventory/enumerate
-	Set Suite Variable 	${SYSTEM_INFO}  	${resp}
-	log Dictionary  	${resp}
+Setup The Suite
+    BMC Power On
+
+    ${resp} =     Read Properties     /org/openbmc/inventory/enumerate
+    Set Suite Variable     ${SYSTEM_INFO}      ${resp}
+    log Dictionary      ${resp}
 
 Get Total Present
-	[arguments] 	${type}
+    [arguments]     ${type}
+    ${l} =          Create List     []
+    ${resp} =    Get Dictionary Keys    ${SYSTEM_INFO}
+    ${list} =    Get Matches    ${resp}    regexp=^.*[0-9a-z_].${type}[0-9]*$
+    : FOR   ${element}      IN      @{list}
+    \       Append To List   ${l}   ${SYSTEM_INFO['${element}']['present']}
 
-	${l} =    	Create List  	[]
-	${list} = 	Get Inventory Fru Type List 	${OPENBMC_MODEL} 	${type}
-	: FOR 	${element} 	IN  	@{list}
-	\ 	Append To List 	 ${l}  	${SYSTEM_INFO['${element}']['present']}
-
-	${sum} = 	Get Count 	${l} 	True
-	[return] 	${sum}
+    ${sum} =        Get Count       ${l}    True
+    [return]        ${sum}
 
 Verify Properties
-	[arguments] 	${type}
+    [arguments]     ${type}
 
-	${list} = 	Get VPD Inventory List 	${OPENBMC_MODEL} 	${type}
-	: FOR 	${element} 	IN  	@{list}
-	\ 	${d} = 	Get From Dictionary 	${SYSTEM_INFO} 	${element}
-	\ 	Run Keyword If 	${d['present']} == True		Verify Present Properties 	${d} 	${type}
+    ${list} =     Get VPD Inventory List     ${OPENBMC_MODEL}     ${type}
+    : FOR     ${element}     IN      @{list}
+    \     ${d} =     Get From Dictionary     ${SYSTEM_INFO}     ${element}
+    \     Run Keyword If     ${d['present']} == True        Verify Present Properties     ${d}     ${type}
 
 Verify Present Properties
-	[arguments]	 ${d} 	${type}
-	${keys} = 	Get Dictionary Keys 	${d}
-	Log List 	${keys}
-	Log List 	${INVENTORY_ITEMS['${type}']}
-	Lists Should Be Equal  ${INVENTORY_ITEMS['${type}']} 	${keys}
+    [arguments]     ${d}     ${type}
+    ${keys} =     Get Dictionary Keys     ${d}
+    Log List     ${keys}
+    Log List     ${INVENTORY_ITEMS['${type}']}
+    Lists Should Be Equal  ${INVENTORY_ITEMS['${type}']}     ${keys}