Skip to content

Commit

Permalink
fix: preserve SDK user agent in collection client
Browse files Browse the repository at this point in the history
  • Loading branch information
t0mk committed Nov 3, 2023
1 parent 82fb51c commit 8c0ae3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/module_utils/metal/metal_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ def raise_if_missing_equinix_metal():

def get_equinix_metal_client(api_token, api_url=API_URL, ua_prefix=""):
raise_if_missing_equinix_metal()
ua = ua_prefix + USER_AGENT
ua = ua_prefix + " " + USER_AGENT
conf = equinix_metal.Configuration(
host=api_url,
)
conf.api_key['x_auth_token'] = api_token
mpc = equinix_metal.ApiClient(conf)
mpc.user_agent = ua
mpc.user_agent = ua + " " + mpc.user_agent
return mpc


Expand Down

0 comments on commit 8c0ae3f

Please sign in to comment.