When you first create a Resilient Python package containing your function,
use resilient-circuits codegen as follows:
$ resilient-circuits codegen --p <package_name> --function <function_name>In Resilient V31 and greater, resilient-circuits codegen --reload
capability is available to allow easier re-creation of an existing
package.
To re-create an existing package "as is" with no new components, create
a new export file from within the Resilient UI. If the export file is
in the Downloads directory, simply enter the command:
$ resilient codegen --reload <package_name>To re-create an existing package and add new components to it, use the
codegen --reload command and add your new components to the command
line without specifying the components you added the last time you
created the package. The following example reloads your package with
all previous components and adds a new rule:
$ resilient codegen --reload <package_name> --rule "Cisco Add Domain"The resilient-circuits codegen --reload command saves the existing customize.py as
customize-yyymmdd-hhmmss.bak in the util directory of the package.
NOTE: The --exportfile parameter is needed only if the most recently created
export file (.res) in Downloads is not the intended file or the export
file you want is in a different location.
NOTE: You cannot reload a package generated with a version of
Resilient Circuits prior to V31. If you wish to use reload, you need
to rename your customize.py then generate a new package using
Resilient Circuits V31. You can then use reload for the new package.
NOTE: To determine if your package has reload capability look at top of the
package's customize.py file located in the package/util directory. If
the customize.py file contains the following function:
def codegen_reload_data():
then --reload is supported. The codegen_reload_data function contains
a list of all components included in the package.
------------------------------
AnnMarie Norcross
------------------------------