Working on completing a template pipeline for my deployment system.
I have chunks of code for doing parts of the template automation with help from code samples from Mr. Lam and others.
Out automated deployment system does not have the ability to utilize the content library, and needs to deploy from a VM template object. Since we have 6+ sites/ vcenters I am using the content library in a master -> subscription method.
Flow of code:
Delete content library items on master vCenter.
-sync each vcenter content library to see the deletes
Clone updated vm tempaltes to content library.
Sync each vCenter to see the new templates and await the download of the new templates
Per each vCenter:
Delete existing VM templates where name matches content library items
Create new vm from content library items
convert vm to template
The areas I am having trouble finding any api documentation or powercli documentation is:
* Initializing the sync operation for a content library.
* Cloning a VM to create a new content library item.
Yes I know from William Lam's post there is an option to version templates as well, that i will implement in a new version
Has anyone come across a way to complete these two code operations?
Can't these actions be done through the REST API calls?
There are ample samples on how to call these REST API through the CisServices in William's ContentLibrary module .
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes and no. I have a mixed environment of one 6.5 vCenter that does support the good rest calls and the rest of the vcenters in the subscription status are on 6.0 u3.
As for the cloning part; I am referencing the ability to clone a VM to the content library. I have the code to create a new vm from a content library item but if I want to push content into the content library instead of right clicking the vm and "clone to library" I am trying to find out how to code for that action.
Any thoughts LucD? I know there are some backend API calls on the old 6.0 SDK side that are not well documented and was hopping to the sync and clone to content library would be in there.
Also just a shout out to all the awesome work and documentation you guys have done on the new Rest API and API explorer. It rocks and is getting better with every version.
Sorry, no clue, and I don't know these backend APIs you mention.
If anybody knows, it must be lamw :smileygrin:
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference