Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Create Configlet

To learn how you can access a dictionary of variables (device model) that you can use when you create configlets, see the Device Configuration Lifecycle.

  1. From the left navigation menu, navigate to Design > Configlets and click Create Configlet.
  2. If you've created a JSON payload, click Import Configlet and select the file to import it. Otherwise, continue to the next step.
  3. Enter a unique configlet name.
  4. Select a NOS type (config style). (Cumulus is no longer supported as of Apstra 4.1.0.)
  5. Select the section where you want to render the configlet. Available choices depend on the selected config style. (OSPF for external routers is no longer supported. While OSPF configlets still appear in the Apstra GUI, they should not be used.)
  6. In the Template Text and Negation Template Text fields (as applicable), enter CLI commands. For Interface-Level Set or Delete configlets, do not include set or delete in the text. See Configlet examples in the Reference section. Avoid using shortened versions of commands. Jinja syntax is highlighted with color coding to improve readability, especially for complex configlets with multiple property set variables or when Jinja control structures (such as loops and conditionals) are used. Jinja syntax is validated. If Jinja syntax is incorrect, a validation error is raised.
    CAUTION:

    Using a raw text editor (OSX TextEdit, Windows Notepad++) is critical. Hidden characters can cause unforeseen issues when the configlet is deployed.

    Note:

    Instead of hard-coding data into a configlet, you can refer to a property set (key-value pairs). For an example, see the Arista NTP example in the References section.

  7. If Negation Template Text is required, enter the CLI commands to remove the configuration.
  8. For File configlets, enter the filename in the Filename field.
  9. To add another generator, click Add a style and enter details. (Tip: Configlets can contain syntax for multiple vendors. Create one single-purpose configlet with a generator for each vendor NOS type to include its own syntax.)
  10. Click Create to add the configlet to the global catalog.

When you’re ready to use the configlet in a blueprint, import it into the blueprint's catalog.