PageRenderTime 73ms CodeModel.GetById 29ms RepoModel.GetById 2ms app.codeStats 0ms

/ri-clients/jbi-admin-cli/regress/jbi-admin-cli00003.ksh

https://bitbucket.org/ldassonville/openesb-core
Korn Shell | 295 lines | 216 code | 41 blank | 38 comment | 0 complexity | 431d3219c0c9b564bf56a85614829620 MD5 | raw file
  1. #!/bin/sh
  2. #
  3. # BEGIN_HEADER - DO NOT EDIT
  4. #
  5. # The contents of this file are subject to the terms
  6. # of the Common Development and Distribution License
  7. # (the "License"). You may not use this file except
  8. # in compliance with the License.
  9. #
  10. # You can obtain a copy of the license at
  11. # https://open-esb.dev.java.net/public/CDDLv1.0.html.
  12. # See the License for the specific language governing
  13. # permissions and limitations under the License.
  14. #
  15. # When distributing Covered Code, include this CDDL
  16. # HEADER in each file and include the License file at
  17. # https://open-esb.dev.java.net/public/CDDLv1.0.html.
  18. # If applicable add the following below this CDDL HEADER,
  19. # with the fields enclosed by brackets "[]" replaced with
  20. # your own identifying information: Portions Copyright
  21. # [year] [name of copyright owner]
  22. #
  23. #
  24. # @(#)jbi-admin-cli00001.ksh
  25. # Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
  26. #
  27. # END_HEADER - DO NOT EDIT
  28. #
  29. #----------------------------------------------------------------------------------
  30. # Perform any necessary cleanup to restore the repository back to its initial state.
  31. #----------------------------------------------------------------------------------
  32. test_cleanup()
  33. {
  34. cleanup server
  35. }
  36. #----------------------------------------------------------------------------------
  37. # Main function called that will run the test
  38. #----------------------------------------------------------------------------------
  39. run_test()
  40. {
  41. initilize_test
  42. # Clean up the (Remove uninstall everything so this regression test will work
  43. test_cleanup
  44. echo ""
  45. echo "-------------------------------------------------------------------"
  46. echo " Install shared library cli_test_sns1"
  47. echo "-------------------------------------------------------------------"
  48. echo "install-jbi-shared-library cli-test-sns1.jar"
  49. $AS8BASE/bin/asadmin install-jbi-shared-library --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS $UI_REGRESS_DIST_DIR/cli-test-sns1.jar
  50. echo ""
  51. echo "-------------------------------------------------------------------"
  52. echo " Install shared library cli_test_sns2"
  53. echo "-------------------------------------------------------------------"
  54. echo "install-jbi-shared-library cli-test-sns2.jar"
  55. $AS8BASE/bin/asadmin install-jbi-shared-library --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS $UI_REGRESS_DIST_DIR/cli-test-sns2.jar
  56. echo ""
  57. echo "-------------------------------------------------------------------"
  58. echo " Install binding component cli_test_binding1"
  59. echo "-------------------------------------------------------------------"
  60. echo "install-jbi-component cli-test-binding1.jar"
  61. $AS8BASE/bin/asadmin install-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS $UI_REGRESS_DIST_DIR/cli-test-binding1.jar
  62. echo ""
  63. echo "-------------------------------------------------------------------"
  64. echo " Install binding component cli_test_binding2"
  65. echo "-------------------------------------------------------------------"
  66. echo "install-jbi-component cli-test-binding2.jar"
  67. $AS8BASE/bin/asadmin install-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS $UI_REGRESS_DIST_DIR/cli-test-binding2.jar
  68. echo ""
  69. echo "-------------------------------------------------------------------"
  70. echo " Install service engine cli_test_engine1"
  71. echo "-------------------------------------------------------------------"
  72. echo "install-jbi-component cli-test-engine1.jar"
  73. $AS8BASE/bin/asadmin install-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS $UI_REGRESS_DIST_DIR/cli-test-engine1.jar
  74. echo ""
  75. echo "-------------------------------------------------------------------"
  76. echo " Install service engine cli_test_engine2"
  77. echo "-------------------------------------------------------------------"
  78. echo "install-jbi-component cli-test-engine2.jar"
  79. $AS8BASE/bin/asadmin install-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS $UI_REGRESS_DIST_DIR/cli-test-engine2.jar
  80. echo ""
  81. echo "-------------------------------------------------------------------"
  82. echo " Start the binding component cli_test_binding1"
  83. echo "-------------------------------------------------------------------"
  84. echo "start-jbi-component cli_test_binding1"
  85. $AS8BASE/bin/asadmin start-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding1
  86. echo ""
  87. echo "-------------------------------------------------------------------"
  88. echo " Start the binding component cli_test_binding2"
  89. echo "-------------------------------------------------------------------"
  90. echo "start-jbi-component cli_test_binding2"
  91. $AS8BASE/bin/asadmin start-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding2
  92. echo ""
  93. echo "-------------------------------------------------------------------"
  94. echo " Stop the binding component cli_test_binding2"
  95. echo "-------------------------------------------------------------------"
  96. echo "start-jbi-component cli_test_binding2"
  97. $AS8BASE/bin/asadmin stop-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding2
  98. echo ""
  99. echo "-------------------------------------------------------------------"
  100. echo " Start the service engine cli_test_engine1"
  101. echo "-------------------------------------------------------------------"
  102. echo "start-jbi-component cli_test_engine1"
  103. $AS8BASE/bin/asadmin start-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_engine1
  104. echo ""
  105. echo "-------------------------------------------------------------------"
  106. echo " Shut Down the service engine cli_test_engine2"
  107. echo "-------------------------------------------------------------------"
  108. echo "shut-down-jbi-component cli_test_engine2"
  109. $AS8BASE/bin/asadmin shut-down-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_engine2
  110. echo ""
  111. echo "-------------------------------------------------------------------"
  112. echo " Deploy Service Assembly: cli_test_assembly_unit_1"
  113. echo "-------------------------------------------------------------------"
  114. echo "deploy-jbi-service-assembly cli-test-au1.zip"
  115. $AS8BASE/bin/asadmin deploy-jbi-service-assembly --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS $UI_REGRESS_DIST_DIR/cli-test-au1.zip
  116. echo ""
  117. echo "-------------------------------------------------------------------"
  118. echo " List the Service Engines Filtering on the lifecyclestate"
  119. echo "-------------------------------------------------------------------"
  120. echo "list-jbi-service-engines --lifecyclestate=started | grep cli_test_engine1"
  121. $AS8BASE/bin/asadmin list-jbi-service-engines --lifecyclestate=started --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS | grep cli_test_engine1
  122. echo ""
  123. echo "list-jbi-service-engines --lifecyclestate=shutdown | grep cli_test_engine2"
  124. $AS8BASE/bin/asadmin list-jbi-service-engines --lifecyclestate=shutdown --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS | grep cli_test_engine2
  125. echo ""
  126. echo "list-jbi-service-engines --lifecyclestate=stopped | grep cli_test_engine1"
  127. $AS8BASE/bin/asadmin list-jbi-service-engines --lifecyclestate=stopped --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS | grep cli_test_engine1
  128. echo ""
  129. echo "list-jbi-service-engines --lifecyclestate=stopped | grep cli_test_engine2"
  130. $AS8BASE/bin/asadmin list-jbi-service-engines --lifecyclestate=stopped --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS | grep cli_test_engine2
  131. echo ""
  132. echo "-------------------------------------------------------------------"
  133. echo " List the Binding Components Filtering on the lifecyclestate"
  134. echo "-------------------------------------------------------------------"
  135. echo "list-jbi-binding-components --lifecyclestate=started | grep cli_test_binding1"
  136. $AS8BASE/bin/asadmin list-jbi-binding-components --lifecyclestate=started --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS | grep cli_test_binding1
  137. echo ""
  138. echo "list-jbi-binding-components --lifecyclestate=stopped | grep cli_test_binding2"
  139. $AS8BASE/bin/asadmin list-jbi-binding-components --lifecyclestate=stopped --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS | grep cli_test_binding2
  140. echo ""
  141. echo "list-jbi-binding-components --lifecyclestate=shutdown | grep cli_test_binding1"
  142. $AS8BASE/bin/asadmin list-jbi-binding-components --lifecyclestate=shutdown --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS | grep cli_test_binding1
  143. echo ""
  144. echo "list-jbi-binding-components --lifecyclestate=shutdown | grep cli_test_binding2"
  145. $AS8BASE/bin/asadmin list-jbi-binding-components --lifecyclestate=shutdown --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS | grep cli_test_binding2
  146. echo ""
  147. echo "-------------------------------------------------------------------"
  148. echo " List the Service Assemblies Filtering on the lifecyclestate"
  149. echo "-------------------------------------------------------------------"
  150. echo "list-jbi-service-assemblies --lifecyclestate=started | grep cli_test_assembly_unit_1"
  151. $AS8BASE/bin/asadmin list-jbi-service-assemblies --lifecyclestate=started --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS | grep cli_test_assembly_unit_1
  152. echo ""
  153. echo "list-jbi-service-assemblies --lifecyclestate=stopped | grep cli_test_assembly_unit_1"
  154. $AS8BASE/bin/asadmin list-jbi-service-assemblies --lifecyclestate=stopped --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS | grep cli_test_assembly_unit_1
  155. echo ""
  156. echo "list-jbi-service-assemblies --lifecyclestate=shutdown | grep cli_test_assembly_unit_1"
  157. $AS8BASE/bin/asadmin list-jbi-service-assemblies --lifecyclestate=shutdown --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS | grep cli_test_assembly_unit_1
  158. echo ""
  159. echo "-------------------------------------------------------------------"
  160. echo " List the Shared Libraries Filtering on the componentname cli_test_binding1"
  161. echo "-------------------------------------------------------------------"
  162. echo "list-jbi-shared-libraries --componentname=cli_test_binding1"
  163. $AS8BASE/bin/asadmin list-jbi-shared-libraries --componentname=cli_test_binding1 --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  164. echo ""
  165. echo "-------------------------------------------------------------------"
  166. echo " List the Shared Libraries Filtering on the componentname cli_test_binding2"
  167. echo "-------------------------------------------------------------------"
  168. echo "list-jbi-shared-libraries --componentname=cli_test_binding2"
  169. $AS8BASE/bin/asadmin list-jbi-shared-libraries --componentname=cli_test_binding2 --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  170. echo ""
  171. echo "-------------------------------------------------------------------"
  172. echo " List the Service Assemblies Filtering on the componentname cli_test_binding2"
  173. echo "-------------------------------------------------------------------"
  174. echo "list-jbi-service-assemblies --componentname=cli_test_binding2"
  175. $AS8BASE/bin/asadmin list-jbi-service-assemblies --componentname=cli_test_binding2 --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  176. echo ""
  177. echo "-------------------------------------------------------------------"
  178. echo " List the Service Engines Filtering on the libraryname"
  179. echo "-------------------------------------------------------------------"
  180. echo "list-jbi-service-engines --libraryname=cli_test_sns1"
  181. $AS8BASE/bin/asadmin list-jbi-service-engines --libraryname=cli_test_sns1 --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  182. echo ""
  183. echo "-------------------------------------------------------------------"
  184. echo " List the Binding Components Filtering on the libraryname"
  185. echo "-------------------------------------------------------------------"
  186. echo "list-jbi-binding-components --libraryname=cli_test_sns1"
  187. $AS8BASE/bin/asadmin list-jbi-binding-components --libraryname=cli_test_sns1 --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  188. echo ""
  189. echo "-------------------------------------------------------------------"
  190. echo " List the Service Engines Filtering on the assemblyname"
  191. echo "-------------------------------------------------------------------"
  192. echo "list-jbi-service-engines --assemblyname=cli_test_assembly_unit_1"
  193. $AS8BASE/bin/asadmin list-jbi-service-engines --assemblyname=cli_test_assembly_unit_1 --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  194. echo ""
  195. echo "-------------------------------------------------------------------"
  196. echo " List the Binding Components Filtering on the assemblyname"
  197. echo "-------------------------------------------------------------------"
  198. echo "list-jbi-binding-components --assemblyname=cli_test_assembly_unit_1"
  199. $AS8BASE/bin/asadmin list-jbi-binding-components --assemblyname=cli_test_assembly_unit_1 --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  200. echo ""
  201. echo "-------------------------------------------------------------------"
  202. echo " Undeploy Service Assembly cli_test_assembly_unit_1"
  203. echo "-------------------------------------------------------------------"
  204. echo "undeploy-jbi-service-assembly cli_test_assembly_unit_1"
  205. $AS8BASE/bin/asadmin undeploy-jbi-service-assembly --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_assembly_unit_1
  206. echo ""
  207. echo "-------------------------------------------------------------------"
  208. echo " Stop the Components"
  209. echo "-------------------------------------------------------------------"
  210. echo "stop-jbi-component cli_test_binding1"
  211. $AS8BASE/bin/asadmin stop-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding1
  212. echo "stop-jbi-component cli_test_engine1"
  213. $AS8BASE/bin/asadmin stop-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_engine1
  214. echo ""
  215. echo "-------------------------------------------------------------------"
  216. echo " Shut Down the Components"
  217. echo "-------------------------------------------------------------------"
  218. echo "shut-down-jbi-component cli_test_binding1"
  219. $AS8BASE/bin/asadmin shut-down-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding1
  220. echo "shut-down-jbi-component cli_test_engine1"
  221. $AS8BASE/bin/asadmin shut-down-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_engine1
  222. echo "shut-down-jbi-component cli_test_binding1"
  223. $AS8BASE/bin/asadmin shut-down-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding2
  224. echo "shut-down-jbi-component cli_test_engine1"
  225. $AS8BASE/bin/asadmin shut-down-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_engine2
  226. echo ""
  227. echo "-------------------------------------------------------------------"
  228. echo " Uninstall the Components"
  229. echo "-------------------------------------------------------------------"
  230. echo "uninstall-jbi-component cli_test_binding1"
  231. $AS8BASE/bin/asadmin uninstall-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding1
  232. echo "uninstall-jbi-component cli_test_engine1"
  233. $AS8BASE/bin/asadmin uninstall-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_engine1
  234. echo "uninstall-jbi-component cli_test_binding2"
  235. $AS8BASE/bin/asadmin uninstall-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding2
  236. echo "uninstall-jbi-component cli_test_engine2"
  237. $AS8BASE/bin/asadmin uninstall-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_engine2
  238. echo ""
  239. echo "-------------------------------------------------------------------"
  240. echo " Uninstall the Shared Libraries"
  241. echo "-------------------------------------------------------------------"
  242. echo "uninstall-jbi-shared-library cli_test_sns1"
  243. $AS8BASE/bin/asadmin uninstall-jbi-shared-library --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_sns1
  244. echo "uninstall-jbi-shared-library cli_test_sns1"
  245. $AS8BASE/bin/asadmin uninstall-jbi-shared-library --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_sns2
  246. }
  247. #----------------------------------------------------------------------------------
  248. # Perform the regression setup and call the function that will run the test
  249. #----------------------------------------------------------------------------------
  250. TEST_NAME="jbi-admin-cli00003"
  251. TEST_DESCRIPTION="Test Lyfecycle and List Commands"
  252. . ./regress_defs.ksh
  253. run_test
  254. exit 0