def getInstanceId(self, troveName, versionId, flavorId,
                      timeStamps, isPresent = True):
        theId = self.instances.get((troveName, versionId, flavorId),
                                   None)
        if theId is None:
            theId = self.instances.addId(troveName, versionId, flavorId,
                                         timeStamps, isPresent = isPresent)

        return theId