PageRenderTime 86ms CodeModel.GetById 38ms RepoModel.GetById 2ms app.codeStats 0ms

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

https://bitbucket.org/ldassonville/openesb-core
Korn Shell | 364 lines | 277 code | 49 blank | 38 comment | 0 complexity | 283aeb076fbb95c195b17071839695bc 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. cleanup domain
  36. }
  37. #----------------------------------------------------------------------------------
  38. # Main function called that will run the test
  39. #----------------------------------------------------------------------------------
  40. run_test()
  41. {
  42. initilize_test
  43. # Clean up the (Remove uninstall everything so this regression test will work
  44. test_cleanup
  45. echo ""
  46. echo "-------------------------------------------------------------------"
  47. echo " Install shared library cli_test_sns1 to the domain"
  48. echo "-------------------------------------------------------------------"
  49. echo "install-jbi-shared-library cli-test-sns1.jar"
  50. $AS8BASE/bin/asadmin install-jbi-shared-library --target=domain --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS $UI_REGRESS_DIST_DIR/cli-test-sns1.jar
  51. echo ""
  52. echo "-------------------------------------------------------------------"
  53. echo " Install binding component cli_test_binding1 to the domain"
  54. echo "-------------------------------------------------------------------"
  55. echo "install-jbi-component cli-test-binding1.jar"
  56. $AS8BASE/bin/asadmin install-jbi-component --target=domain --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS $UI_REGRESS_DIST_DIR/cli-test-binding1.jar
  57. echo ""
  58. echo "-------------------------------------------------------------------"
  59. echo " Install service engine cli_test_engine1 to the domain"
  60. echo "-------------------------------------------------------------------"
  61. echo "install-jbi-component cli-test-engine1.jar"
  62. $AS8BASE/bin/asadmin install-jbi-component --target=domain --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS $UI_REGRESS_DIST_DIR/cli-test-engine1.jar
  63. echo ""
  64. echo "-------------------------------------------------------------------"
  65. echo " Deploy Service Assembly cli_test_assembly_unit_1 to the domain target"
  66. echo "-------------------------------------------------------------------"
  67. echo "deploy-jbi-service-assembly --target=domain cli-test-au1.zip"
  68. $AS8BASE/bin/asadmin deploy-jbi-service-assembly --target=domain --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS $UI_REGRESS_DIST_DIR/cli-test-au1.zip
  69. echo ""
  70. echo "-------------------------------------------------------------------"
  71. echo " List the service engines from the domain"
  72. echo "-------------------------------------------------------------------"
  73. echo "list-jbi-service-engines --target=domain"
  74. $AS8BASE/bin/asadmin list-jbi-service-engines --target=domain --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  75. echo ""
  76. echo "-------------------------------------------------------------------"
  77. echo " List the binding components from the domain"
  78. echo "-------------------------------------------------------------------"
  79. echo "list-jbi-binding-components --target=domain"
  80. $AS8BASE/bin/asadmin list-jbi-binding-components --target=domain --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  81. echo ""
  82. echo "-------------------------------------------------------------------"
  83. echo " List the shared libraries from the domain"
  84. echo "-------------------------------------------------------------------"
  85. echo "list-jbi-shared-libraries --target=domain"
  86. $AS8BASE/bin/asadmin list-jbi-shared-libraries --target=domain --componentname=cli_test_binding1 --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  87. echo ""
  88. echo "-------------------------------------------------------------------"
  89. echo " List the service assemblies from the domain"
  90. echo "-------------------------------------------------------------------"
  91. echo "list-jbi-service-assemblies --target=domain"
  92. $AS8BASE/bin/asadmin list-jbi-service-assemblies --target=domain --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  93. echo ""
  94. echo "-------------------------------------------------------------------"
  95. echo " Install the Shared Library from the domain to the server"
  96. echo "-------------------------------------------------------------------"
  97. echo "install-jbi-shared-library --target=server cli_test_sns1"
  98. $AS8BASE/bin/asadmin install-jbi-shared-library --target=server --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_sns1
  99. echo ""
  100. echo "-------------------------------------------------------------------"
  101. echo " Install the components from the domain to the server"
  102. echo "-------------------------------------------------------------------"
  103. echo "install-jbi-component --target=server cli_test_binding1"
  104. $AS8BASE/bin/asadmin install-jbi-component --target=server --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding1
  105. echo "install-jbi-component --target=server cli_test_engine1"
  106. $AS8BASE/bin/asadmin install-jbi-component --target=server --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_engine1
  107. echo ""
  108. echo "-------------------------------------------------------------------"
  109. echo " Show the components on the server, should be in the Shut Down state"
  110. echo "-------------------------------------------------------------------"
  111. echo "show-jbi-binding-component cli_test_binding1"
  112. $AS8BASE/bin/asadmin show-jbi-binding-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding1
  113. echo "show-jbi-service-engine cli_test_engine1"
  114. $AS8BASE/bin/asadmin show-jbi-service-engine --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_engine1
  115. echo ""
  116. echo "-------------------------------------------------------------------"
  117. echo " Start the Components on the server"
  118. echo "-------------------------------------------------------------------"
  119. echo "start-jbi-component cli_test_binding1"
  120. $AS8BASE/bin/asadmin start-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding1
  121. echo "start-jbi-component cli_test_engine1"
  122. $AS8BASE/bin/asadmin start-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_engine1
  123. echo ""
  124. echo "-------------------------------------------------------------------"
  125. echo " Show the components on the server"
  126. echo "-------------------------------------------------------------------"
  127. echo "show-jbi-binding-component --target=server cli_test_binding1"
  128. $AS8BASE/bin/asadmin show-jbi-binding-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding1
  129. echo "show-jbi-service-engine --target=server cli_test_engine1"
  130. $AS8BASE/bin/asadmin show-jbi-service-engine --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_engine1
  131. echo ""
  132. echo "-------------------------------------------------------------------"
  133. echo " Show the components on the domaine"
  134. echo "-------------------------------------------------------------------"
  135. echo "show-jbi-binding-component --target=domain cli_test_binding1"
  136. $AS8BASE/bin/asadmin show-jbi-binding-component --target=domain --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding1
  137. echo "show-jbi-service-engine --target=domain cli_test_engine1"
  138. $AS8BASE/bin/asadmin show-jbi-service-engine --target=domain --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_engine1
  139. echo ""
  140. echo "-------------------------------------------------------------------"
  141. echo " List the Service Assemblies from the server and from the domain "
  142. echo "-------------------------------------------------------------------"
  143. echo "list-jbi-service-assemblies --target=server cli_test_assembly_unit_1"
  144. $AS8BASE/bin/asadmin list-jbi-service-assemblies --target=server --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  145. echo "list-jbi-service-assemblies --target=domain cli_test_assembly_unit_1"
  146. $AS8BASE/bin/asadmin list-jbi-service-assemblies --target=domain --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  147. echo ""
  148. echo "-------------------------------------------------------------------"
  149. echo " Deploy Service Assembly cli_test_assembly_unit_1 from the domain to the server"
  150. echo "-------------------------------------------------------------------"
  151. echo "deploy-jbi-service-assembly --target=server cli_test_assembly_unit_1"
  152. $AS8BASE/bin/asadmin deploy-jbi-service-assembly --target=server --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_assembly_unit_1
  153. echo ""
  154. echo "-------------------------------------------------------------------"
  155. echo " List the Service Assemblies from the server and from the domain"
  156. echo "-------------------------------------------------------------------"
  157. echo "list-jbi-service-assemblies --target=server cli_test_assembly_unit_1"
  158. $AS8BASE/bin/asadmin list-jbi-service-assemblies --target=server --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  159. echo "list-jbi-service-assemblies --target=domain cli_test_assembly_unit_1"
  160. $AS8BASE/bin/asadmin list-jbi-service-assemblies --target=domain --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  161. echo ""
  162. echo "-------------------------------------------------------------------"
  163. echo " Undeploy Service Assembly from the server, but --keeparchive cli_test_assembly_unit_1"
  164. echo "-------------------------------------------------------------------"
  165. echo "undeploy-jbi-service-assembly --keeparchive cli_test_assembly_unit_1"
  166. $AS8BASE/bin/asadmin undeploy-jbi-service-assembly --keeparchive --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_assembly_unit_1
  167. echo ""
  168. echo "-------------------------------------------------------------------"
  169. echo " List the Service Assemblies from the server and the domain"
  170. echo "-------------------------------------------------------------------"
  171. echo "list-jbi-service-assemblies --target=server cli_test_assembly_unit_1"
  172. $AS8BASE/bin/asadmin list-jbi-service-assemblies --target=server --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  173. echo "list-jbi-service-assemblies --target=domain cli_test_assembly_unit_1"
  174. $AS8BASE/bin/asadmin list-jbi-service-assemblies --target=domain --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  175. echo ""
  176. echo "-------------------------------------------------------------------"
  177. echo " Undeploy Service Assembly cli_test_assembly_unit_1 from the domain"
  178. echo "-------------------------------------------------------------------"
  179. echo "undeploy-jbi-service-assembly --target=domain cli_test_assembly_unit_1"
  180. $AS8BASE/bin/asadmin undeploy-jbi-service-assembly --target=domain --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_assembly_unit_1
  181. echo ""
  182. echo "-------------------------------------------------------------------"
  183. echo " List the Service Assemblies from the server and domain"
  184. echo "-------------------------------------------------------------------"
  185. echo "list-jbi-service-assemblies --target=server cli_test_assembly_unit_1"
  186. $AS8BASE/bin/asadmin list-jbi-service-assemblies --target=server --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  187. echo "list-jbi-service-assemblies --target=domain cli_test_assembly_unit_1"
  188. $AS8BASE/bin/asadmin list-jbi-service-assemblies --target=domain --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS
  189. echo ""
  190. echo "-------------------------------------------------------------------"
  191. echo " Stop the Components on the server"
  192. echo "-------------------------------------------------------------------"
  193. echo "stop-jbi-component cli_test_binding1"
  194. $AS8BASE/bin/asadmin stop-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding1
  195. echo "stop-jbi-component cli_test_engine1"
  196. $AS8BASE/bin/asadmin stop-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_engine1
  197. echo ""
  198. echo "-------------------------------------------------------------------"
  199. echo " Show the components on the server"
  200. echo "-------------------------------------------------------------------"
  201. echo "show-jbi-binding-component --target=server cli_test_binding1"
  202. $AS8BASE/bin/asadmin show-jbi-binding-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding1
  203. echo "show-jbi-service-engine --target=server cli_test_engine1"
  204. $AS8BASE/bin/asadmin show-jbi-service-engine --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_engine1
  205. echo ""
  206. echo "-------------------------------------------------------------------"
  207. echo " Shut Down the Components on the server"
  208. echo "-------------------------------------------------------------------"
  209. echo "shut-down-jbi-component cli_test_binding1"
  210. $AS8BASE/bin/asadmin shut-down-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding1
  211. echo "shut-down--jbi-component cli_test_engine1"
  212. $AS8BASE/bin/asadmin shut-down-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_engine1
  213. echo ""
  214. echo "-------------------------------------------------------------------"
  215. echo " Show the components on the server"
  216. echo "-------------------------------------------------------------------"
  217. echo "show-jbi-binding-component --target=server cli_test_binding1"
  218. $AS8BASE/bin/asadmin show-jbi-binding-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding1
  219. echo "show-jbi-service-engine --target=server cli_test_engine1"
  220. $AS8BASE/bin/asadmin show-jbi-service-engine --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_engine1
  221. echo ""
  222. echo "-------------------------------------------------------------------"
  223. echo " Uninstall the Components from the server"
  224. echo "-------------------------------------------------------------------"
  225. echo "uninstall-jbi-component --keeparchive cli_test_binding1"
  226. $AS8BASE/bin/asadmin uninstall-jbi-component --keeparchive --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding1
  227. echo "uninstall-jbi-component --keeparchive cli_test_engine1"
  228. $AS8BASE/bin/asadmin uninstall-jbi-component --keeparchive --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_engine1
  229. echo ""
  230. echo "-------------------------------------------------------------------"
  231. echo " Show the components on the server"
  232. echo "-------------------------------------------------------------------"
  233. echo "show-jbi-binding-component --target=server cli_test_binding1"
  234. $AS8BASE/bin/asadmin show-jbi-binding-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding1
  235. echo "show-jbi-service-engine --target=server cli_test_engine1"
  236. $AS8BASE/bin/asadmin show-jbi-service-engine --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_engine1
  237. echo ""
  238. echo "-------------------------------------------------------------------"
  239. echo " Install the components from the domain to the server"
  240. echo "-------------------------------------------------------------------"
  241. echo "install-jbi-component --target=server cli_test_binding1"
  242. $AS8BASE/bin/asadmin install-jbi-component --target=server --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding1
  243. echo "install-jbi-component --target=server cli_test_engine1"
  244. $AS8BASE/bin/asadmin install-jbi-component --target=server --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_engine1
  245. echo ""
  246. echo "-------------------------------------------------------------------"
  247. echo " Show the components on the server"
  248. echo "-------------------------------------------------------------------"
  249. echo "show-jbi-binding-component --target=server cli_test_binding1"
  250. $AS8BASE/bin/asadmin show-jbi-binding-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding1
  251. echo "show-jbi-service-engine --target=server cli_test_engine1"
  252. $AS8BASE/bin/asadmin show-jbi-service-engine --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_engine1
  253. echo ""
  254. echo "-------------------------------------------------------------------"
  255. echo " Show the components on the domain"
  256. echo "-------------------------------------------------------------------"
  257. echo "show-jbi-binding-component --target=domain cli_test_binding1"
  258. $AS8BASE/bin/asadmin show-jbi-binding-component --target=domain --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding1
  259. echo "show-jbi-service-engine --target=domain cli_test_engine1"
  260. $AS8BASE/bin/asadmin show-jbi-service-engine --target=domain --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_engine1
  261. echo ""
  262. echo "-------------------------------------------------------------------"
  263. echo " Uninstall the Components from the server and domain"
  264. echo "-------------------------------------------------------------------"
  265. echo "uninstall-jbi-component cli_test_binding1"
  266. $AS8BASE/bin/asadmin uninstall-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding1
  267. echo "uninstall-jbi-component cli_test_engine1"
  268. $AS8BASE/bin/asadmin uninstall-jbi-component --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_engine1
  269. echo ""
  270. echo "-------------------------------------------------------------------"
  271. echo " Show the components on the domain"
  272. echo "-------------------------------------------------------------------"
  273. echo "show-jbi-binding-component --target=domain cli_test_binding1"
  274. $AS8BASE/bin/asadmin show-jbi-binding-component --target=domain --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_binding1
  275. echo "show-jbi-service-engine --target=domain cli_test_engine1"
  276. $AS8BASE/bin/asadmin show-jbi-service-engine --target=domain --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_engine1
  277. echo ""
  278. echo "-------------------------------------------------------------------"
  279. echo " Uninstall the Shared Libraries from the server"
  280. echo "-------------------------------------------------------------------"
  281. echo "uninstall-jbi-shared-library --keeparchive cli_test_sns1"
  282. $AS8BASE/bin/asadmin uninstall-jbi-shared-library --keeparchive --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_sns1
  283. echo ""
  284. echo "-------------------------------------------------------------------"
  285. echo " List Shared Libraries"
  286. echo "-------------------------------------------------------------------"
  287. echo "list-jbi-shared-libraries --target=server"
  288. $AS8BASE/bin/asadmin list-jbi-shared-libraries --target=server --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS | grep cli_test_sns1
  289. echo ""
  290. echo "-------------------------------------------------------------------"
  291. echo " List Shared Libraries"
  292. echo "-------------------------------------------------------------------"
  293. echo "list-jbi-shared-libraries --target=domain"
  294. $AS8BASE/bin/asadmin list-jbi-shared-libraries --target=domain --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS | grep cli_test_sns1
  295. echo ""
  296. echo "-------------------------------------------------------------------"
  297. echo " Uninstall the Shared Libraries from the domain"
  298. echo "-------------------------------------------------------------------"
  299. echo "uninstall-jbi-shared-library --target=domain cli_test_sns1"
  300. $AS8BASE/bin/asadmin uninstall-jbi-shared-library --target=domain --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS cli_test_sns1
  301. echo ""
  302. echo "-------------------------------------------------------------------"
  303. echo " List Shared Libraries"
  304. echo "-------------------------------------------------------------------"
  305. echo "list-jbi-shared-libraries --target=domain"
  306. $AS8BASE/bin/asadmin list-jbi-shared-libraries --target=domain --port $ADMIN_PORT --user $ADMIN_USER $ASADMIN_PW_OPTS | grep cli_test_sns1
  307. }
  308. #----------------------------------------------------------------------------------
  309. # Perform the regression setup and call the function that will run the test
  310. #----------------------------------------------------------------------------------
  311. TEST_NAME="jbi-admin-cli00004"
  312. TEST_DESCRIPTION="Test Install, Deploy, Lifecycle and Show commands on server and domain targets."
  313. . ./regress_defs.ksh
  314. run_test
  315. exit 0