mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-04-18 17:01:22 -07:00
adding more specific metrics (#302)
Signed-off-by: Modular Magician <magic-modules@google.com>
This commit is contained in:
parent
5b92781ab0
commit
c946e77783
2 changed files with 19 additions and 4 deletions
|
@ -165,9 +165,14 @@ class GcpSession(object):
|
|||
self.module.fail_json(msg="Credential type '%s' not implemented" % cred_type)
|
||||
|
||||
def _headers(self):
|
||||
return {
|
||||
'User-Agent': "Google-Ansible-MM-{0}".format(self.product)
|
||||
}
|
||||
if self.module.params.get('env_type'):
|
||||
return {
|
||||
'User-Agent': "Google-Ansible-MM-{0}-{1}".format(self.product, self.module.params.get('env_type'))
|
||||
}
|
||||
else:
|
||||
return {
|
||||
'User-Agent': "Google-Ansible-MM-{0}".format(self.product)
|
||||
}
|
||||
|
||||
def _merge_dictionaries(self, a, b):
|
||||
new = a.copy()
|
||||
|
@ -208,7 +213,11 @@ class GcpModule(AnsibleModule):
|
|||
scopes=dict(
|
||||
required=False,
|
||||
fallback=(env_fallback, ['GCP_SCOPES']),
|
||||
type='list')
|
||||
type='list'),
|
||||
env_type=dict(
|
||||
required=False,
|
||||
fallback=(env_fallback, ['GCP_ENV_TYPE']),
|
||||
type='str')
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue