• I needed to migrate quite a few vRealize Automation machine prefixes over to a new instance of vRealize Automation and found myself wondering if I could automate it. I was quite surprised to find that you can’t do this with the public API at the moment, so decided to give cloudclient a try.

    It turns out that you can export a list of machine prefixes to a file, formatted in either JSON or CSV. However, importing still looks like a manual job.

    Here is a quick(ha) post outlining how semi automated the process with Python and PowerShell examples.

    [read more]
  • So it looks like this post has accidentally become part two of a two post series. I would recommend going through the first post before this one as it will probably fill in some gaps.

    Resources for this post can be found in examples/reservation/createReservationJinja2.

    This post extends the idea of reusable reservation templates by adding Jinja2 in to the mix.

    Jinja2 allows us to adapt our existing reservationTemplate.json file so it can be used to create multiple reservations without having to play with the file every time we need to make a change. In my opinion, there is nothing worse than debugging json, so if you can get it right once and never have to touch it again, bonus points!

    The following example is pretty basic and we will only be working with name and subtenantId but hopefully by the end of the post you will get the idea.

    [read more]
  • Automating things that you work with is cool

    For those that know me in the IT world, you will know that I like to automate things.. well everything I can get my hands on. And with the impending career change I can only imagine that the things I get to automate are going to get even more interesting.

    For a while now I’ve been working with vRealize Automation, and naturally it’s API. As an exercise to try and understand a bit more about how the API works I decided to start vRAAPIClient.

    With the addition of the reservation-service I thought it would be good to try and understand how it ticks and in turn add it to the project.

    I’ve found that the best way to automate reservation creation and in fact a few other areas of vRA is to work from a template. In the following post we will create a reusable json payload that will allow us to quickly create new reservations.

    There will be two parts to this post:

    ⚠️ Disclaimer: The vRAAPIClient project is provided as is! Please don’t run it in production without testing first

    [read more]
  • To cut a long story short, I needed to customise the email body for the Lease About To Expire scenario. The content was very basic and it the short date it contained was in the wrong format (for my environment).

    vRA email templates are split between the virtual appliance, which uses Apache Velocity templates and the IAAS host which currently uses XSLT stylesheets.

    [read more]
  • Over the last year I’ve been doing a lot of work with vRealize Automation and vCenter Orchestrator.

    One thing I have been putting off is learning how to use the vRA REST API.. Why would you really need to when vCO provides you with the necessary interfaces? But with the release of vRA 6.1 came the new REST API, so I decided it was probably time I had a look.

    For me, the easiest way to learn your way round an API is to try and solve a problem with it. I used a situation that I came across in a meeting recently as a theoretical problem:

    A customer wants to use vRA to manage their resources but wants the provisioning of a resource to fit in with their current processes. They need to be able to trigger a deployment from an external source then run some scripts on the Virtual Machine once it has provisioned.

    The steps needed to be as follows:

    • Deploy a Virtual Machine from a blueprint.
    • Monitor the status of the request through the deployment.
    • Finally, return networking information about the provisioned Virtual Machine at the end of the process so that IP address can be passed on to another script for other fun automation things.

    [read more]