Debian Codegraph @

ansible_collections/community/general/plugins/module_utils/_linode.py

raw
1 # This code is part of Ansible, but is an independent component.
2 # This particular file snippet, and this file snippet only, is BSD licensed.
3 # Modules you write using this snippet, which is embedded dynamically by Ansible
4 # still belong to the author of the module, and may assign their own license
5 # to the complete work.
6 #
7 # Copyright (c), Luke Murphy @decentral1se
8 #
9 # Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause)
10 # SPDX-License-Identifier: BSD-2-Clause
11
12 # Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
13 # Do not use this from other collections or standalone plugins/modules!
14
15 from __future__ import annotations
16
17 from ansible.module_utils.ansible_release import __version__ as ansible_version
18
19
20 def get_user_agent(module: str) -> str:
21 """Retrieve a user-agent to send with LinodeClient requests."""
22 return f"Ansible-{module}/{ansible_version}"