9.0.0 8.3.0 8.2.0-8.2.1 8.1.0-8.1.1 8.0.0-8.0.3 7.4.0-7.4.6 7.3.0-7.3.2 7.2.0-7.2.1 7.1.0-7.1.2 7.0.0-7.0.2 6.1.0-6.1.2 View All PV Cloud PV Local Installs
Auto Light Dark
Auto Light Dark
9.0.0 8.3.0 8.2.0-8.2.1 8.1.0-8.1.1 8.0.0-8.0.3 7.4.0-7.4.6 7.3.0-7.3.2 7.2.0-7.2.1 7.1.0-7.1.2 7.0.0-7.0.2 6.1.0-6.1.2 View All PV Cloud PV Local Installs

Constraints

8.0.0 Constraints Tab.jpg

The Constraints system allows Admin users to configure custom field validation and limitations into IPAM fields. Many constraint types are available, such as mathematical comparison operators, length, enumeration, pre-set lists, RegEx, IPv4/IPv6, Phone, email, hostname, FQDN, Mac Address, and URL. 

The Constraints Tab has one sub-tab - Configuration - where new constraints may be created and managed. 

Currently, Constraints is available only for IPAM related actions, while we gather feedback and use cases to inform possible future updates. If you are interested in providing feedback, a use case, or requests for future additions to the Constraints system, please contact feedback@6connect.com.

Constraints Tab - Overview

The Constraints Tab, available to Admin users, allows for custom field validation and field restrictions to be applied to IPAM fields. The applied constraint may be anything from a numerical comparison operation,  a check against a pre-determined text string, ensuring selections from a pre-set list, or forcing entries into a specific format, such as IPv4/IPv6, phone number, or RegEx.

These constraints can be applied to the following IPAM fields:

  • ASN

  • Custom Generic Field

  • Notes

  • Metadata 1-10, if enabled for the instance

Depending on the type of constraint applied, the constraint may be a simple single-value comparison needing only one constraint to be created, such as "Equals to" or "Length Max". Some other constraint types, however, may have two or more levels deep of constraint types and value checks. One example of this is "Enumeration", which requires the user to first set up an "Enumeration" constraint, and then a second level list of sub-constraint types or a list of values. For a detailed constraint tree, it may be worth 

Available Constraint Types

The following constraint types are currently available:

Type

Description

Enumeration

Create a list of child enum items. Note: Set binding / control type for parent constraint (enumeration) only, do not provide for child items.

Children type: Valid child enum types are: =, !=, ﹥, ﹤, ﹥=, ﹤=, regex, allow, oneof, allof, ip, ipv4, ipv6, email, url, hostname, fqdn, mac, phone, lenmax, lenmin, section_entry

Section Entry

Creates an enumeration based on all entries that belong to a given section.

Resource Type

Creates an enumeration based on a Resource type.

IPAM Region

Creates an enumeration based on all IPAM Regions.

IPAM Tags

Creates an enumeration based on all IPAM Tags.

Equals to

Checks to ensure a value is exactly equal to a provided value, e.g. (X == Y) is true

Not Equal to

Checks to ensure a value is not equal to a provided value, e.g. (X != Y) is true

Greater Than

Checks if the input value (left operand) is greater than a given value (right operand). e.g. (X ﹥ Y) is true

Less Than

Checks if the input value (left operand) is less than a given value (right operand). e.g. (X ﹤ Y) is true

Greater Than or Equal to

Checks if the input value (left operand) is greater than or equals to a given value (right operand). e.g. (X ﹥= Y) is true

Less Than or Equal to

Checks if the input value (left operand) is less than or equals to a given value (right operand). e.g. (X ﹤= Y) is true

One of

Create a list of child constraint items. It will be true if one of child constraints is true. Its children must be previously configured.

Note: Set binding / control type for parent constraint (enumeration) only, do not provide for child items.

All of

Create a list of child constraint items. It will be true if all of the child constraints are true. Its children must be previously configured.

Note: Set binding / control type for parent constraint (enumeration) only, do not provide for child items.

Length Max

Checks to ensure a string has, at most, the specified number of characters

Length Min

Checks to ensure a string has, at minimum, the specified number of characters

Regular Expression

Compares the input format to a provided Regular Expression

IPv4

Sets the required format for the input to an IPv4 address

IPv6

Sets the required format for the input to an IPv6 address

Email

Sets the required format for the input to an email address (uses an "@" symbol)

Hostname

Sets the required format for the input to a hostname. Hostnames may not have underscore or dash characters.

FQDN

Sets the required format for the input to a FQDN

MAC Address

Sets the required format for the input to a MAC address

URL

Sets the required format for the input to a url

Phone Number

Sets the required format for the input to a phone number

Add a Constraint

To add a new Constraint, click "Add Constraint" at the top right of the page.

8.0.0 Constraints add constraint.jpg

In the "Add Constraint" screen, select (at minimum, depending on the selected constraint type):

  • The constraint type (here, "Length Min")

  • The name for the constraint

  • The attribute (IPAM Field) on which to apply the constraint

  • Constraint specific comparison values, here as "Length"

  • Select whether to allow empty values in the attribute field

If desired, you may enter a custom error message, customize the UI binding (although it it automatically filled in if you select a standard IPAM Attribute), or add an event hook setting. 

8.0.0 Constraints new constraint.jpg

When done, click "Add Constraint" to save. 

Test Constraint

To test a Constraint, click "Test".

