VMware Cloud Community
TimDScott
Enthusiast
Enthusiast
Jump to solution

Setting vRA service icons from vRO

Hi All,

I'm working on creating vRA services from a vRO workflow.

The service creation is working fine, but I need to set the service's icon. I found this:

https://michaelpoore.com/2017/03/how-to-change-the-vra-7-2-all-services-icon-using-vro/

This changes the "All services" icon. I just want to change the icon of the service that I'm creating, basically I think I need a different Id for this line in the example above:

iconObj.setId("cafe_default_icon_genericAllServices");

Any ideas?

Thanks,

Tim.

Reply
0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi Tim,

Yes, you need a different ID here. Pick one that is likely to be unique to your service, like "timscott_default_icon_myCustomService".

Another important point - you'll need a code to attach this icon to your service. You haven't shown your service creation code, but I think you'll need to call the method vCACCAFEService#setIconId(...) on your service when you are creating it.

I haven't tested this, but in theory it should work.

View solution in original post

Reply
0 Kudos
3 Replies
eoinbyrne
Expert
Expert
Jump to solution

What happens if you specify your own ID there? As in, generate an ID string and try the Icon upload.

When it comes to a single service, the API docs indicate that the service definition includes the ID of the Icon to display. From doing this via the UI in vRA you can upload your choice of icon file which implies that the ID is just generated after the upload and then it is attached to the service definition afterwards?

The constant key string in the example from @mpoore most likely relates to a global internal constant value in vRA

Reply
0 Kudos
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi Tim,

Yes, you need a different ID here. Pick one that is likely to be unique to your service, like "timscott_default_icon_myCustomService".

Another important point - you'll need a code to attach this icon to your service. You haven't shown your service creation code, but I think you'll need to call the method vCACCAFEService#setIconId(...) on your service when you are creating it.

I haven't tested this, but in theory it should work.

Reply
0 Kudos
TimDScott
Enthusiast
Enthusiast
Jump to solution

Thanks Llian, I understand now!

Reply
0 Kudos