Skip to content

Commit 91179b9

Browse files
committed
Rebuild, fix move node
1 parent c3a1118 commit 91179b9

File tree

4 files changed

+39
-6
lines changed

4 files changed

+39
-6
lines changed

USAGE.md

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ These commands allow you to import and export email/http action templates. A com
5959
| ------- | ----------- | ------- |
6060
| createmediatype | Create a custom media type. Provide the name of the media type as parameter (-n) | `act.sh actiontemplate createmediatype -n 'application/vnd.appd.events+json'` |
6161
| export | Export all templates of a given type. Provide the type (-t email or httprequest) as parameter. | `act.sh actiontemplate export -t httprequest` |
62+
| exportHttpActionPlanList | Export the Http Action Plan List This command requires no further arguments. | `act.sh actiontemplate exportHttpActionPlanList ` |
6263
| delete | Delete an action template. Provide an id (-i) and a type (-t) as parameters. | |
6364
| import | Import an action template of a given type (email, httprequest) | `act.sh actiontemplate import template.json` |
6465
| list | List all actiontemplates. Provide a type (-t) as parameter. | |

act.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
ACT_VERSION="v0.5.0"
3-
ACT_LAST_COMMIT="fc19e825855dc13921e014f700f2c63adbfc3b5b"
3+
ACT_LAST_COMMIT="c3a1118a71fce876b65fe56b9e71ba790ea97c75"
44
USER_CONFIG="$HOME/.appdynamics/act/config.sh"
55
GLOBAL_CONFIG="/etc/appdynamics/act/config.sh"
66
CONFIG_CONTROLLER_COOKIE_LOCATION="/tmp/appdynamics-controller-cookie.txt"
@@ -87,6 +87,8 @@ actiontemplate_createmediatype() { apiCall -X POST -d '{"name":"{{n:media_type_n
8787
rde actiontemplate_createmediatype "Create a custom media type." "Provide the name of the media type as parameter (-n)" "-n 'application/vnd.appd.events+json'"
8888
actiontemplate_export() { apiCall '/controller/actiontemplate/{{t:action_template_type}}/' "$@" ; }
8989
rde actiontemplate_export "Export all templates of a given type." "Provide the type (-t email or httprequest) as parameter." "-t httprequest"
90+
actiontemplate_exportHttpActionPlanList() { apiCall '/controller/restui/httpaction/getHttpRequestActionPlanList' "$@" ; }
91+
rde actiontemplate_exportHttpActionPlanList "Export the Http Action Plan List" "This command requires no further arguments." ""
9092
doc adql << EOF
9193
These commands allow you to run ADQL queries agains the controller (not the event service!)
9294
EOF
@@ -257,7 +259,7 @@ node_list() { apiCall '/controller/rest/applications/{{a:application}}/nodes' "$
257259
rde node_list "List all nodes." "Provide the application id as parameter (-a)." "-a 29"
258260
node_markhistorical() { apiCall -X POST '/controller/rest/mark-nodes-historical?application-component-node-ids={{n:nodes}}' "$@" ; }
259261
rde node_markhistorical "Mark nodes as historical." "Provide a comma separated list of node ids." "-n 45,46"
260-
node_move() { apiCall -X POST 'https://achim.saas.appdynamics.com/controller/restui/nodeUiService/moveNode/{{n:node}}/{{t:tier}}' "$@" ; }
262+
node_move() { apiCall -X POST '/controller/restui/nodeUiService/moveNode/{{n:node}}/{{t:tier}}' "$@" ; }
261263
rde node_move "Move node." "Provide a node id (-n) and a tier id (-t) to move the given node to the given tier." "-n 1782418 -t 187811"
262264
doc policy << EOF
263265
Import and export policies

commands.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ node:
484484
description: Provide a node id (-n) and a tier id (-t) to move the given node to the given tier.
485485
example: -n 1782418 -t 187811
486486
method: POST
487-
endpoint: https://achim.saas.appdynamics.com/controller/restui/nodeUiService/moveNode/{{n:node}}/{{t:tier}}
487+
endpoint: /controller/restui/nodeUiService/moveNode/{{n:node}}/{{t:tier}}
488488
policy:
489489
title: Policies API
490490
description: Import and export policies

postman-collection.json

+33-3
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,36 @@
238238
},
239239
"description": "Provide the type (-t email or httprequest) as parameter."
240240
}
241+
},{
242+
"name": "Export the Http Action Plan List",
243+
"request": {
244+
"method": "GET",
245+
"header": [
246+
{
247+
"key": "Content-Type",
248+
"value": "application/json;charset=UTF-8",
249+
"type": "text"
250+
},
251+
{
252+
"key": "X-CSRF-TOKEN",
253+
"value": "{{X-CSRF-TOKEN}}",
254+
"type": "text"
255+
}
256+
],
257+
"body": {
258+
"mode": "raw",
259+
"raw": ""
260+
},
261+
"url": {
262+
"raw": "{{controller_host}}/controller/restui/httpaction/getHttpRequestActionPlanList",
263+
"host": [
264+
"{{controller_host}}"
265+
],
266+
"path": ["controller","restui","httpaction","getHttpRequestActionPlanList"],
267+
"query": []
268+
},
269+
"description": "This command requires no further arguments."
270+
}
241271
}]},{"name": "adql","item": [{
242272
"name": "Run an ADQL query",
243273
"request": {
@@ -1939,11 +1969,11 @@
19391969
"raw": ""
19401970
},
19411971
"url": {
1942-
"raw": "{{controller_host}}https://achim.saas.appdynamics.com/controller/restui/nodeUiService/moveNode/{{n:node}}/{{t:tier}}",
1972+
"raw": "{{controller_host}}/controller/restui/nodeUiService/moveNode/{{n:node}}/{{t:tier}}",
19431973
"host": [
19441974
"{{controller_host}}"
19451975
],
1946-
"path": ["https:","achim.saas.appdynamics.com","controller","restui","nodeUiService","moveNode","{{node}}","{{tier}}"],
1976+
"path": ["controller","restui","nodeUiService","moveNode","{{node}}","{{tier}}"],
19471977
"query": []
19481978
},
19491979
"description": "Provide a node id (-n) and a tier id (-t) to move the given node to the given tier."
@@ -2759,4 +2789,4 @@
27592789
"description": "Provide an id (-i), name (-n), a display name (-d), a list of roles (-r), a password (-p) and a mail address (-m) as parameters."
27602790
}
27612791
}]}]
2762-
}
2792+
}

0 commit comments

Comments
 (0)