How do I add or change a View file?

Purpose

Use this procedure to add or update a viewConfig file.

The ArtifactAdmin label is used to indicate that an intent type has been installed using Artifacts. For these intent types, if you want to make changes to views, Nokia recommends creating a new view instead of modifying views. This will allow you to export the views you create and save them to be added into any future versions of the intent type created.

ViewConfig Builder

The ViewConfig Builder form provides a UI for configuring a viewConfig file. You can customize how each attribute in the intent type YANG appears for users when they create intents, for example, updating the title of an attribute, how it is represented visually, and whether helper text or default values are presented. You can also update the behavior, such as setting the attribute to read only.

Attributes can also be hidden or deleted from the intent creation form:

  • hidden: the attribute is invisible in the intent creation form but is included in the payload when the form is submitted.

    For example, if you want to set a read-only value for an attribute that is different from the YANG file value, you can set a default value and hide the attribute. The updated value is submitted along with the form when an intent is created but is not shown to the user creating the intent.

  • deleted: the attribute is invisible in the intent creation form and is not included in the payload.

    For example, you can delete a value if you want to always use the YANG default value.

Steps
 

From Network Intents, Intent Types, double click on an intent type. From the page that displays, click MANAGE VIEWS.

The Manage Views form opens.


To add a View file:

  1. In the Manage Views form, click Views png5.png.

  2. In the Add View form that opens, enter the name of the view and click ADD.

    A name.viewConfig file is created in the list at the left of the page. A name.schemaForm file is automatically created.

  3. Click on the viewConfig file in the list and click SAVE SELECTED FILE.

  4. If the intent type includes an RPC action, repeat this step to add a View file called rpc_schema.viewConfig to provide user interface information for the RPC action.

    See the Network Intents tutorial on the Network Developer Portal for more information if needed.

Proceed to Step 3 to customize the viewConfig file.


Open the ViewConfig Builder form:

In the Manage Views form, select a viewConfig file and click png1.png (Table row actions), Build ViewConfig.

The ViewConfig Builder form opens, displaying the attributes in the viewConfig file. Figure 4-2, Example ViewConfig Builder form shows an example.

Figure 4-2: Example ViewConfig Builder form

To hide or delete one or more attributes:

  1. To hide or delete a single attribute, select the attribute and click png1.png (Table row actions), Hide or Delete.

  2. To hide or delete multiple attributes, click the check boxes to select two or more attributes. At the top of the attributes panel, click png1.png, Hide or Delete.


To show or undelete one or more attributes:

  1. Select a single attribute and click png1.png (Table row actions), Hide or Delete.

  2. Click the check boxes to select two or more attributes. At the top of the attributes panel, click png1.png, Show or Undelete.


To make other adjustments to an attribute: .

  1. Select the attribute and click png1.png (Table row actions), Adjust attribute.

  2. In the form that opens, configure the attribute parameters.

  3. Click CLOSE.

Figure 4-3, Example Adjust Attribute form shows an example.

Figure 4-3: Example Adjust Attribute form

To save your changes to the viewConfig file, click SAVE VIEWCONFIG. A confirmation dialog appears if changes to the viewConfig file may impact another NSP function. Click SAVE to confirm.


Click CLOSE to return to the Manage Views form.


To attach a viewConfig file as a child of another:

  1. Select a viewConfig file and click png1.png (Table row actions), Attach to parent.

  2. In the form that opens, click in the Parent ViewConfig field and select a viewConfig file as the parent.

  3. Click ADD.

The child viewConfig and its schema form appear as a child in the list, below the parent viewConfig file.

Click png9.png to display the Change log. The change log shows the attributes that have been augmented and indicates which viewConfig implements the change.


10 

To detach a child viewConfig file from its parent, select the child viewConfig file and click png1.png (Table row actions), Detach from parent.


11 

Click CLOSE.

End of steps