Last active
August 29, 2015 14:11
-
-
Save chelnak/7d92a75161f817d72dd4 to your computer and use it in GitHub Desktop.
vRA LeaseAboutToExpire.xslt date
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- This bit goes after <xsl:template match="/"> --> | |
<xsl:variable name="dd"> | |
<xsl:value-of select="substring(//VirtualMachineEx/Expires, 9,2)" /> | |
</xsl:variable> | |
<xsl:variable name="mm"> | |
<xsl:value-of select="substring(//VirtualMachineEx/Expires, 6,2)" /> | |
</xsl:variable> | |
<xsl:variable name="yyyy"> | |
<xsl:value-of select="substring(//VirtualMachineEx/Expires, 1,4)" /> | |
</xsl:variable> | |
<xsl:variable name="time"> | |
<xsl:value-of select="substring(//VirtualMachineEx/Expires, 12,5)" /> | |
</xsl:variable> | |
<!-- | |
As I was only interested in changing notification for single machine | |
deployments at this time I put the following after <xsl:otherwise> | |
--> | |
The lease for Virtual Machine <xsl:value-of select="//VirtualMachineEx/Name"/> will expire on | |
<xsl:value-of select="$dd" />/<xsl:value-of select="$mm" />/<xsl:value-of select="$yyyy" /> | |
at <xsl:value-of select="$time" />. | |
<!-- | |
You will get the following output: | |
The lease for Virtual Machine VM-01 will expire on 09/12/2014 at 12:00 | |
--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment