def add_available_action(self, name, metadata, cls):
if metadata is None:<EOL><INDENT>metadata = {}<EOL><DEDENT>self.available_actions[name] = {<EOL>'<STR_LIT>': metadata,<EOL>'<STR_LIT:class>': cls,<EOL>}<EOL>self.actions[name] = []<EOL>
Add an available action.

name -- name of the action
metadata -- action metadata, i.e. type, description, etc., as a dict
cls -- class to instantiate for this action