Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
45f577b
PLGN-362-Updating pager duty to use http rather than pypd
rbowden-r7 Oct 16, 2023
e12139d
PLGN-362-Reducing complexity of get_on_calls method and send_request …
rbowden-r7 Oct 16, 2023
735eaba
PLGN-362-Adding parameterized to requirements.txt to allow unit tests…
rbowden-r7 Oct 16, 2023
7c526c8
PLGN-362-Running black formatter on get_on_call and util/api
rbowden-r7 Oct 16, 2023
45bf453
PLGN-362-Updating to use correct input and output objects, also remov…
rbowden-r7 Oct 16, 2023
91b9a1a
PLGN-362-Updating to use newest version of error messages from insigh…
rbowden-r7 Oct 16, 2023
7e0e810
PLGN-362-Removing redunant required check
rbowden-r7 Oct 16, 2023
fb22ba7
PLGN-362-Running black formatter on get_on_call and util/api
rbowden-r7 Oct 16, 2023
e3a2d2d
PLGN-362-Adding docstrings, using the input object in the connection …
rbowden-r7 Oct 16, 2023
fddc0c3
PLGN-362-Running black formatter on get_on_call and util/api
rbowden-r7 Oct 16, 2023
9c223c4
PLGN-362-Updating docstrings to use sphinx format
rbowden-r7 Oct 17, 2023
e8c4604
PLGN-362-Updating examples to user real fake data
rbowden-r7 Oct 19, 2023
807b290
PLGN-362-Updating black format
rbowden-r7 Oct 19, 2023
9a0badf
PLGN-362-Making sure return for delete is of type string
rbowden-r7 Oct 19, 2023
e16f0d7
PLGN-362-Making sure return for delete is of type string
rbowden-r7 Oct 19, 2023
63b8264
PLGN-362-Fixing typos / tidying up code
rbowden-r7 Oct 23, 2023
b12fc94
PLGN-362-Adding back in get user by email action + tests
rbowden-r7 Oct 23, 2023
58403b9
PLGN-362-using black format
rbowden-r7 Oct 23, 2023
68273c8
PLGN-362-adding back in prefix to eah actions description
rbowden-r7 Oct 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions plugins/pagerduty/.CHECKSUM
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
{
"spec": "f20c11c35f0dbd45c4ae3207b10029b4",
"manifest": "322935ff822e9be3217f4e2227e9a00f",
"setup": "4a6275a7299d3b5523ecadf7ab8a163a",
"spec": "6527a68d9fd5097bbb7075b8b279d9b8",
"manifest": "825be40acb77734dcd402f0da001f41b",
"setup": "a4f3b2fabe8b53ce95d26b7439c5d3a8",
"schemas": [
{
"identifier": "create_user/schema.py",
"hash": "d20d7c28c305fdcebb96939510679ae7"
"hash": "c68031209d4fa67ccb59d29e2d9129a0"
},
{
"identifier": "delete_user_by_id/schema.py",
"hash": "55d6f98c36228cc8b294303f54eae49c"
"hash": "796c3831d82077d659ebc859897d3410"
},
{
"identifier": "get_on_call/schema.py",
"hash": "4eb592192c18a8e0a79bd263a2509e29"
"hash": "136d6977b7cf82f1d59f6affa2f3112c"
},
{
"identifier": "get_user_by_email/schema.py",
"hash": "79d23d5f0c61caa02bb2728c940e4503"
"hash": "ca70ed41b688a0648c824a649c5072ff"
},
{
"identifier": "get_user_by_id/schema.py",
"hash": "43da47a5a74bc83c3652b398f29db719"
"hash": "78552441f46e278e02110bb7742d67ac"
},
{
"identifier": "send_acknowledge_event/schema.py",
"hash": "24b59e94be441385f0ce8770647cfa60"
"hash": "29ad62b147f212b81ae75380983190b8"
},
{
"identifier": "send_resolve_event/schema.py",
"hash": "74ea18af0ba61eb8dc40923971eb7d85"
"hash": "139114bf8815c249bac54e8ed9b61ad2"
},
{
"identifier": "send_trigger_event/schema.py",
"hash": "2a003fe3014831f80493498c143d302f"
"hash": "60c41049677bc3b99a28a2b941239d17"
},
{
"identifier": "connection/schema.py",
"hash": "80f4aea21f43406ebe4afe09f912b280"
"hash": "222cae0befdc90d883e5d25ea004a33d"
}
]
}
26 changes: 10 additions & 16 deletions plugins/pagerduty/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
FROM rapid7/insightconnect-python-3-38-slim-plugin:4
# The three supported python parent images are:
# - komand/python-2-plugin
# - komand/python-3-plugin
# - komand/python-pypy3-plugin
#
# Update the tag to a full semver version
FROM rapid7/insightconnect-python-3-38-plugin:5

# Add any custom package dependencies here
# NOTE: Add pip packages to requirements.txt
LABEL organization=rapid7
LABEL sdk=python

# End package dependencies

# Add source code
WORKDIR /python/src

ADD ./plugin.spec.yaml /plugin.spec.yaml
ADD . /python/src
ADD ./requirements.txt /python/src/requirements.txt

# Install pip dependencies
RUN if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

# Install plugin
RUN python setup.py build && python setup.py install
ADD . /python/src

RUN python setup.py build && python setup.py install

# User to run plugin code. The two supported users are: root, nobody
USER nobody

ENTRYPOINT ["/usr/local/bin/komand_pagerduty"]
30 changes: 15 additions & 15 deletions plugins/pagerduty/bin/komand_pagerduty
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env python
# GENERATED BY KOMAND SDK - DO NOT EDIT
# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT
import os
import json
from sys import argv

Name = "PagerDuty"
Vendor = "rapid7"
Version = "2.2.0"
Version = "3.0.0"
Description = "Leverage PagerDuty for incident management and response"


Expand All @@ -23,7 +23,7 @@ def main():
monkey.patch_all()

import insightconnect_plugin_runtime
from komand_pagerduty import connection, actions, triggers
from komand_pagerduty import connection, actions, triggers, tasks

class ICONPagerduty(insightconnect_plugin_runtime.Plugin):
def __init__(self):
Expand All @@ -34,22 +34,22 @@ def main():
description=Description,
connection=connection.Connection()
)
self.add_action(actions.CreateUser())

self.add_action(actions.DeleteUserById())

self.add_action(actions.GetOnCall())

self.add_action(actions.GetUserByEmail())


self.add_action(actions.GetUserById())


self.add_action(actions.GetUserByEmail())

self.add_action(actions.CreateUser())

self.add_action(actions.DeleteUserById())

self.add_action(actions.SendTriggerEvent())

self.add_action(actions.SendAcknowledgeEvent())

self.add_action(actions.SendResolveEvent())

self.add_action(actions.SendTriggerEvent())



"""Run plugin"""
cli = insightconnect_plugin_runtime.CLI(ICONPagerduty())
Expand Down
Loading