Preparing to integrate reservations by importing XML files
The Generic-Reservation-XML-file-parser can be used to import data for Reservations from XML files. The following types of Reservation elements can be specified in the XML file that is imported into TrueSight Capacity Optimization using the ETL module:
- Reservations
- System Templates
- Onboardings
- Offboardings
Reservation XML overview
The following XML provides a high-level overview of the content in the file. All the sections are optional, which allows you to import one or more Reservation elements into TrueSight Capacity Optimization.
<rsvData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="rsv_data_etl.xsd">
<templates> <!-- Specify the System Templates to be imported (optional) -->
<systemTemplate>
</systemTemplate>
</templates>
<reservations> <!-- Specify the Reservations to be imported (optional) -->
<reservation>
</reservation>
</reservations>
<onboardings> <!-- Specify the Onboardings to be imported (optional) -->
<onboarding>
</onboarding>
</onboardings>
<offboardings> <!-- Specify the Offboardings to be imported (optional) -->
<offboarding>
</offboarding>
</offboardings>
</rsvData>
Before deploying and configuring the various ETL tasks that impacts the Reservations in your system, it is recommended to go through the following preparatory steps:
- Analyze the XML file structure: Analyze the structure of your XML files. For details, see the attached sample .
Determine the mandatory fields: Ensure that all mandatory fields are included in the XML files. For details, see the attached sample
or following examples. For the reservation XML files, the metadata field is optional.
Examples
The following sections provide examples for the various Reservation items. You can also refer to the attached
file for reference.- System Templates
- Reservations
- Reservations with custom resource instances
- Onboardings
- Onboardings with custom resource instances
- Offboardings
- Offboardings with custom resource instances
System Templates
<!-- You can add multiple System Templates -->
<systemTemplate>
<name>VM_Austin_44</name>
<lookupName>VM_Austin_44_9876</lookupName>
<!--If an existing System Template uses the same lookupName,
it will be updated.-->
<enttypenm>gm:vmw</enttypenm>
<cpuCores>8</cpuCores>
<memTotal>2147483648</memTotal>
<storageTotal>64424509440</storageTotal>
<cpuTotalMHz>20000</cpuTotalMHz> <!-- Optional -->
<os>UNIX</os> <!-- Optional -->
<cpuUtilization>0.1</cpuUtilization> <!-- Optional -->
<cpuEntitledCapacity>0.4</cpuEntitledCapacity> <!-- Optional -->
<memUtilization>0.9</memUtilization> <!-- Optional -->
<storageUtilization>0.6</storageUtilization> <!-- Optional -->
</systemTemplate>
<systemTemplate>
<!-- Enter details similar to the above example -->
</systemTemplate>
</templates>
Reservations
<reservation> <!-- Creates a Reservation based on resource specification -->
<name>Reservation_POC_March</name>
<startDate>2015-03-25</startDate>
<endDate>2015-03-31</endDate> <!-- Optional -->
<description>Reserve resources for POC</description> <!-- Optional -->
<owner>Alan</owner> <!-- Optional -->
<priority>HIGH</priority> <!-- Optional -->
<probability>75</probability> <!-- Optional -->
<resources>
<resourceTemplates numItems="1">
<systemTemplateLookup name="VM_Austin_44_9876"/>
<!-- Alternatively, you can specify the System Template by ID-->
</resourceTemplates>
</resources>
<capacityPools>
<capacityPoolLookup id="2211"/>
</capacityPools>
</reservation>
<reservation> <!-- Creates a Reservation based on item specification -->
<name>Reservation_BugHunt</name>
<startDate>2015-02-12</startDate>
<endDate>2015-02-15</endDate> <!-- Optional -->
<description>Reserve resources</description> <!-- Optional -->
<owner>Mary</owner> <!-- Optional -->
<priority>HIGH</priority> <!-- Optional -->
<probability>90</probability> <!-- Optional -->
<items>
<item>
<name>My Item</name>
<systemTemplateLookup id="2383"/>
<!-- Alternatively, you can specify the System Template by name -->
</item>
</items>
<capacityPools>
<capacityPoolLookup id="2211"/>
</capacityPools>
</reservation>
</reservations>
Reservations with custom resource instances
<reservation> <!-- Creates a Reservation based on resource specification -->
<name>Lync2013 server upgrade</name>
<startDate>2020-08-25</startDate>
<description>Upgrade Lync2013 infrastucture to handle new phone calls</description>
<owner>David</owner>
<metadata><![CDATA[{"windows_license":"4","admin_mail":"admin@mail.com","support_level":"premier"}]]></metadata>
<resources>
<resourceSpecs numItems="2">
<enttypenm>gm:vmw</enttypenm>
<cpuCores>4</cpuCores>
<memTotal>2147483648</memTotal>
<storageTotal>64424509440</storageTotal>
<cpuTotalMHz>20000</cpuTotalMHz>
</resourceSpecs>
</resources>
<capacityPools>
<capacityPoolLookup>
<lookupFields>
<lookupField name="NAME" value="Silver Houston - VMware" />
</lookupFields>
</capacityPoolLookup>
</capacityPools>
</reservation>
<reservation>
<name>Free up Lync2013 server upgrade resources</name>
<startDate>2020-09-25</startDate>
<description>Upgrade Lync2013 infrastucture to handle new phone calls</description>
<owner>David</owner>
<metadata><![CDATA[{"windows_license":"4","admin_mail":"admin@mail.com","support_level":"premier"}]]></metadata>
<resources>
<resourceSpecs numItems="1">
<enttypenm>gm:vmw</enttypenm>
<cpuCores>-4</cpuCores>
<memTotal>-2147483648</memTotal>
<storageTotal>-64424509440</storageTotal>
<cpuTotalMHz>-20000</cpuTotalMHz>
</resourceSpecs>
</resources>
<capacityPools>
<capacityPoolLookup>
<lookupFields>
<lookupField name="NAME" value="Silver Houston - VMware" />
</lookupFields>
</capacityPoolLookup>
</capacityPools>
</reservation>
</reservations>
Onboardings
<name>Onboarding_ESXHost_33</name>
<description>Add new ESX host to cluster</description> <!-- Optional -->
<onboardingDate>2015-03-01</onboardingDate>
<realizationMode>MANUAL</realizationMode>
<resources>
<resourceTemplates numItems="1">
<systemTemplateLookup id="2216"/>
<!-- Alternatively, you can specify the System Template by name -->
</resourceTemplates>
</resources>
<!-- You can also specify the Reservation Target by name, id, or lookup field -->
<!-- This example uses lookup fields -->
<reservationTargetLookup>
<lookupFields>
<lookupField name="VMW_VMREF" value="domain-c23" />
<lookupField name="NAME" value="cluster23" />
</lookupFields>
</reservationTargetLookup>
</onboarding>
Onboardings with custom resource instances
<name>Onboarding_ESXHost_33</name>
<description>Add new ESX host to cluster</description> <!-- Optional -->
<onboardingDate>2015-03-01</onboardingDate>
<realizationMode>MANUAL</realizationMode>
<resources>
<resourceSpecs numItems="1">
<name>vmware_large_spec</name> <!-- Optional -->
<enttypenm>gm:vmw</enttypenm> <!-- Optional -->
<cpuCores>8</cpuCores>
<memTotal>2147483648</memTotal>
<storageTotal>64424509440</storageTotal>
<cpuTotalMHz>20000</cpuTotalMHz> <!-- Optional -->
<cpuEntitledCapacity>4.0</cpuEntitledCapacity> <!-- Required for AIX -->
<cpuUtilization>0.1</cpuUtilization> <!-- Optional -->
<memUtilization>0.9</memUtilization> <!-- Optional -->
<storageUtilization>0.6</storageUtilization> <!-- Optional -->
</resourceSpecs>
</resources>
<!-- You can also specify the Reservation Target by name, id, or lookup field -->
<!-- This example uses lookup fields -->
<reservationTargetLookup>
<lookupFields>
<lookupField name="VMW_VMREF" value="domain-c23" />
<lookupField name="NAME" value="cluster23" />
</lookupFields>
</reservationTargetLookup>
</onboarding>
Offboardings
<offboarding>
<name>Onboarding_ESXHost_55</name>
<offboardingDate>2015-01-24</offboardingDate>
<description>Offboarding decommissioned host</description> <!-- Optional -->
<realizationMode>AUTOMATIC</realizationMode> <!-- Optional -->
<resources>
<resourceTemplates numItems="1">
<systemTemplateLookup id="2314"/>
<!-- Alternatively, you can specify the System Template by name -->
</resourceTemplates>
</resources>
<reservationTargetLookup name="Cluster-1"/>
<!-- Alternatively, you can specify the Reservation Target by id -->
</offboarding>
</offboardings>
Offboardings with custom resource instances
<offboarding>
<name>Onboarding_ESXHost_55</name>
<offboardingDate>2015-01-24</offboardingDate>
<description>Offboarding decommissioned host</description> <!-- Optional -->
<realizationMode>AUTOMATIC</realizationMode> <!-- Optional -->
<resources>
<resourceSpecs numItems="1">
<name>vmware_large_spec</name> <!-- Optional -->
<enttypenm>gm:vmw</enttypenm> <!-- Optional -->
<cpuCores>8</cpuCores>
<memTotal>2147483648</memTotal>
<storageTotal>64424509440</storageTotal>
<cpuTotalMHz>20000</cpuTotalMHz> <!-- Optional -->
<cpuEntitledCapacity>4.0</cpuEntitledCapacity> <!-- Required for AIX -->
<cpuUtilization>0.1</cpuUtilization> <!-- Optional -->
<memUtilization>0.9</memUtilization> <!-- Optional -->
<storageUtilization>0.6</storageUtilization> <!-- Optional -->
</resourceSpecs>
</resources>
<reservationTargetLookup name="Cluster-1"/>
<!-- Alternatively, you can specify the Reservation Target by id -->
</offboarding>
</offboardings>
Related topics