From 67c707904e746a1d56c7ea565ccf54aa254e1668 Mon Sep 17 00:00:00 2001 From: kart699 <37173181+kart699@users.noreply.github.com> Date: Wed, 24 Oct 2018 17:00:06 +0530 Subject: [PATCH 1/2] Update mesdp.py --- mesdp.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mesdp.py b/mesdp.py index 366bd25..f87f15b 100644 --- a/mesdp.py +++ b/mesdp.py @@ -2,7 +2,6 @@ import os import requests import logging -import json import xml.etree.ElementTree as ET path = os.environ["WORKDIR"] @@ -24,7 +23,7 @@ def select_template(dt,tmp_name): url = "https://{0}:{1}/sdpapi/request?OPERATION_NAME=ADD_REQUEST&TECHNICIAN_KEY={2}".format(mesdp_server, mesdp_port, mesdp_key) - args = {'OPERATION_NAME': 'ADD_REQUEST', 'TECHNICIAN_KEY': '5D6E2445-ACA7-4FFD-862D-47C26C91CC83', 'format': 'xml', + args = {'OPERATION_NAME': 'ADD_REQUEST', 'TECHNICIAN_KEY': mesdp_key, 'format': 'xml', 'INPUT_DATA': xml_content} response = requests.post(url, params=args, verify=False) @@ -52,8 +51,8 @@ def create_ticket(inward_array, var_array): if var_array[1] in i: tmp_dict = {} tmp_dict.update(i) - tmp_dict['$Name'] = mesdp_name - tmp_dict['$Subject'] = str(var_array[0])+str(i[var_array[1]]) + tmp_dict['$Name']=mesdp_name + tmp_dict['$Subject']=str(var_array[0])+str(i[var_array[1]]) if (len(var_array) == 3): fname = var_array[2].replace(" ", "") else: @@ -65,5 +64,3 @@ def create_ticket(inward_array, var_array): tmp_lst.append(i) logging.error("%s", e) return tmp_lst - - From 54203cb425211bc6573de30b1387c90e49a04ef5 Mon Sep 17 00:00:00 2001 From: kart699 <37173181+kart699@users.noreply.github.com> Date: Wed, 24 Oct 2018 17:00:46 +0530 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d35d95..792c60c 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Outbound access required for github to clone the plugin ## mesdp trigger plugin functions -Details of the function that can be used with the ClickSend trigger is given in this section. +Details of the function that can be used with the mesdp trigger is given in this section. ### create_ticket This function allows for creating a ticket against an observerd event using the defined (custom/default template) .