Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Freeform Resources

Understanding Resources in Apstra

Resources are objects/items in Freeform that can be assigned as part of your network design. They can be anything from IP addresses to a simple integer. Resources can be either statically defined or allocated from a pool of resources. You might think of a resource like an object in an IP Address Management (IPAM) system, or a Dynamic Host Configuration Protocol (DHCP) scope. In such cases, you define the scope, and objects are created dynamically within that scope such that a single object is only used once and then returned to the object pool for re-use. The same concepts apply to Generated Resources in Apstra Freeform.

Types of Resource Objects

There are several types of resource objects in Freeform:

  • Allocation Groups: Define the type of resource and the pool from which you allocate resources. Resource generators use these groups to create resources.
  • Pools: Defined containers of resources that you can allocate. These pools have a specific type associated with them, such as IP address or ASN.
  • Local Pools: Objects that are pools but are assigned to a node (system). The pools can only be of type VLAN.
  • Local Pool Generator: A resource that is generated dynamically from a graph scope but is assigned as a resource to a system. The pools can only be of type VLAN.
  • Resource: A single instantiation of an object you want to create and use in your design. An example of a resource would be a single IPv4 address, such as 192.168.1.24.
  • Resource Generator: An automation object consisting of parameters including a graph scope, and a type (IPv4 address, IPv6 address, Integer, ASN). This object generates resources for use in your design. Resource Generators live in Resource Groups.
  • Resource Groups: An object that contains resources and resource generators. Resource groups can be used to organize your environment as it becomes increasingly complex. At least one group must be allocated. Note that there is a default group called Root, but that group is unusable for resource objects other than Groups.
  • Group Generators: An object that creates resource groups dynamically based on a defined scope. The group generator scope is set based on a graph query. This query creates dynamic groups based on the query response. Every element created under this group inherits this scope.

The Importance of Scope, and the Graph

Resource Generators and Group Generators are both based on a scope. A scope is a query to the graph database that returns a set of objects. The generator then generates a resource based on the objects that are returned. It’s important to understand that scopes can use filtering mechanisms - such as identifying tags and the type of object (link or system) - to generate resources based on the scope.

Example Graph Queries

  • All of the internal systems node ('system', system_type='internal', name='target')
  • All of the links to external systems node ('link', role='external', name='target')
  • Internal links marked with tag of "fabric" node ('link', role='internal', tag='fabric', name='target')

Groups

Apstra uses Groups like folders in order to group together resources and resource generators. A default "Root" is automatically created. This group is the Group that houses all other groups. You must first create a Root group in order to generate resources for other groups. Create a Root group if necessary, create a new group housed within the Root group, and generate the necessary resources.

Group Generators

Group generators generate groups dynamically in order to assist with the management of resources. These dynamically-created groups are created based on a graph query scope, as shown previously with the resource generators node ('link', role='internal', name='target'). The upcoming example walks through managing the resources for each system in your network, including a Loopback IP address and an ASN number for BGP peering. We use a scope graph query to select all the systems and create a group for each system. This ensures that the Loopback IP and ASN for the specified system are housed within that system’s group.