Create Configlet (Design)
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.
- From the left navigation menu, navigate to Design > Configlets and click Create Configlet.
- If you've created a JSON payload, click Import Configlet and select the file to import it. Otherwise, continue to the next step.
- Enter a unique configlet name.
- Select a NOS type (config style).
- 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.)
-
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
ordelete
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.
- If Negation Template Text is required, enter the CLI commands to remove the configuration.
- For File configlets, enter the filename in the Filename field.
- 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.)
- 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.