Quietwulf
Contributor
Contributor

Best location to change hostname / capitalization?

Some of our downstream services require that the hostname/machine name be in lower case.

I was just wondering how people had addressed this kind of issue in their own organisation.

Is this something that can be dynamically updated in the blueprint? Or something you'd handle on the Service Broker side via Custom forms?

0 Kudos
9 Replies
daphnissov
Immortal
Immortal

Is this 7.x or 8.x?

0 Kudos
Quietwulf
Contributor
Contributor

VRA 8.1. 

I tried to edit the original post to include the version, but it doesn't seem to allow it.

0 Kudos
siglert
Enthusiast
Enthusiast

Actually vRealize Orchestrator is your friend.   When you put a subscription on an event Compute,provision.pre then all of those properties will get added.  you can modify any of those by passing them into the workflow as an object.

0 Kudos
Quietwulf
Contributor
Contributor

We've done that in the past, there due to the way VRA 8.1 handles some of it's integration, we'd need to modify the resource name on the fly, before it's been submitted to the 3rd party system.

I was thinking of using a VCO action to update the field on submission perhaps?  Through the service broker?

0 Kudos
dbis7575
Enthusiast
Enthusiast

If all you are doing is changing the name to lower case, that can easily be done through an event action using either ABX or vRO. If you use an ABX action, there is an example of a rename build in, but instead of renaming it you can use the pythons lower() function to change the original name.

0 Kudos
Quietwulf
Contributor
Contributor

Using a ABX / vRO workflow just feels like overkill just to change the case of a resource name.

i guess is that’s all we’ve got, then that’s what we’ll go with.  Thanks for the responses.

0 Kudos
j_dubs
Enthusiast
Enthusiast

How are you capturing/generating the resource name?

If you are capturing it as an input on the blueprint there are many ways.. but you may be able to just use something like what is shown in the blueprint expression syntax at vRealize Automation Cloud Assembly blueprint expression syntax

${to_lower(resource.app.name)}

0 Kudos
Quietwulf
Contributor
Contributor

This is *exactly* what I was hoping to find.  I knew there had to be a way to modify the name in the blueprint, but I just couldn't find how.

Thank you.

0 Kudos
j_dubs
Enthusiast
Enthusiast

Glad it helps!  We use these functions a lot in our blueprints as well - pretty handy.

0 Kudos