From a0ee1f37d1976fcf1e12fce7b5e116adf0e14704 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Tue, 15 Mar 2016 16:13:13 -0700 Subject: [PATCH] Add user-agent information for analytics --- cloud/azure/azure_deployment.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cloud/azure/azure_deployment.py b/cloud/azure/azure_deployment.py index 79875581d04..e28663b55f6 100644 --- a/cloud/azure/azure_deployment.py +++ b/cloud/azure/azure_deployment.py @@ -591,8 +591,12 @@ def main(): tenant=conn_info['tenant_id']) subscription_id = conn_info['subscription_id'] - resource_client = ResourceManagementClient(ResourceManagementClientConfiguration(credentials, subscription_id)) - network_client = NetworkManagementClient(NetworkManagementClientConfiguration(credentials, subscription_id)) + resource_configuration = ResourceManagementClientConfiguration(credentials, subscription_id) + resource_configuration.add_user_agent('Ansible-Deploy') + resource_client = ResourceManagementClient(resource_configuration) + network_configuration = NetworkManagementClientConfiguration(credentials, subscription_id) + network_configuration.add_user_agent('Ansible-Deploy') + network_client = NetworkManagementClient(network_configuration) conn_info['deployment_name'] = module.params.get('deployment_name') if module.params.get('state') == 'present':