Skip to content

Commit 2bc68bc

Browse files
committed
Further fixes for apiCall changes
1 parent 765cefb commit 2bc68bc

File tree

9 files changed

+21
-17
lines changed

9 files changed

+21
-17
lines changed

act.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
ACT_VERSION="v0.4.0"
3-
ACT_LAST_COMMIT="2552f1fb18d9c714f3aeb8c51342eff87ddd418d"
3+
ACT_LAST_COMMIT="765cefbe0ecc88542b08cc2ec8f02fc69846aa2c"
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"
@@ -1049,14 +1049,14 @@ describe node_markhistorical << EOF
10491049
Mark Nodes as Historical. Provide a comma separated list of node ids.
10501050
EOF
10511051
function node_get {
1052-
apiCall -X GET "/controller/rest/applications/\{{a}}/nodes/\{{n}}" "$@"
1052+
apiCall -X GET '/controller/rest/applications/{{a}}/nodes/{{n}}' "$@"
10531053
}
10541054
register node_get Retrieve Node Information by Node Name
10551055
describe node_get << EOF
10561056
Retrieve Node Information by Node Name. Provide the application and the node as parameters
10571057
EOF
10581058
function node_list {
1059-
apiCall -X GET "/controller/rest/applications/\{{a}}/nodes" "$@"
1059+
apiCall -X GET '/controller/rest/applications/{{a}}/nodes' "$@"
10601060
}
10611061
register node_list Retrieve Node Information for All Nodes in a Business Application
10621062
describe node_list << EOF
@@ -1290,7 +1290,7 @@ Copy healthrules from one application to another. Provide the source application
12901290
If you provide ("-n") only the named health rule will be copied.
12911291
EOF
12921292
function event_create {
1293-
apiCall -X POST "/controller/rest/applications/\{{a}}/events?summary=\{{s}}&comment=\{{c?}}&eventtype=\{{e}}&severity=\{{l}}&bt=&\{{b?}}node=\{{n?}}&tier=\{{t?}}" "$@"
1293+
apiCall -X POST "/controller/rest/applications/{{a}}/events?summary={{s}}&comment={{c?}}&eventtype={{e}}&severity={{l}}&bt=&{{b?}}node={{n?}}&tier={{t?}}" "$@"
12941294
}
12951295
register event_create Create a custom event for a given application
12961296
describe event_create << EOF
@@ -1398,21 +1398,21 @@ describe bizjourney_list << EOF
13981398
List all business journeys. This command requires no further arguments.
13991399
EOF
14001400
function tier_nodes {
1401-
apiCall -X GET "/controller/rest/applications/\{{a}}/tiers/\{{t}}/nodes" "$@"
1401+
apiCall -X GET '/controller/rest/applications/{{a}}/tiers/{{t}}/nodes' "$@"
14021402
}
14031403
register tier_nodes" Retrieve Node Information for All Nodes in a Tier"
14041404
describe tier_nodes << EOF
14051405
Retrieve Node Information for All Nodes in a Tier. Provide the application and the tier as parameters
14061406
EOF
14071407
function tier_get {
1408-
apiCall -X GET "/controller/rest/applications/\{{a}}/tiers/\{{t}}" "$@"
1408+
apiCall -X GET '/controller/rest/applications/{{a}}/tiers/{{t}}' "$@"
14091409
}
14101410
register tier_get Retrieve Tier Information by Tier Name
14111411
describe tier_get << EOF
14121412
Retrieve Tier Information by Tier Name. Provide the application and the tier as parameters
14131413
EOF
14141414
function tier_list {
1415-
apiCall -X GET "/controller/rest/applications/\{{a}}/tiers" "$@"
1415+
apiCall -X GET '/controller/rest/applications/{{a}}/tiers' "$@"
14161416
}
14171417
register tier_list List all tiers for a given application
14181418
describe tier_list << EOF

