User Tools

Site Tools


Sidebar

NetYCE Documentation



guides:reference:templates:porttemplate

Port templates

Port templates are used to configure ports. A port type must be entered and port templates can only be assigned to ports to which the hardware type is a match. (i.e. A FastEthernet port can only be assigned a FastEthernet port template)

In addition to the hardware ports (including the Loopback interface), port templates are also used to configure VLANs and VRFs. These are created as port templates, but they can only be assigned to either a VLAN or a VRF.

Port

Port templates are hardware ports. These templates can be used to configure a hardware port.

Directives

Port-templates can fully use any Relation to retrieve (lists of) variables. However, some Relationships become port-specific by referencing <port_name>, <port_type> or any of the port-specific variables in the SQL of the Relationship. In these cases it is absolutely necessary to force the YCE configuration generator to re-query the Relationship for every port. Failing to do so causes the last results to be reused.

This behaviour is subject to YCE template directives, of which the #reload is the most used. YCE directives must be the first word of the line and there may no whitespace between the hash (#) and the directive itself. Most directives require one or more arguments.

The #reload directive forces a Relation to be re-queried. Any previous results form the Relation are deleted. The #reload directive must be present BEFORE retrieving the variables of that relationship in the (port-)template.
The #reload directive attempts to load all arguments as Relations:

#reload port_connections vlans_attached

is equivalent to

#reload port_connections
#reload vlans_attached

The #load directive is similar to the #reload but does not delete the previous results.

The #use directive also queries a Relationship but immediately makes it the current context. The relation name can be omitted for the duration of the #use. It takes only one Relation as argument.

Hardware types

Hardware types cannot be defined by the user, but are part of the netYCE programming. Missing hardware types can be requested through a support request.

VRF

VRF templates can be assigned to VRFs. This can be done through a service task or with the VRF subform in the Node details form.

VLAN

VLAN port templates can be used to configure VLAN interface just like physical interfaces on a network device, as mentioned before VLAN port templates can only be assigned to a VLAN.

guides/reference/templates/porttemplate.txt · Last modified: 2019/12/23 14:30 (external edit)