Wednesday, May 11, 2016

Get rid of vRealize Automation 7 request default fields

You want to get rid of the default fields of a request like # Instances, # CPUs, Memory (MB) and Storage (GB)? Here is a hack about how to do this:

  • Log in to the vRealize Automation appliance using SSH
  • Authenticate as root user
  • Add the following text to the end of each ‘composition-all.css’ file in the same line:
    • For # Instances: #fieldcontainer-1040{visibility:hidden}
    • For # CPUs: #fieldcontainer-1043{visibility:hidden}
    • For Memory (MB): #fieldcontainer-1046{visibility:hidden}
    • For Storage (GB): #numberField-1049{visibility:hidden}

Those are all ‘composition-all.css’ files for the different languages:
  • /var/lib/vcac/server/webapps/composition-service/resources/app-de-7.0.0-3292778/resources/composition-all.css
  • /var/lib/vcac/server/webapps/composition-service/resources/app-pt_BR-7.0.0-3292778/resources/composition-all.css
  • /var/lib/vcac/server/webapps/composition-service/resources/app-ko-7.0.0-3292778/resources/composition-all.css
  • /var/lib/vcac/server/webapps/composition-service/resources/app-nl-7.0.0-3292778/resources/composition-all.css
  • /var/lib/vcac/server/webapps/composition-service/resources/app-it-7.0.0-3292778/resources/composition-all.css
  • /var/lib/vcac/server/webapps/composition-service/resources/app-ru-7.0.0-3292778/resources/composition-all.css
  • /var/lib/vcac/server/webapps/composition-service/resources/app-fr-7.0.0-3292778/resources/composition-all.css
  • /var/lib/vcac/server/webapps/composition-service/resources/app-es-7.0.0-3292778/resources/composition-all.css
  • /var/lib/vcac/server/webapps/composition-service/resources/app-ja-7.0.0-3292778/resources/composition-all.css
  • /var/lib/vcac/server/webapps/composition-service/resources/app-zh_TW-7.0.0-3292778/resources/composition-all.css
  • /var/lib/vcac/server/webapps/composition-service/resources/app-en_GB-7.0.0-3292778/resources/composition-all.css
  • /var/lib/vcac/server/webapps/composition-service/resources/app-pt-7.0.0-3292778/resources/composition-all.css
  • /var/lib/vcac/server/webapps/composition-service/resources/app-en-7.0.0-3292778/resources/composition-all.css
  • /var/lib/vcac/server/webapps/composition-service/resources/app-zh_CN-7.0.0-3292778/resources/composition-all.css

(To easily add text to the end of a file, open it using vi and use $ to jump to the last char of the line, now use a to enable insert mode and directly jump behind the last char)

Restart the vRealize Automation server service:
  • service vcac-server restart


In my case I wanted to use a selectable T-Shirt size and vRealize Orchestrator workflows to set the CPU and memory values based on the selected T-Shirt size so I needed to remove the default fields from request.


Now the result can look like this:

Don't ask for support here :-P

1 comment:

  1. Care to share any details on the workflows to make t-shirt sizes possible?

    ReplyDelete