Integrating configuration grammars into BMC Server Automation

This topic provides instructions for setting up a grammar file and integrating it into BMC Server Automation by loading the grammar file onto the file server. In a multi-Application Server environment, all Application Servers can access a grammar file that is stored on the file server.

Warning

  • Always perform this procedure in a development environment where an Application Server crash can occur without serious consequences. Test grammar files thoroughly after adding them to the database but before you certify them and make them available for use.
  • BMC does not recommend editing an existing grammar. If you must edit an existing grammar, you will need to recreate any BLPackages that use the grammar, to ensure that the BLPackages continue to work and all changes are applied. In addition, after editing the grammar file in the <installDirectory>/scripts directory, restart the BMC Server Application Server for the changes to take effect.

To integrate configuration grammars into BMC Server Automation

  1. Write the grammar.
  2. Place the grammar file in the <installDirectory>/scripts directory.
  3. Using the BLCLI, load the grammar file onto the file server by performing the following actions.
    1. From the Network Shell prompt on the Application Server, use the blcred utility to obtain a session credential.

      See Using the blcred utility.
    2. Run the following command to load the grammar file. The grammar file is loaded in the <fileserverPath>\grammar directory.

      blcli -v <profile> ConfigFileGrammar
         createConfigFileGrammarOnFileServer "<LocalGrammarFileDir>"
         "<LocalGrammarFileName>" "<GrammarName>"
         "<DisplayName>" "<Description>"
      

      The variables in the command are defined as follows:

      • <LocalGrammarFileDir> is the directory containing the grammar files.
      • <LocalGrammarFileName> is the name of the grammar file.
      • <GrammarName> is a unique name that is used internally to recognize the grammar file.
      • <DisplayName> is the name for this grammar that appears in the Configuration Object Dictionary's Name column.
      • <Description> is a short description of the grammar. This description appears in the Configuration Object Dictionary's Grammar column.
  4. Test the new grammar to ensure that it works as expected.

    First try to browse the contents of a configuration file that results from the new grammar. If browsing functions properly, try taking snapshots, auditing, deploying the file, and rolling back a deployment.
Was this page helpful? Yes No Submitting... Thank you

Comments