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:

<properties>

The <properties> element consists of three child elements:

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.

<provision>

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:

<modify>

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.

<archive>

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.

<vpc-management>

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.

Adding a Reservation

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:

VPC Duration Modification

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:

Converting From <fiscal-year-end> to New Components Framework

In 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>