PowervRA icon indicating copy to clipboard operation
PowervRA copied to clipboard

Add support for Simple Content Import/Export

Open kclinden opened this issue 6 years ago • 3 comments
trafficstars

Add a cmdlet to support a simple content import/export similar to the cloud client. This is useful for when you only want to import a single blueprint, property definition, etc...

#Export a blueprint by ID
Export-vRAContentSimple --Id 6d9a107e-def0-4236-9348-30301600dd3d -Path ./CentOS.yaml

#Get a vRA Blueprint by name, and then export
Get-vRABlueprint -Name CentOS | Export-vRAContentSimple -Path .

#Import a Blueprint
Import-vRAContentSimple --ContentType Composite-Blueprint --Path ./CentOS.yaml

kclinden avatar Feb 08 '19 14:02 kclinden

I will be working on this

kclinden avatar Feb 08 '19 14:02 kclinden

Looking closer at this it appears there is already a Get-vRAContentData which is essentially the same thing as the export just without logic to handle saving it to a file.

Which of these possible solutions would be better:

  • Modify the current cmdlet to accept piping and exporting
  • Create a specific import/export cmdlet as mentioned in the original post

kclinden avatar Feb 08 '19 15:02 kclinden

I'd go for Export-vRAContentData as an extra function, even if it does predominantly the same thing as Get-vRAContentData, but includes the extra step to get it out to a file.

Having the extra Export function makes it easier for users IMO quickly find which function to use just by the name of it.

jonathanmedd avatar Mar 08 '19 15:03 jonathanmedd