8.0.0 Constraints registered constraints test.jpg

The test constraint form will appear - enter a test value, and you can check whether the constraint returns an appropriate invalid or valid response:

Invalid result, for "Length Min 3":

7.4.0 Constraint Test invalid.png

Valid result, for "Length Min 3":

7.4.0 Constraint Test Valid.png

Edit Constraint

To edit a Constraint, click "Edit". The constraint details will open, matching the "Add Constraint" form.

8.0.0 Constraints registered constraints edit.jpg

Adjust values or settings as desired, and then click "Update Constraint".

Delete Constraint

To delete a Constraint, click "Delete".

8.0.0 Constraints registered constraints delete.jpg

A Confirmation box will appear - confirm whether to delete the constraint, or click "Close" to exit without deletion.

7.4.0 Constraints Delete.png

You may also select more than one constraint to delete.

To do so, select the checkboxes for the desired constraints, then under the "Actions" menu at the top of the list, select "Delete All". 

8.0.0 Admin Constraints Multi Delete.png

Working with Constraints in IPAM Manage

When a field is viewed in IPAM Manage that has a constraint applied, a "check" icon will display next to the field input for simple input constraint checks, if empty values are allowed.

If the constraint is of a type that has been set up with a dropdown box, then the dropdown box and placeholder text will be applied:

7.4.0 Constraints IPAM Fields.png

In this example, constraint validation checks have been applied to Metadata4, Metadata7, and Metadata8, with a dropdown "One Of" constraint applied to Metadata 10. 

Metadata8 has been associated with our previous constraint example, "Length Min 3", so if we enter less than three characters into that field, we should get an error, and see the "X" for the input not meeting the constraint settings:

7.4.0 Constraint input fail.png

On the other hand, a valid input will return to displaying the "valid" success checkmark:

7.4.0 Constraint Input success.png

Constraint Permissions

Admins can limit which users are bound by certain constraints by clicking "Settings" at upper right.

8.1.0 Constraints Header Settings.jpg

From there, select "Enable user group permissions" to limit constraint visibility by User Permission Group.

8.1.0 Constraints Global Settings Enable.jpg

Once permissions are enabled a new option will appear when adding and editing a constraint, "Change Binding Permissions".

8.1.0 Constraints Change Perms.jpg

Selecting "Change Binding Permissions" opens the "Change Permissions" dialog box where you can select a group(s) to assign the constraint to. The groups assigned to a constraint are listed below the group selector.

8.1.0 Constraints Perms Assign.jpg

To remove a group, just click the "remove" button next to the group name.

8.1.0 Constraints Perms Remove.jpg

For more information on working with Permission Groups see Permission Groups and (8.1.0-8.1.1) Working with Groups.

Enabling user group permissions applies to all constraints, including those already existing. If no group is assigned to a constraint, it will not be visible in IPAM Manage to any users.

Example: Adding an Enumeration / Constraint Containing Children

This example shows how to add a two-level constraint,  such as Enumeration, All of, or One of - all of which are set up having a "parent" constraint at the top level list, and "child" items or constraints on a sub-level. Here, we will be using Enumeration as the example constraint, although All of and One of may be created similarly - just using the "add constraint" button to create children instead of the "add item" button. 

Create the Parent Constraint

From the Constraints "Configuration" page, click "Add Constraint".

8.0.0 Constraints add constraint.jpg

Select "Enumeration" for the constraint type, and enter a name, attribute binding, and select the Control type - here, we will be using a dropdown control. 

For Parent/Child constraint types, you only need to enter the attribute binding and control type for the parent constraint, and do not need to enter these settings for the child items - those settings are inherited by the child items you will create later.

All other fields are optional, and may be skipped if desired. 

8.0.0 Parent Constraint.jpg

When done, Click "Add Constraint". You will see the new constraint added to the Constraints List.

Open the Parent Constraint

Constraints that have parent/child relations show as a blue link in the constraint list. Click on the constraint name to open the parent constraint to view or add child settings. 

8.0.0 Constraints enum constraint.jpg

Add Child Items

Once you have opened the parent constraint, here: Enumeration, you can add the child values that you wish to have listed as valid options. 

For Enumeration, click "Add New Item", If using All of or One of types, then you will need to click "Add Constraint" to add child constraint items. 

For Parent/Child constraint types such as "All of" and "One of", you only need to enter the attribute binding and control type for the parent constraint, and do not need to enter these settings for the child items.

8.0.0 Enumeration Constaint add item.jpg

Add a new child enum item by entering a title, name/value, and the type. Typically, the type will be "=", for "equals this value".

8.0.0 Enum Constraint add enum item.jpg

When done, click "Add Item", and repeat for any additional values that you wish to make available in your enumeration dropdown. 

Here, we have added additional enum items to cover "val1" through "val 5". 

8.0.0 Enum Constraint values.jpg

From here, navigate back up to the parent constraint list that displays "enum1", and click "Test" (test will not work on individual child constraint items)

8.0.0 Constraints enum constraint test.jpg

A display dropdown box will appear, click inside of it to confirm your child items show as selectable options.

7.4.1 Constraints Enum Parent Test.png

Using the Enumeration

To see the constraint in action in IPAM Manage, navigate to a block and open Edit Block mode. Select the field that you applied the "enum1" element binding to (metadata 8, here), to view/select constraint items from the dropdown

7.4.1 Constraints IPAM Select Enum Value.png