Skip to content

Commit

Permalink
Add UserAgent to Pure Storage FA logins and gets
Browse files Browse the repository at this point in the history
Closes: #616
Change-Id: I40b443bc97e787ac857ff948d239d30344eb49ac
  • Loading branch information
sdodsley authored and mo-ki committed Oct 24, 2023
1 parent e3faeef commit 3ddf5aa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmk/special_agents/agent_pure_storage_fa.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
from cmk.special_agents.utils.argument_parsing import Args, create_default_argument_parser

_LOGGER = logging.getLogger("agent_pure_storage_fa")
__version__ = "2.3.0b1"

USER_AGENT = f"checkmk-special-purefa-{__version__}"


class _RestVersion(NamedTuple):
Expand Down Expand Up @@ -172,6 +175,7 @@ def login(self, api_token: str) -> None:
f"{_REST_VERSION}/login",
{
"Content-Type": "application/json",
"User-Agent": USER_AGENT,
"api-token": api_token,
},
)
Expand Down Expand Up @@ -218,6 +222,7 @@ def collect_section_data(
f"{latest_version}/{spec.path}",
headers={
"Content-Type": "application/json",
"User-Agent": USER_AGENT,
"x-auth-token": self._x_auth_token,
},
params=spec.params,
Expand Down

0 comments on commit 3ddf5aa

Please sign in to comment.