@@ -231,7 +231,7 @@ def get(self,sc,op,rft, cmdTop=False, prop=None):
231231 collUrl = r .url
232232
233233 # search collection to find path to system
234- sysPath ,rc ,r ,j ,d = rft .getPathBy (rft , r , d )
234+ sysPath ,rc ,r ,j ,d = rft .getPathBy (rft , r , d , prop )
235235 if ( rc != 0 ): #if a path was not found, its an error
236236 return (rc ,r ,j ,d )
237237
@@ -422,12 +422,12 @@ def setIndicatorLed(self, sc, op, rft, cmdTop=False, prop=None):
422422
423423 def getPower (self ,sc ,op , rft , cmdTop = False , prop = None ):
424424 rft .printVerbose (4 ,"{}:{}: in operation" .format (rft .subcommand ,sc .operation ))
425+ resName = "Power"
425426
426427 # get the Chassis resource first
427- rc ,r ,j ,d = op .get (sc ,op , rft )
428+ rc ,r ,j ,d = op .get (sc , op , rft , cmdTop , resName )
428429 if ( rc != 0 ): return (rc ,r ,False ,None )
429430
430- resName = "Power"
431431 # get the link to the Power resource under Chassis
432432 if ((resName in d ) and ("@odata.id" in d [resName ])):
433433 resLink = d [resName ]["@odata.id" ]
@@ -447,12 +447,11 @@ def getPower(self,sc,op, rft, cmdTop=False, prop=None):
447447
448448 def getThermal (self ,sc ,op ,rft ,cmdTop = False , prop = None ):
449449 rft .printVerbose (4 ,"{}:{}: in operation" .format (rft .subcommand ,sc .operation ))
450-
450+ resName = "Thermal"
451451 # get the Chassis resource first
452- rc ,r ,j ,d = op .get (sc ,op , rft )
452+ rc ,r ,j ,d = op .get (sc , op , rft , cmdTop , resName )
453453 if ( rc != 0 ): return (rc ,r ,False ,None )
454454
455- resName = "Thermal"
456455 # get the link to the Thermal resource under Chassis
457456 if ((resName in d ) and ("@odata.id" in d [resName ])):
458457 resLink = d [resName ]["@odata.id" ]
0 commit comments