StyleBook Groups

Mar 15, 2018

StyleBooks in NetScaler MAS can be grouped in two ways. They are grouped as either default StyleBooks or Custom StyleBooks. Or, they are also grouped as public or private StyleBooks. From the NetScaler MAS, you can view all the StyleBooks that are present in the system. NetScaler MAS also allows you to sort and view the StyleBooks. You can also view a graphical display of how StyleBooks are connected with each other.

This document also tells you how to download and delete custom StyleBooks. You can download a custom StyleBook to make modifications or to create a new StyleBook based on the earlier one. You can also delete a custom StyleBook.

Default and Custom StyleBooks

  • Default StyleBooks are the StyleBooks shipped with NetScaler MAS and they allow you to create configurations you can deploy on your NetScaler instances.

  • Custom StyleBooks are your own StyleBooks that you can write and import to NetScaler MAS, and create configurations you can deploy on your NetScaler instances.

Both default and custom StyleBooks can be either public or private.

Public and Private StyleBooks

StyleBooks from which you can create configurations using NetScaler MAS GUI are categorized as public StyleBooks. That is, they are all available for your direct usage to create configurations from the GUI.

But, some StyleBooks are used as building blocks for other StyleBooks. Some StyleBooks can only be used from the API (not from the GUI) to create configurations. Such StyleBooks are called private StyleBooks. Though they might not directly be used to create configuration packs on the instances, you might want to display these StyleBooks on the NetScaler MAS. To mark a StyleBook as private, you will need to set the private attribute in the StyleBook definition as shown below.

name: basic-lb-config
description: This StyleBook defines a simple load balancing configuration and is a building block to build other load balancing configurations.
display-name: Load Balancing Configuration
namespace: com.example.stylebooks
private: true
schema-version: "1.0"
version: "0.1"

Viewing StyleBooks

The number of StyleBooks - both default and private are increasing in NetScaler MAS. You might want to search for the particular StyleBook that you want to access. You might also want to view both types of StyleBooks separately.

In NetScaler MAS when you navigate to Applications > StyleBooks, you can view a list of StyleBooks that are present in the system.

A default public StyleBook has the following icon on its panel:

localized image

Whereas, a default private StyleBook has an icon that declares it as a private StyleBook:

localized image

While you can view the definition and dependencies of a private StyleBook, you cannot create a config pack from a private StyleBook from the GUI. You can still use a private StyleBook as a dependent StyleBook in your own public/private StyleBooks, or you can use it from the API.

A custom-built StyleBook has a different icon as shown in the following image:

localized image

At the top right-side of the page, you can see an option to sort the StyleBooks. There are three options - all, public, or private StyleBooks. Click one of the options.

localized image

You can also search for a particular StyleBook by clicking the search icon. The three search options available are name, namespace, and version. The search operation is not case-sensitive and matches any sub-string in that field.

localized image

Viewing StyleBook Dependencies

NetScaler MAS allows you to view a graphical display of how StyleBooks are connected with each other.

An important and powerful feature of StyleBooks is that they can be used as building blocks for other StyleBooks. You can import a StyleBook into another StyleBook. An imported Stylebook is declared as a type and is used by components or parameters of the second StyleBook.

For example, you can use the basic-lb-config StyleBook that you built in the previous section, to build another StyleBook called composite-example. To use the “basic-lb-config” StyleBook, you have to import it in the new StyleBook in the import-stylebooks section. By looking at the graph, it is possible to see the relationships among multiple StyleBooks.

A StyleBook used by other StyleBooks cannot be removed from MAS. However, a graphical display of StyleBooks allows you to know which StyleBooks are preventing the removal of a StyleBook by looking at its “reverse dependencies”.

View StyleBook dependencies

In NetScaler MAS, navigate to Applications > StyleBooks. The StyleBooks page displays all the StyleBooks available for your use in NetScaler MAS. Scroll down and find your StyleBook. The StyleBook panel displays links to create a configuration, to view the StyleBook definition, and to view the StyleBook dependencies. Click View Dependencies.

Forward Dependencies

The Forward Dependencies display allows you to view the different StyleBooks that your StyleBook is using. Follow the arrows to find the StyleBook that a StyleBook is using. When you pause your pointer on one of the arrows, the arrow and the StyleBooks that are connected to one another are highlighted. You can also click the StyleBook names to view the definition of that StyleBook.

localized image

Reverse Dependencies

The Reverse Dependencies display allows you to view graphically the StyleBooks that are using your selected StyleBook. If you follow the arrows, you can see that all StyleBooks in the display point towards your StyleBook. Some StyleBooks might be directly using your StyleBook and some StyleBooks might be using the StyleBook indirectly through another StyleBook.

localized image

Download custom StyleBooks

To download custom Stylebooks from NetScaler MAS, navigate to Applications > StyleBooks > Configurations. In the list of StyleBooks that are displayed on the right-side panel, the custom-defined StyleBooks have an option to download them. Click Download. If the StyleBook has dependent custom StyleBooks, even those StyleBooks are downloaded to your system.

Note:

  • You cannot download default or custom StyleBooks that are marked as either public or private.

  • If you want to modify an existing StyleBook in NetScaler MAS, first download it locally, and remove the StyleBook from NetScaler MAS. Make your changes in your editor and then import the new StyleBook into NetScaler MAS.

localized image

Note

You cannot download NetScaler MAS default StyleBooks. You can, however, view their definitions and dependencies by clicking View Definition and View Dependencies links on the StyleBook panel.

Delete custom StyleBooks

You can also delete custom StyleBooks by selecting the Delete link of the StyleBook.

localized image

A pop-up window prompts you to confirm if you want to remove the StyleBook from NetScaler MAS.

localized image

Note: You cannot delete a custom StyleBook that has other StyleBooks in MAS that depend on it.