When using Nimbella CLI or Nimbella Deployer via library interfaces, there is an opportunity to set the user agent string on the initializeAPI call. But, when invoking the CLI at a terminal, the initializeAPI call has so far used a hard-coded constant so there is no opportunity to tailor the user agent string by context.
This change introduces the environment variable NIM_USER_AGENT which can be used to set an alternative user agent string. If the environment variable is unset (or set to the empty string), then the hard-coded constant is used as before.
The change is motivated by the fact that nim is often used in a context where it is embedded in something else and the generic user agent string is not informative enough.
When using Nimbella CLI or Nimbella Deployer via library interfaces, there is an opportunity to set the user agent string on the
initializeAPI
call. But, when invoking the CLI at a terminal, theinitializeAPI
call has so far used a hard-coded constant so there is no opportunity to tailor the user agent string by context.This change introduces the environment variable
NIM_USER_AGENT
which can be used to set an alternative user agent string. If the environment variable is unset (or set to the empty string), then the hard-coded constant is used as before.The change is motivated by the fact that
nim
is often used in a context where it is embedded in something else and the generic user agent string is not informative enough.