Since vRA 7.1 you can change the “All Services” icon.
VMware has an article here on how to change this through the API.
I thought, maybe you could also do this via Postman. Which would also be a good exercise (for me) in understanding and using the Rest API via Postman.
The article below is one of many ways to solve this issue, feedback is welcome in the comments below.
Why?
But first, the why?
Why would you want to change the icon in the first place.
Well, I would prefer to hide the complete catagory. So users are forced to select a service category instead off browsing the all Services and selecting the wrong catalog item.
A deployment of vRA I worked with, implemented the VM deployment process via a XaaS blueprint that would request a Catalog item (vRA Blueprint) on behalf of a user.
This resulted that these blueprints were also vissible in the Catalog. And users often selected the wrong catalog item.
So I thought if I can’t hide the catagory, maybe I can make it visible that you shouldn’t use it. Maybe I should use a forbidden icon.
After some searching on the internet I found these sites
- VMware Docs – vRA 7.2
- blog post by Virtual Brakeman
This, with some rudimentary knowledge about Postman ( see their site) made me to give it a try.
Postman
Postman is a powerful REST-client tool for developers .
You need to install it on a PC which has access to the vRA appliance.
You can start from scratch, but there is also a lot of examples to be found on the internet for REST calls. I downloaded the vRealize Automation API Postman Samples.
A nice blog about postman and vRealize Automation API can be found here
How
First we need to do some setup and create some logic. These are the steps:
- download and install Postman (from here)
- download and import the vRealize automation API Postman Samples from here
- download an icon (search with google and save image)
- Convert the image to a 64-bit encoded string via here and save the string in notepad (or any other text application)
- Open Postman and duplicate the vRA enviroment
click on the cogg-wheel icon just underneath the Sign-in button and duplicate the vRA enviroment by clicking on - click on the created copy of the environment to edit its settings
As you can see, I made an enviroment that logins to the default tenant with the administrator@vsphere.local account - After updating the enviroment, select it in the drop-down menu in the right top corner of Postman. This environment provides the parameters needed by the items in the vRA collections on the left side.
- create a new folder/collection to store the new items in by clicking on ‘New Collection’ icon. Name it ‘Replace All Services icon’.
I placed it as a subcollection of ‘vRA Samples – Catalog Service’.
- Copy existing items to the new collection
From the ‘vRA Samples – Branding Service’ collection duplicate ‘POST login’ and ‘POST Update the branding’ and then move them to the new created collection. - Rename the duplicate items like below
- Edit the url to https://{{va-fqdn}}/catalog-service/api/icons
- Edit the body of ‘Replace All Services icon’ item like below
Replace the comment <replace this with …. string> with the 64-bit encoded string created in step 4
Replace icon
Now we have all the logic in place, lets execute and replace the icon.
- select and run ‘POST Login system account’
This results in a token ID which is stored in the enviroment
With this token we can run the second item. - select and run “Replace all Services icon”
The response area will be clear if it was successful. - Login to vRA to check if the icon changed.