Skip to content

Commit

Permalink
Servicenow OOTB scripts (#2576)
Browse files Browse the repository at this point in the history
* comments

* get table names

* query script

* add scripts, change snow logo

* tests

* fixes

* fixes #2

* fixes
  • Loading branch information
liorblob authored and Itay4 committed Dec 5, 2018
1 parent bc68ef7 commit b0da564
Show file tree
Hide file tree
Showing 6 changed files with 1,096 additions and 12 deletions.
69 changes: 65 additions & 4 deletions Integrations/integration-ServiceNow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ commonfields:
name: ServiceNow
display: ServiceNow
category: Case Management
image: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAAOCAYAAADkH9gOAAAOgklEQVR42pVZB1gUVxcF1KioqZbE2LBirDH22Fs0YFQQUBDFgggKihUVsCEq2EEiFoKgCBYENIIKSK9Slg7L0ll6RzrMf+64w082C8H5vvlm57V57517zz33rRR3FRQU9AgPD1/s7Ox89t69ezYODg5mAQEBf6Snp/eX6uQKDg6ej7ZWFhYWAVZWVp7u7u4msbGxcuLt4uPjl+fk5Eym36GhoTMdHR3N7ezsbHg83rzGxsbeL1680AkJCVGU6uKqq6uTdnFx0fD29lZqbW3t9erVq534vUG8XV5enrSvr+/cR48enfjrr7+sbWxszr57926tQCDo29nYGRkZMn5+fovQ/vT9+/dvPXz40DgmJmaOeLvWhoaeNQGhy6q830/nymrCI4cVXf9ze8HF6yfzTcz2Vnn7YZ3/fX2MiPk1R9/Ivo6XMFtSfQOf3z/3mOnuUruHa6U+8yp3ezU3a8+BQ9WBoePYgtTU1DkXLlwI0tTUZFRVVZktW7awTw0NDcbIyEjw5s0bnY4DAPQx165de71z5842ardp0yZGTU2NUVFRYfT09GqePn16rqmp6QtqW1xcPFBXV7fG2Ng4BaAc3b17d/3GjRsZJSUlBuWVAHznrl276nfs2MEAhAVdGJM2fefkyZOJuFbTHI8cOcJPSUnpzbWBga7AOkK3b9/Ozp++Q/NCW+onvg72CgsLW3nu3LlILS0t6kPt2Sfm03L58mWv/Pz8i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x0sDXGybsAAAAASUVORK5CYII=
description: IT service management
configuration:
- display: ServiceNow URL, in the format https://company.service-now.com/
Expand Down Expand Up @@ -150,7 +150,7 @@ script:
'2': 'On order',
'3': 'On maintenance',
'6': 'In stock/In transit',
'7': 'Retried',
'7': 'Retired',
'100': 'Missing'
}
Expand Down Expand Up @@ -1205,6 +1205,44 @@ script:
return res
def get_table_name_command():
label = demisto.args()['label']
offset = demisto.args().get('offset', DEFAULTS['offset'])
limit = demisto.args().get('limit', DEFAULTS['limit'])
table_query = 'label=' + label
res = query('sys_db_object', limit, offset, table_query)
if not res or 'result' not in res:
return 'Cannot find table'
tables = res['result']
if len(tables) == 0:
return 'Cannot find table'
headers = ['ID', 'Name', 'SystemName']
mapped_tables = [{
'ID': table['sys_id'],
'Name': table['name'],
'SystemName': table['sys_name']
} for table in tables]
entry = {
'Type': entryTypes['note'],
'Contents': res,
'ContentsFormat': formats['json'],
'ReadableContentsFormat': formats['markdown'],
'HumanReadable': tableToMarkdown('ServiceNow Tables for label - ' + label, mapped_tables, headers=headers),
'EntryContext': {
'ServiceNow.Table(val.ID===obj.ID)': createContext(mapped_tables),
}
}
return entry
def fetch_incidents():
query_params = {}
Expand Down Expand Up @@ -1321,6 +1359,8 @@ script:
demisto.results(delete_record_command())
if demisto.command() == 'servicenow-list-table-fields':
demisto.results(list_table_fields_command())
if demisto.command() == 'servicenow-get-table-name':
demisto.results(get_table_name_command())
except Exception as e:
LOG(e)
LOG.print_log()
Expand Down Expand Up @@ -3330,8 +3370,29 @@ script:
description: User update time
type: date
description: Query the sys_user table in ServiceNow
- name: servicenow-get-table-name
arguments:
- name: label
required: true
description: The table label, e.g Asset, Incident, IP address etc.
- name: limit
description: Results limit
defaultValue: "10"
- name: offset
description: Starting record index to begin retrieving records from
outputs:
- contextPath: ServiceNow.Table.ID
description: Table system ID
type: string
- contextPath: ServiceNow.Table.Name
description: Table name to use in commands, e.g alm_asset
type: string
- contextPath: ServiceNow.Table.SystemName
description: Table system name, e.g Asset
type: string
description: Get table names by a label to use in commands
isfetch: true
runonce: false
releaseNotes: "Added command to retrieve table names, new ServiceNow logo"
tests:
- No test - No instance
releaseNotes: "-"
- No test - Hibernating instance
Loading

0 comments on commit b0da564

Please sign in to comment.