brpm_module_demo 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/config.yml +1 -1
- data/lib/integrations/servicenow/README.md +6 -5
- data/lib/integrations/servicenow/process_webhook_event.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODI2YWVlY2VlYmIxMzk3YmIwNjMwOTQwNTIxYmM2ZjA0ODg3MDIzZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDQyYThjNzkwZGRjODRmZTdmNDRkZmNlOWU1MjMyN2MyODFmZWEyZg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTdmZWJjNGM3M2VmYmQ2MjA4ZjhjN2IzNGZhNjczMjY1MWIyZDJiMmQ2ODgx
|
10
|
+
NDQ2MDM4YTI4OGFhNDg1ZmEwZThjY2RiNWUwMjNjNWQ4MGMzMzJkMjVkZjYw
|
11
|
+
ZjE3YTMzODJkNGI3ZjllOGNkY2U5MTI3YzNjZjU2Mjg0MmI1MzU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MTJhMzQwZmI5MWFhMzM0ZGNhNWVmM2I1OWExOGEzMGU0MGFhNTlmY2FiOGY0
|
14
|
+
M2YwMDVhMWU2ZGI1MjU4Y2U2NmQ3NTIyOGQ4MDdmODg4MGNlOWIzNzcwZDIz
|
15
|
+
YjNhNThlMjczNGZmYTIxOWE3NjdkODIxZDg2YmM2MTY5MjUxYzQ=
|
data/config.yml
CHANGED
@@ -3,14 +3,14 @@
|
|
3
3
|
This integration will automatically create a request in BRPM when a new change request is created in Service-Now. This is just a first step in integration Service-Now with BRPM. It can easily be extended to cover more complex integration needs.
|
4
4
|
|
5
5
|
## Getting started
|
6
|
-
###
|
6
|
+
### Running the webhook receiver as a daemon
|
7
7
|
This script should be used with a [webhook_receiver wrapper](https://github.com/BMC-RLM/brpm_content_framework/blob/master/infrastructure/scripts/run_webhook_receiver.sh). Set the environment variable ```WEBHOOK_RECEIVER_PROCESS_EVENT_SCRIPT``` to the location of this script and execute it in daemon mode: ```nohup ./run_webhook_receiver.sh &```
|
8
8
|
|
9
|
-
###
|
10
|
-
Create one or more request templates with the name
|
9
|
+
### Creating a request template in BRPM
|
10
|
+
Create one or more request templates with the name ```[Template] Self Service - <automation type>``` where automation_type can be "Reboot server", etc.
|
11
11
|
|
12
12
|
### Configuring Service-Now
|
13
|
-
|
13
|
+
- Create a new dropdown field for a change request with the name u_choice_automation_type and configure a nmber of choices like "Reboot server" etc.
|
14
14
|
|
15
15
|
- Create an outbound REST Message and set the endpoint to http://your-server:port/webhooks (only the POST HTTP method is needed so you may delete the others)
|
16
16
|
|
@@ -45,7 +45,8 @@ function onAfter(current, previous) {
|
|
45
45
|
}
|
46
46
|
```
|
47
47
|
|
48
|
-
|
48
|
+
### Creating a change request
|
49
|
+
Voila, we're all set. Now create a change request in Service-Now and see how it triggers a request in BRPM!
|
49
50
|
|
50
51
|
|
51
52
|
|
@@ -8,8 +8,9 @@ def process_event(event)
|
|
8
8
|
change_request = event["change_request"]
|
9
9
|
|
10
10
|
request_params = {}
|
11
|
-
request_params["
|
11
|
+
request_params["change_request_id"] = change_request["id"]
|
12
12
|
request_params["change_request_number"] = change_request["number"]
|
13
|
+
request_params["target_path_or_servers"] = change_request["cmdb_ci"]
|
13
14
|
|
14
15
|
@brpm_rest_client.create_request("[Template] Self Service - #{change_request["automation_type"]}", "Self Service - #{change_request["automation_type"]} - #{change_request["number"]}","Production", true, request_params)
|
15
16
|
|