Perspectives On Networks, Automation, Systems, and Software Engineering
Service Profiles and Service Profile Templates in Cisco UCS PowerTool
I had a few scripts that were written WAY before PowerTool was out of beta, and the only way I knew how to generate a Service Profile Template was to use manual XML calls. For instance:
If most of your script is composed of normal cmdlets, this looks pretty absurd - so if you can avoid calling direct XML, you should. Same thing if you’re trying to create your own PowerTool-esque library (say, with Python instead of bleh PowerShell), you would take these XML calls and hide them away in modular functions so that you can call them with a single command and a few arguments.
Most other templates (like vNIC and vHBA) have a dedicated cmdlet for creating those constructs. For instance:
As I tab through the cmdlets that start with “Add-UcsServiceProfile” I noticed there was no “Add-UcsServiceProfileTemplate” as one would expect.
Poking around in the release notes for v1.0 of the PowerTool library, I noticed that one of the new features was the ability to filter Service Profiles based on type (aimed at being able to get all the Service Profiles in the system:
So I ran a Get-Help for this cmdlet:
So….at least in this version of PowerTool, the same cmdlet is used to create SPs and SPTs, just need to set this “flag” to one of those three options.
Matt Oswalt is an all-around technology nerd, currently focusing on networking,
software development, and everything in between. He is at his happiest in front
of a keyboard, next to a brewing kettle, or wielding his silo-smashing sledgehammer.
He spends his days diving deep into the intersection of networking and software,
and likes to blog about his experiences when he comes up for air. You can follow him on