File tree Expand file tree Collapse file tree 4 files changed +23
-3
lines changed Expand file tree Collapse file tree 4 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22ADC_VERSION=" v0.3.0"
3- ADC_LAST_COMMIT=" a4e1a87c70f8289cfd228f076ff783563c960dea "
3+ ADC_LAST_COMMIT=" 3d87e045974500038f0d5dc50084d7872fd2c4bb "
44USER_CONFIG=" $HOME /.appdynamics/adc/config.sh"
55GLOBAL_CONFIG=" /etc/appdynamics/adc/config.sh"
66CONFIG_CONTROLLER_COOKIE_LOCATION=" /tmp/appdynamics-controller-cookie.txt"
@@ -338,7 +338,7 @@ function controller_login {
338338 COMMAND_RESULT=" Controller Login Error! Please check hostname and credentials"
339339 CONTROLLER_LOGIN_STATUS=0
340340 fi
341- XCSRFTOKEN=$( tail -1 $CONFIG_CONTROLLER_COOKIE_LOCATION | awk ' NF>1{print $NF}' )
341+ XCSRFTOKEN=$( grep " X-CSRF-TOKEN " $CONFIG_CONTROLLER_COOKIE_LOCATION | awk ' NF>1{print $NF}' )
342342 debug " XCSRFTOKEN: $XCSRFTOKEN "
343343}
344344register controller_login Login to your controller
@@ -589,6 +589,13 @@ register bt_list List all business transactions for a given application
589589describe bt_list << EOF
590590List all business transactions for a given application. Provide the application id as parameter.
591591EOF
592+ function server_list {
593+ apiCall -X GET " /controller/sim/v2/user/machines" " $@ "
594+ }
595+ register server_list List all servers
596+ describe server_list << EOF
597+ List all servers
598+ EOF
592599function tier_list {
593600 apiCall -X GET " /controller/rest/applications/\$ {a}/tiers" " $@ "
594601}
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ function controller_login {
1313 COMMAND_RESULT=" Controller Login Error! Please check hostname and credentials"
1414 CONTROLLER_LOGIN_STATUS=0
1515 fi
16- XCSRFTOKEN=$( tail -1 $CONFIG_CONTROLLER_COOKIE_LOCATION | awk ' NF>1{print $NF}' )
16+ XCSRFTOKEN=$( grep " X-CSRF-TOKEN " $CONFIG_CONTROLLER_COOKIE_LOCATION | awk ' NF>1{print $NF}' )
1717 debug " XCSRFTOKEN: $XCSRFTOKEN "
1818}
1919
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ function server_list {
4+ apiCall -X GET " /controller/sim/v2/user/machines" " $@ "
5+ }
6+
7+ register server_list List all servers
8+
9+ describe server_list << EOF
10+ List all servers
11+ EOF
Original file line number Diff line number Diff line change @@ -72,6 +72,8 @@ source ./commands/application/export.sh
7272
7373source ./commands/bt/list.sh
7474
75+ source ./commands/server/list.sh
76+
7577source ./commands/tier/list.sh
7678source ./commands/tier/get.sh
7779source ./commands/tier/nodes.sh
You can’t perform that action at this time.
0 commit comments