5.1 Customizing VPC Functionality (vpcs.xml) |
![]() |
The vpcs.xml file is a Viewpoint configuration file that specifies what the GUI looks like and how Viewpoint interacts with Moab in relation to VPCs. The vpcs.xml file requires a root XML element named <vpcs
>. The <vpcs
> element contains the following child elements:
The <properties> element consists of three child elements:
disk-model
>fiscal-year-end
>bare-metal-variable
>For more information on the <disk-model
> and the <fiscal-year-end
> elements, see Configuring the Properties Element. For more information on the <bare-metal-variable
> element, see Accessing Bare Metal Machines with Viewpoint.
The <provision> element contains the information necessary to create, or provision, a new VPC. Through the <provision
> element, you can customize the user interface and its associated functionality. Specific examples of configurable actions via the <provision
> element include following:
The <modify> element contains all information necessary to modify a VPC and the reservations that exist on them. This element also establishes the rules for modifying configurable attributes of a VPC.
The <archive> element contains all information necessary to archive reservations and the configuration settings and data stored on them. Archives can be used for backup purposes, or they can be used as a sort of template for future workloads. For example, an archived reservation that has a fresh install of MATLAB can be used for different workloads.
The <vpc-management
> element allows you to customize the table on the the VPC Management page. You can modify the allowable action buttons, the table display, and the details panel for an item in the table in this element.
The process to add a reservation to a VPC is very similar to the process of creating a VPC. Users select the resources they wish to add, Viewpoint verifies these resources are available, and the resources are reserved until the 'add reservation' action is funded.
To specify the details about this process, you can modify the <add-vm
> element. The children of this element are very similar to those of the <provision> element. The child elements of <add-vm
> are:
requirement
> element is assumed to be of type "single" because there is no queue and only one new reservation is added.action
> element defines what Viewpoint should do to add a reservation to an existing VPC.The default configuration that ships with Viewpoint allows users to change the VPC end date to any date after the current date and after the VPC's start date. Administrators can modify the Modify VPC Duration window using the <modify-duration
> XML element found in vpcs.xml. This element has 2 child elements:
fiscal-year-end
> to New Components FrameworkIn the XML configuration file (Viewpoint 2.0 and earlier), there was the optional element <fiscal-year-end
> that specified the absolute latest date of the year that a VPC could end. This element has been removed from the configuration file and now is supplied using the form framework. This is done by specifying validation under the <components
> element in the <modify-duration
> section of vpcs.xml.
If you have previously specified a <fiscal-year-end
> element, the following is the XML you should add to your vpcs.xml (filling in the desired month, day and year as necessary for your organization):
<modify-duration> <components> <component id="new-end" required="true"> <description>New End Date</description> <help-text>Click above to open calendar</help-text> <date-value timezone="timezone"> <default relative="true"> <months>1</months> </default> </date-value> </component> <component id="current-end" required="false"> <description>Current End Date</description> <source property="end-date" /> <label-value /> </component> <validation> <validation-rule> <requirement comparison="lessthan" type="date"> <first> <component id="start-date" /> </first> <second> <component id="new-end" /> </second> </requirement> <response> <message>The new end date must be after the current start date</message> <component id="new-end" /> </response> </validation-rule> <validation-rule> <requirement comparison="greaterthan" type="date"> <first> <component id="new-end" /> </first> <second relative="true" /> </requirement> <response> <message>The new end date must be after today's date</message> <component id="new-end" /> </response> </validation-rule> <validation-rule> <requirement comparison="lessthan" type="date"> <first> <component id="new-end" /> </first> <second relative="false"> <year>{desired_year]</year> <month>[desired_month]</month> <day>[desired_day]</day> </second> </requirement> <response> <message>The new end date before the fiscal year end</message> <component id="new-end" /> </response> </validation-rule> </validation> </components> <end-date> <component id="new-end" /> </end-date> </modify-duration>