Export Template Rules And Parts

Version 2
    Share:|

    This script will let you export the rules and parts of a template (separately) so you can see the particular rule conditions in a csv file, or view the list of parts and what operations they are associated with.

     

    Usage: usage -d <level> -P <blProfile> -R <blRole> -m <scriptMode> -g <group> [-t <template>]

    -d <debug level>  Debug Log output, level 0-5.  Should be first option (int)

    -R <blRole>          BladeLogic RBAC Role to authenticate as

    -P <blProfile>     BladeLogic Authentication profile to authenticate as

    -g  <group>    Template group where your template(s) exist

    -t  <templateName>  Name of the template to process, otherwise will look for all templates in the group

    -m  <scriptMode>  parts or rules - dumps parts and what they are used in or the rules in the template

     

    To export all the rules in a template run this:
    nsh exportTemplateRules.nsh -P defaultProfile -R BLAdmins -m rules -g "/DISA Compliance Content/DISA STIG" -t "DISA - Linux STIG"
    To export all the part information in a template run this:
    nsh exportTemplateRules.nsh -P defaultProfile -R BLAdmins -m parts -g "/DISA Compliance Content/DISA STIG" -t "DISA - Linux STIG"
    To export all the rule information for all templates in a group:
    nsh exportTemplateRules.nsh -P defaultProfile -R BLAdmins -m rules -g "/DISA Compliance Content/DISA STIG"