def inventory(self, all=False, ssid=None):
if all or self.api_key is None:<EOL><INDENT>if ssid is not None:<EOL><INDENT>return self._ssid_inventory(self.full_inventory, ssid)<EOL><DEDENT>else:<EOL><INDENT>return self.full_inventory<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if ssid is not None:<EOL><INDENT>return self._ssid_inventory(self.self_inventory, ssid)<EOL><DEDENT>else:<EOL><INDENT>return self.self_inventory<EOL><DEDENT><DEDENT>
Returns a node inventory. If an API key is specified, only the nodes
 provisioned by this key will be returned.

:return: { inventory }