commands/event/create.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
function event_create {
4-
apiCall -X POST "/controller/rest/applications/\{{a}}/events?summary=\{{s}}&comment=\{{c?}}&eventtype=\{{e}}&severity=\{{l}}&bt=&\{{b?}}node=\{{n?}}&tier=\{{t?}}" "$@"
4+
apiCall -X POST "/controller/rest/applications/{{a}}/events?summary={{s}}&comment={{c?}}&eventtype={{e}}&severity={{l}}&bt=&{{b?}}node={{n?}}&tier={{t?}}" "$@"
55
}
66

77
register event_create Create a custom event for a given application

commands/node/get.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
function node_get {
4-
apiCall -X GET "/controller/rest/applications/\{{a}}/nodes/\{{n}}" "$@"
4+
apiCall -X GET '/controller/rest/applications/{{a}}/nodes/{{n}}' "$@"
55
}
66

77
register node_get Retrieve Node Information by Node Name

commands/node/list.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
function node_list {
4-
apiCall -X GET "/controller/rest/applications/\{{a}}/nodes" "$@"
4+
apiCall -X GET '/controller/rest/applications/{{a}}/nodes' "$@"
55
}
66

77
register node_list Retrieve Node Information for All Nodes in a Business Application

commands/tier/get.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
function tier_get {
4-
apiCall -X GET "/controller/rest/applications/\{{a}}/tiers/\{{t}}" "$@"
4+
apiCall -X GET '/controller/rest/applications/{{a}}/tiers/{{t}}' "$@"
55
}
66

77
register tier_get Retrieve Tier Information by Tier Name

commands/tier/list.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
function tier_list {
4-
apiCall -X GET "/controller/rest/applications/\{{a}}/tiers" "$@"
4+
apiCall -X GET '/controller/rest/applications/{{a}}/tiers' "$@"
55
}
66

77
register tier_list List all tiers for a given application

commands/tier/nodes.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
function tier_nodes {
4-
apiCall -X GET "/controller/rest/applications/\{{a}}/tiers/\{{t}}/nodes" "$@"
4+
apiCall -X GET '/controller/rest/applications/{{a}}/tiers/{{t}}/nodes' "$@"
55
}
66

77
register tier_nodes" Retrieve Node Information for All Nodes in a Tier"

test.sh

+7-4
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,13 @@ if [[ $CREATE_APPLICATION =~ \"id\"\ \:\ ([0-9]+) ]] ; then
8484
APPLICATION_ID=${BASH_REMATCH[1]}
8585

8686
##### List different entities #####
87-
assert_contains_substring "<applications>" "`${ACT} application list`"
88-
assert_contains_substring "<tiers>" "`${ACT} tier list -a $APPLICATION_ID`"
89-
assert_contains_substring "<business-transactions>" "`${ACT} bt list -a $APPLICATION_ID`"
90-
assert_contains_substring "<nodes>" "`${ACT} node list -a $APPLICATION_ID`"
87+
assert_contains_substring "<applications>" "`${ACT} application list`" "List Applications"
88+
assert_contains_substring "<tiers>" "`${ACT} tier list -a $APPLICATION_ID`" "List Tiers"
89+
assert_contains_substring "<business-transactions>" "`${ACT} bt list -a $APPLICATION_ID`" "List BTs"
90+
assert_contains_substring "<nodes>" "`${ACT} node list -a $APPLICATION_ID`" "List Nodes"
91+
92+
##### Run exports #####
93+
assert_contains_substring "<rule" "`${ACT} application export -a $APPLICATION_ID`" "Export Application"
9194

9295
##### Database Collector Create, List, Get, Delete #####
9396
DBMON_NAME="act_test_collector_$RANDOM"

ysh

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#! /bin/bash
2+
# YSH from https://github.com/azohra/yaml.sh
23
YSH_version='0.1.4'
34
# Modified version of YSH. join_stack uses _ instead of . and adds y_ as a prefix to every line.
45
YAML_AWK_PARSER='

0 commit comments

Comments
 (0)