snow: Call Refactored login from snow modules (#59201)
* Remove python shebang from snow_record* * Add python shebang to all snow modules * Remove NO_LOG from username * Call Refactored login from snow modules
This commit is contained in:
parent
d0538c0d7a
commit
7e25a61464
3 changed files with 8 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright: (c) 2019, Ansible Project
|
||||
# Copyright: (c) 2017, Tim Rightnour <thegarbledone@gmail.com>
|
||||
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
|
||||
|
@ -87,7 +88,7 @@ class ServiceNowClient(object):
|
|||
def snow_argument_spec():
|
||||
return dict(
|
||||
instance=dict(type='str', required=True),
|
||||
username=dict(type='str', required=True, no_log=True),
|
||||
username=dict(type='str', required=True),
|
||||
password=dict(type='str', required=True, no_log=True),
|
||||
client_id=dict(type='str', no_log=True),
|
||||
client_secret=dict(type='str', no_log=True),
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright: (c) 2017, Tim Rightnour <thegarbledone@gmail.com>
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
@ -200,6 +202,7 @@ def run_module():
|
|||
|
||||
# Connect to ServiceNow
|
||||
service_now_client = ServiceNowClient(module)
|
||||
service_now_client.login()
|
||||
conn = service_now_client.conn
|
||||
|
||||
params = module.params
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright: (c) 2017, Tim Rightnour <thegarbledone@gmail.com>
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
@ -227,6 +229,7 @@ def run_module():
|
|||
|
||||
# Connect to ServiceNow
|
||||
service_now_client = ServiceNowClient(module)
|
||||
service_now_client.login()
|
||||
conn = service_now_client.conn
|
||||
|
||||
params = module.params
|
||||
|
|
Loading…
Reference in a new issue