Compare commits
393 Commits
Author | SHA1 | Date |
---|---|---|
Giancarlo Panichi | 166d8cca86 | |
Giancarlo Panichi | e1d88418be | |
Giancarlo Panichi | 033ce0b37b | |
Giancarlo Panichi | 4a5eb67f73 | |
Giancarlo Panichi | 65e4c9bdcc | |
Giancarlo Panichi | 57a11ad750 | |
Giancarlo Panichi | d624e5b998 | |
Giancarlo Panichi | e37603754e | |
Giancarlo Panichi | a5667a7c57 | |
Giancarlo Panichi | 1d630bc331 | |
Giancarlo Panichi | 5e88b6e866 | |
Giancarlo Panichi | 65ef56ad78 | |
Giancarlo Panichi | c87a11211c | |
Giancarlo Panichi | b3ea741e01 | |
Giancarlo Panichi | afc1280f36 | |
Giancarlo Panichi | 1748af8209 | |
Giancarlo Panichi | 8e66c2ed8b | |
Giancarlo Panichi | efea93422a | |
Giancarlo Panichi | 4c7436af6f | |
Giancarlo Panichi | 4da9ba8c18 | |
Giancarlo Panichi | e1d9eadca9 | |
Fabio Sinibaldi | 8f6f67d15d | |
Fabio Sinibaldi | ab754dcedd | |
Giancarlo Panichi | 3f6ae32789 | |
Giancarlo Panichi | 876ef94c53 | |
Giancarlo Panichi | fa1ad83006 | |
Giancarlo Panichi | c2ca14e3cd | |
Giancarlo Panichi | 80ef562833 | |
Giancarlo Panichi | e7f927f48b | |
Giancarlo Panichi | 94492e6b2d | |
Giancarlo Panichi | 8eddb8075d | |
Giancarlo Panichi | 1beb8b9b54 | |
Giancarlo Panichi | 9cbfddb9d0 | |
Giancarlo Panichi | ae19349ee0 | |
Giancarlo Panichi | d102c34653 | |
Giancarlo Panichi | ceb23ca8a5 | |
Giancarlo Panichi | ef5270f5ca | |
Roberto Cirillo | 67198f95bf | |
Roberto Cirillo | c7404b13f5 | |
Giancarlo Panichi | d0d3d50920 | |
Giancarlo Panichi | 37cbddfd3e | |
Giancarlo Panichi | d771201580 | |
Giancarlo Panichi | 4225408778 | |
Giancarlo Panichi | 9b22a80c87 | |
Giancarlo Panichi | 9ea89610b7 | |
Giancarlo Panichi | 984b3cc203 | |
Giancarlo Panichi | e1b2f2eb13 | |
Giancarlo Panichi | beb4f7157b | |
Giancarlo Panichi | 75ad9b8376 | |
Giancarlo Panichi | 523e25f3f3 | |
Giancarlo Panichi | 7e37d4dae6 | |
Giancarlo Panichi | 6765d10607 | |
Giancarlo Panichi | fa6b08bf17 | |
Giancarlo Panichi | 90b8f860e4 | |
Giancarlo Panichi | a950e2195d | |
Giancarlo Panichi | 2a9996ae75 | |
Giancarlo Panichi | f32b9b6aad | |
Giancarlo Panichi | f6c5f0a246 | |
Giancarlo Panichi | b5ef05eece | |
Giancarlo Panichi | 731387e5e5 | |
Giancarlo Panichi | cf36996d36 | |
Giancarlo Panichi | 7efbb88194 | |
Giancarlo Panichi | 4274b4bf5c | |
Giancarlo Panichi | 51c77f1606 | |
Giancarlo Panichi | 61fc9f4982 | |
Giancarlo Panichi | 8661fc9657 | |
Giancarlo Panichi | 2b87ad8a46 | |
Giancarlo Panichi | b2a3d5a88b | |
Giancarlo Panichi | afd2f5d2fe | |
Giancarlo Panichi | 1eaea1fc8a | |
Giancarlo Panichi | 16e03f0f8e | |
Giancarlo Panichi | c312b906ce | |
Giancarlo Panichi | 3c358d84a8 | |
Giancarlo Panichi | 403a7b3083 | |
Giancarlo Panichi | d7bd865069 | |
Giancarlo Panichi | bd9a58aa1d | |
Giancarlo Panichi | 375067b908 | |
Giancarlo Panichi | 632605aa04 | |
Giancarlo Panichi | 5937860cf4 | |
Giancarlo Panichi | 04ed1359c8 | |
Giancarlo Panichi | b5507e05d5 | |
Giancarlo Panichi | 4cba35014c | |
Giancarlo Panichi | 75fd7feaff | |
Giancarlo Panichi | 5c9714ab71 | |
Giancarlo Panichi | 8aaef980de | |
Giancarlo Panichi | 304f04f9a0 | |
Giancarlo Panichi | 69315db179 | |
Giancarlo Panichi | 4e7a4504b2 | |
Giancarlo Panichi | a731eab88a | |
Giancarlo Panichi | 3726ca0c5d | |
Giancarlo Panichi | b0f529c2e4 | |
Giancarlo Panichi | e4a4b07f12 | |
Giancarlo Panichi | 2ec1163a14 | |
Ciro Formisano | 5e15b1fdaa | |
Ciro Formisano | 1f142f1667 | |
Ciro Formisano | dc58b53b34 | |
Ciro Formisano | 91ffb8e3b7 | |
Ciro Formisano | ad712aa95a | |
Ciro Formisano | e8e45abb36 | |
Ciro Formisano | b6a063d5e8 | |
Ciro Formisano | 2556d18215 | |
Ciro Formisano | 987afa2f0e | |
Ciro Formisano | 929e74f355 | |
Ciro Formisano | 961a980369 | |
Ciro Formisano | 623ff51624 | |
Ciro Formisano | 7362d8efb9 | |
Ciro Formisano | 85b523e2f2 | |
Ciro Formisano | 3045f7426d | |
Ciro Formisano | 30081945be | |
Ciro Formisano | 35ba24b9e2 | |
Ciro Formisano | 6bb73bd6dc | |
Ciro Formisano | 0126b5cd42 | |
Ciro Formisano | 8a19184ac3 | |
Ciro Formisano | 325f3a3b86 | |
Ciro Formisano | 45edc13078 | |
Ciro Formisano | f696d7af4c | |
Ciro Formisano | f61562bcd9 | |
Ciro Formisano | 4d81ec6883 | |
Ciro Formisano | 907306c7d0 | |
Ciro Formisano | dcfda7d326 | |
Ciro Formisano | 368bdc8f81 | |
Nunzio Andrea Galante | eaa49e6242 | |
Nunzio Andrea Galante | 21c7cbe08d | |
Nunzio Andrea Galante | 56c111f010 | |
Nunzio Andrea Galante | 53fab326e8 | |
Nunzio Andrea Galante | f00127bc61 | |
Nunzio Andrea Galante | 46b04ae736 | |
Nunzio Andrea Galante | 80884db7c5 | |
Nunzio Andrea Galante | 248e729e88 | |
Nunzio Andrea Galante | f89b35f505 | |
Nunzio Andrea Galante | 33cc44b6f6 | |
Nunzio Andrea Galante | a89b26a74c | |
Nunzio Andrea Galante | 7fe54ebddb | |
Nunzio Andrea Galante | 58cb07dc26 | |
Nunzio Andrea Galante | 4aebbd8d3a | |
Nunzio Andrea Galante | c20472bbc9 | |
Nunzio Andrea Galante | bf370e511a | |
Nunzio Andrea Galante | 55d01e89a5 | |
Nunzio Andrea Galante | f29472ed3e | |
Nunzio Andrea Galante | 22879e40bf | |
Nunzio Andrea Galante | 864ef5ae03 | |
Nunzio Andrea Galante | a5968cda0d | |
Nunzio Andrea Galante | e10bdc5525 | |
Nunzio Andrea Galante | 7981b445aa | |
Nunzio Andrea Galante | 6d1ea69fb3 | |
Nunzio Andrea Galante | 7f554e0c0b | |
Nunzio Andrea Galante | a951066ac8 | |
Nunzio Andrea Galante | 4fbb06f7df | |
Nunzio Andrea Galante | 17c944b4de | |
Nunzio Andrea Galante | 661dacd21b | |
Nunzio Andrea Galante | 0240c67d74 | |
Nunzio Andrea Galante | 079ba2faeb | |
Nunzio Andrea Galante | 2c06d9bee8 | |
Nunzio Andrea Galante | b29cce9580 | |
Nunzio Andrea Galante | b1b51eb9b0 | |
Nunzio Andrea Galante | c69e116040 | |
Nunzio Andrea Galante | bf15cee6bc | |
Nunzio Andrea Galante | 43c4be5249 | |
Nunzio Andrea Galante | 2c4ee18a2b | |
Nunzio Andrea Galante | 1738a00b84 | |
Nunzio Andrea Galante | d2f5e9d963 | |
Nunzio Andrea Galante | caf8260a4e | |
Nunzio Andrea Galante | 7273b86fdd | |
Nunzio Andrea Galante | 5cdd2cfd94 | |
Nunzio Andrea Galante | 901d2b575f | |
Nunzio Andrea Galante | 9b2cf17de7 | |
Nunzio Andrea Galante | 7e2d6406ca | |
Nunzio Andrea Galante | 9dca0366e4 | |
Nunzio Andrea Galante | aeffd73653 | |
Nunzio Andrea Galante | f6002a05fd | |
Nunzio Andrea Galante | e1fe514aea | |
Nunzio Andrea Galante | 0088583f07 | |
Nunzio Andrea Galante | d3a42863bf | |
Nunzio Andrea Galante | b225caa2a4 | |
Nunzio Andrea Galante | 60e22e39f6 | |
Nunzio Andrea Galante | 1142c87af6 | |
Nunzio Andrea Galante | bb2c5af9ee | |
Nunzio Andrea Galante | 2c3e5c6964 | |
Nunzio Andrea Galante | 2bbfe69d3b | |
Nunzio Andrea Galante | 8a35a0c831 | |
Nunzio Andrea Galante | 85c51c1f9a | |
Nunzio Andrea Galante | 7ae4467d2d | |
Nunzio Andrea Galante | 83fcaf3808 | |
Nunzio Andrea Galante | c87b54a76a | |
Nunzio Andrea Galante | 389446757f | |
Nunzio Andrea Galante | 275ee16764 | |
Nunzio Andrea Galante | 7890e99f5b | |
Nunzio Andrea Galante | 5b6105d780 | |
Nunzio Andrea Galante | 9f7778b5ce | |
Nunzio Andrea Galante | d953381a15 | |
Nunzio Andrea Galante | 78773efdef | |
Nunzio Andrea Galante | 4b0d7cbde2 | |
Nunzio Andrea Galante | 02587bf725 | |
Nunzio Andrea Galante | a6d01da01a | |
Nunzio Andrea Galante | 0d82f32a3b | |
Nunzio Andrea Galante | 1217ed589b | |
Nunzio Andrea Galante | 8d9365b99d | |
Nunzio Andrea Galante | 619156bcc6 | |
Nunzio Andrea Galante | b44644bf37 | |
Nunzio Andrea Galante | b8305fb494 | |
Nunzio Andrea Galante | 0785091c08 | |
Nunzio Andrea Galante | 6e05178ecc | |
Nunzio Andrea Galante | 9e15d89db4 | |
Nunzio Andrea Galante | 1facaa8482 | |
Nunzio Andrea Galante | a74a4ab0f5 | |
Nunzio Andrea Galante | 6d7aba1725 | |
Nunzio Andrea Galante | 3a91c9d653 | |
Nunzio Andrea Galante | 93cb62ab99 | |
Nunzio Andrea Galante | c47a84db55 | |
Nunzio Andrea Galante | 536e5679e3 | |
Nunzio Andrea Galante | 1be681a9bd | |
Nunzio Andrea Galante | 3054b0a4ca | |
Nunzio Andrea Galante | 3b7f4aefc4 | |
Nunzio Andrea Galante | 3f14889b58 | |
Nunzio Andrea Galante | 9247b7019d | |
Nunzio Andrea Galante | 4e4d90183e | |
Nunzio Andrea Galante | b8b07462ec | |
Nunzio Andrea Galante | 811107f682 | |
Nunzio Andrea Galante | 26f7f2d811 | |
Nunzio Andrea Galante | 9abc3752a2 | |
Nunzio Andrea Galante | 2c7aebf178 | |
Nunzio Andrea Galante | 3dabd84dad | |
Nunzio Andrea Galante | 62088fcd1d | |
Nunzio Andrea Galante | 79f612e263 | |
Nunzio Andrea Galante | d07cf6c2b4 | |
Nunzio Andrea Galante | 6704678c94 | |
Nunzio Andrea Galante | 994f1abad5 | |
Gabriele Giammatteo | 03f973a7de | |
Gabriele Giammatteo | cd23218da4 | |
Gabriele Giammatteo | 0bc11c4cee | |
Gabriele Giammatteo | 04c9b93715 | |
Nunzio Andrea Galante | c9b04e7d89 | |
Nunzio Andrea Galante | 8a5693f6b2 | |
Nunzio Andrea Galante | 9314093ceb | |
Nunzio Andrea Galante | a39309903d | |
Nunzio Andrea Galante | 639b2e8ab6 | |
Nunzio Andrea Galante | c09cc4848f | |
Nunzio Andrea Galante | 2f041c7f9c | |
Nunzio Andrea Galante | 79e801c2ec | |
Nunzio Andrea Galante | c7115db5b4 | |
Nunzio Andrea Galante | c8ce04c364 | |
Nunzio Andrea Galante | bb6613b8b4 | |
Nunzio Andrea Galante | a67049f2a3 | |
Nunzio Andrea Galante | 27b17b726f | |
Nunzio Andrea Galante | 952ad76b9f | |
Nunzio Andrea Galante | abf8ae7f42 | |
Nunzio Andrea Galante | 487abf77d8 | |
Nunzio Andrea Galante | 7fe368f8be | |
Nunzio Andrea Galante | 22b988b10c | |
Nunzio Andrea Galante | 5dbe0f441e | |
Nunzio Andrea Galante | 49e78c3d51 | |
Nunzio Andrea Galante | 9ef6c5477f | |
Nunzio Andrea Galante | c919d6b0d0 | |
Nunzio Andrea Galante | 23d6c0e725 | |
Nunzio Andrea Galante | 5d6fe0ceb5 | |
Nunzio Andrea Galante | 3f523d3862 | |
Nunzio Andrea Galante | 4fd65602d7 | |
Nunzio Andrea Galante | 19bb79eae9 | |
Nunzio Andrea Galante | a325272b18 | |
Gabriele Giammatteo | 4d9c95d561 | |
Gabriele Giammatteo | e136299fb9 | |
Gabriele Giammatteo | c2a950931a | |
Gabriele Giammatteo | 63a918f442 | |
Gabriele Giammatteo | 057dc2c4d6 | |
Gabriele Giammatteo | ec7d888eb1 | |
Gabriele Giammatteo | a7ddc72bc8 | |
Gabriele Giammatteo | dc2061ead6 | |
Nunzio Andrea Galante | 6315560648 | |
Nunzio Andrea Galante | 3d6a1273ff | |
Nunzio Andrea Galante | feebe094ab | |
Nunzio Andrea Galante | 7d286d5326 | |
Nunzio Andrea Galante | 8409cfde2f | |
Nunzio Andrea Galante | c8e9329164 | |
Nunzio Andrea Galante | a07d71b392 | |
Nunzio Andrea Galante | 34b1d254a4 | |
Nunzio Andrea Galante | 8e5027e67a | |
Nunzio Andrea Galante | 830080e1ea | |
Nunzio Andrea Galante | b7a7db290e | |
Nunzio Andrea Galante | f3dd230754 | |
Nunzio Andrea Galante | 7b8e31ee5c | |
Nunzio Andrea Galante | 277fcb876d | |
Nunzio Andrea Galante | 11cc05c8de | |
Nunzio Andrea Galante | 90bf5de9c2 | |
Nunzio Andrea Galante | 692da9f6ca | |
Nunzio Andrea Galante | d8105b3911 | |
Nunzio Andrea Galante | 9de2ebee39 | |
Nunzio Andrea Galante | 4a09c7bc7c | |
Nunzio Andrea Galante | aaca4cb0ba | |
Nunzio Andrea Galante | f0480731ac | |
Nunzio Andrea Galante | fbaf826b96 | |
Nunzio Andrea Galante | 6741085c75 | |
Nunzio Andrea Galante | 0f98fe90b9 | |
Nunzio Andrea Galante | 871d3af41d | |
Nunzio Andrea Galante | 0fe614bbe8 | |
Nunzio Andrea Galante | 101d28faa2 | |
Nunzio Andrea Galante | 4c277d5b80 | |
Nunzio Andrea Galante | eeefe26566 | |
Nunzio Andrea Galante | 7ee72afa7e | |
Nunzio Andrea Galante | 8238deb146 | |
Nunzio Andrea Galante | 3136d4e8f7 | |
Nunzio Andrea Galante | f25ac50a25 | |
Nunzio Andrea Galante | 0002e935e8 | |
Nunzio Andrea Galante | e95962bf38 | |
Nunzio Andrea Galante | 899299f7ec | |
Nunzio Andrea Galante | 52844f2bf9 | |
Nunzio Andrea Galante | 2bf6cd2830 | |
Nunzio Andrea Galante | c736b2f0d3 | |
Nunzio Andrea Galante | cd78b0ce32 | |
Nunzio Andrea Galante | b36c9d6238 | |
Nunzio Andrea Galante | 2d55029f5b | |
Nunzio Andrea Galante | 442b71c645 | |
Nunzio Andrea Galante | 481c022695 | |
Nunzio Andrea Galante | 5018f51090 | |
Nunzio Andrea Galante | 477932e99a | |
Nunzio Andrea Galante | e57b57e59c | |
Nunzio Andrea Galante | 5144646ca3 | |
Nunzio Andrea Galante | 64a7d37a20 | |
Nunzio Andrea Galante | d167792fc9 | |
Nunzio Andrea Galante | 2e168fc082 | |
Nunzio Andrea Galante | 756202601b | |
Nunzio Andrea Galante | f07c1ad63a | |
Nunzio Andrea Galante | da8f4bbd66 | |
Nunzio Andrea Galante | ac0ae80a9e | |
Nunzio Andrea Galante | 45fb751fc2 | |
Nunzio Andrea Galante | 79029a4bbf | |
Nunzio Andrea Galante | 29208eee17 | |
Nunzio Andrea Galante | cc8f3c6074 | |
Nunzio Andrea Galante | 00f5f0b756 | |
Nunzio Andrea Galante | 0868d2afd6 | |
Nunzio Andrea Galante | f307318f28 | |
Nunzio Andrea Galante | 5ec9bcc53e | |
Nunzio Andrea Galante | 7f2a804500 | |
Nunzio Andrea Galante | acb613bb1e | |
Nunzio Andrea Galante | f058b05035 | |
Nunzio Andrea Galante | 7480cc512a | |
Nunzio Andrea Galante | 8302b626de | |
Nunzio Andrea Galante | c40cec3733 | |
Nunzio Andrea Galante | 112e385179 | |
Nunzio Andrea Galante | 37bdea6c3e | |
Nunzio Andrea Galante | 724d5376b6 | |
Nunzio Andrea Galante | 9af9433b71 | |
Nunzio Andrea Galante | 9dbcf818d4 | |
Nunzio Andrea Galante | 29b4ffd4b6 | |
Nunzio Andrea Galante | 2b7a83f81a | |
Nunzio Andrea Galante | 73ce6a00c5 | |
Nunzio Andrea Galante | 50832d44b0 | |
Nunzio Andrea Galante | 31a64d5d4d | |
Nunzio Andrea Galante | 237680ebf7 | |
Nunzio Andrea Galante | e6092b7216 | |
Nunzio Andrea Galante | badf193963 | |
Nunzio Andrea Galante | 87218738ec | |
Nunzio Andrea Galante | 1c77915423 | |
Nunzio Andrea Galante | d699f64c51 | |
Nunzio Andrea Galante | 3b76c592e3 | |
Nunzio Andrea Galante | 1096917cbd | |
Nunzio Andrea Galante | 1972fc6dae | |
Nunzio Andrea Galante | 4b9e209787 | |
Nunzio Andrea Galante | b1fb289763 | |
Nunzio Andrea Galante | 297d028977 | |
Nunzio Andrea Galante | 3a3d3e3cda | |
Nunzio Andrea Galante | d1682a5ef2 | |
Nunzio Andrea Galante | c421439c8f | |
Nunzio Andrea Galante | 3c1a16c919 | |
Nunzio Andrea Galante | 70e8058ec4 | |
Nunzio Andrea Galante | bab093ce03 | |
Paolo Fabriani | 105d9f6beb | |
Paolo Fabriani | 727756fffa | |
Paolo Fabriani | d9a0e093dd | |
Paolo Fabriani | 3edeeac4fa | |
Paolo Fabriani | a7a6dc91db | |
Paolo Fabriani | 1b6cea2db3 | |
Paolo Fabriani | aaa2994f2a | |
Paolo Fabriani | 8122447dd7 | |
Paolo Fabriani | 6ed9180fc2 | |
Paolo Fabriani | 22c42fd6f3 | |
Paolo Fabriani | 893685350e | |
Paolo Fabriani | c65952f4ee | |
Paolo Fabriani | e64e854bf8 | |
Paolo Fabriani | 2189ab14b4 | |
Paolo Fabriani | 07f623e95b | |
Paolo Fabriani | 21313f0e53 | |
Paolo Fabriani | 9da808432d | |
Paolo Fabriani | 58a8ad19cf | |
Paolo Fabriani | 10f75ad337 | |
Paolo Fabriani | f6e6e57aa7 | |
Paolo Fabriani | e4d7bcc783 | |
Paolo Fabriani | d0ededbb40 | |
Paolo Fabriani | 5e9725a1f4 | |
Paolo Fabriani | fcc8219f72 | |
Paolo Fabriani | 6d4a7d8b4e | |
Paolo Fabriani | b2df99beb2 | |
Paolo Fabriani | 1a1600f916 | |
Paolo Fabriani | c5ff4e906d |
|
@ -17,6 +17,11 @@
|
|||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
|
|
|
@ -2,4 +2,5 @@ eclipse.preferences.version=1
|
|||
encoding//src/main/java=UTF-8
|
||||
encoding//src/main/resources=UTF-8
|
||||
encoding//src/test/java=UTF-8
|
||||
encoding//src/test/resources=UTF-8
|
||||
encoding/<project>=UTF-8
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="dataminer-pool-manager-2.6.0-SNAPSHOT">
|
||||
<wb-module deploy-name="dataminer-pool-manager-2.7.1-SNAPSHOT">
|
||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
# Changelog
|
||||
|
||||
|
||||
## [v2.8.0-SNAPSHOT]
|
||||
|
||||
- Updated pom.xml to include configuration resources [#26192]
|
||||
|
||||
## [v2.7.1] - 2022-04-06
|
||||
|
||||
- Updated to gcube-smartgears-bom.2.1.1 [#23133]
|
||||
|
||||
|
||||
## [v2.7.0] - 2020-04-16
|
||||
|
||||
- Updated to new Social Networking API [#19081]
|
||||
- Added application token for send notifications [#19186]
|
||||
|
||||
|
||||
## [v2.6.0] - 2019-12-11
|
||||
|
||||
- Updated to Git and Jenkins
|
||||
- Knime 4.1 added [#18190]
|
||||
|
||||
|
||||
## [v2.5.0] - 2019-01-11
|
||||
|
||||
- SVN parameters get from IS
|
||||
- Python3.6 added [#12742]
|
||||
|
||||
|
||||
## [v2.4.0] - 2018-11-01
|
||||
|
||||
- Notifies the 'conflicts' on SVN
|
||||
|
||||
|
||||
## [v2.3.0] - 2018-08-01
|
||||
|
||||
- Log information also if the verification of SVN dependencies fails
|
||||
|
||||
|
||||
## [v2.2.0] - 2018-06-01
|
||||
|
||||
- Improvements and bugs fixed/SVN-UTF8 compliant/Installation in Production ghost added
|
||||
- Dynamic per-VRE configuration throght the information system
|
||||
|
||||
|
||||
## [v2.1.0] - 2018-05-01
|
||||
|
||||
- New configuration file added
|
||||
|
||||
|
||||
## [v2.0.0] - 2018-01-01
|
||||
|
||||
- Second Release
|
||||
|
||||
|
||||
## [v1.0.0] - 2017-11-01
|
||||
|
||||
- First Release
|
||||
|
||||
|
||||
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
@ -0,0 +1,26 @@
|
|||
# Acknowledgments
|
||||
|
||||
The projects leading to this software have received funding from a series of European Union programmes including:
|
||||
|
||||
- the Sixth Framework Programme for Research and Technological Development
|
||||
- [DILIGENT](https://cordis.europa.eu/project/id/004260) (grant no. 004260).
|
||||
- the Seventh Framework Programme for research, technological development and demonstration
|
||||
- [D4Science](https://cordis.europa.eu/project/id/212488) (grant no. 212488);
|
||||
- [D4Science-II](https://cordis.europa.eu/project/id/239019) (grant no.239019);
|
||||
- [ENVRI](https://cordis.europa.eu/project/id/283465) (grant no. 283465);
|
||||
- [iMarine](https://cordis.europa.eu/project/id/283644) (grant no. 283644);
|
||||
- [EUBrazilOpenBio](https://cordis.europa.eu/project/id/288754) (grant no. 288754).
|
||||
- the H2020 research and innovation programme
|
||||
- [SoBigData](https://cordis.europa.eu/project/id/654024) (grant no. 654024);
|
||||
- [PARTHENOS](https://cordis.europa.eu/project/id/654119) (grant no. 654119);
|
||||
- [EGI-Engage](https://cordis.europa.eu/project/id/654142) (grant no. 654142);
|
||||
- [ENVRI PLUS](https://cordis.europa.eu/project/id/654182) (grant no. 654182);
|
||||
- [BlueBRIDGE](https://cordis.europa.eu/project/id/675680) (grant no. 675680);
|
||||
- [PerformFISH](https://cordis.europa.eu/project/id/727610) (grant no. 727610);
|
||||
- [AGINFRA PLUS](https://cordis.europa.eu/project/id/731001) (grant no. 731001);
|
||||
- [DESIRA](https://cordis.europa.eu/project/id/818194) (grant no. 818194);
|
||||
- [ARIADNEplus](https://cordis.europa.eu/project/id/823914) (grant no. 823914);
|
||||
- [RISIS 2](https://cordis.europa.eu/project/id/824091) (grant no. 824091);
|
||||
- [EOSC-Pillar](https://cordis.europa.eu/project/id/857650) (grant no. 857650);
|
||||
- [Blue Cloud](https://cordis.europa.eu/project/id/862409) (grant no. 862409);
|
||||
- [SoBigData-PlusPlus](https://cordis.europa.eu/project/id/871042) (grant no. 871042);
|
|
@ -1,9 +1,10 @@
|
|||
#European Union Public Licence V.1.1
|
||||
|
||||
##*EUPL © the European Community 2007*
|
||||
# European Union Public Licence V. 1.1
|
||||
|
||||
|
||||
This **European Union Public Licence** (the **“EUPL”**) applies to the Work or Software
|
||||
EUPL © the European Community 2007
|
||||
|
||||
|
||||
This European Union Public Licence (the “EUPL”) applies to the Work or Software
|
||||
(as defined below) which is provided under the terms of this Licence. Any use of
|
||||
the Work, other than as authorised under this Licence is prohibited (to the
|
||||
extent such use is covered by a right of the copyright holder of the Work).
|
||||
|
@ -12,13 +13,13 @@ The Original Work is provided under the terms of this Licence when the Licensor
|
|||
(as defined below) has placed the following notice immediately following the
|
||||
copyright notice for the Original Work:
|
||||
|
||||
**Licensed under the EUPL V.1.1**
|
||||
Licensed under the EUPL V.1.1
|
||||
|
||||
or has expressed by any other mean his willingness to license under the EUPL.
|
||||
|
||||
|
||||
|
||||
##1. Definitions
|
||||
## 1. Definitions
|
||||
|
||||
In this Licence, the following terms have the following meaning:
|
||||
|
||||
|
@ -59,7 +60,7 @@ In this Licence, the following terms have the following meaning:
|
|||
|
||||
|
||||
|
||||
##2. Scope of the rights granted by the Licence
|
||||
## 2. Scope of the rights granted by the Licence
|
||||
|
||||
The Licensor hereby grants You a world-wide, royalty-free, non-exclusive,
|
||||
sub-licensable licence to do the following, for the duration of copyright vested
|
||||
|
@ -85,7 +86,7 @@ rights granted on the Work under this Licence.
|
|||
|
||||
|
||||
|
||||
##3. Communication of the Source Code
|
||||
## 3. Communication of the Source Code
|
||||
|
||||
The Licensor may provide the Work either in its Source Code form, or as
|
||||
Executable Code. If the Work is provided as Executable Code, the Licensor
|
||||
|
@ -97,7 +98,7 @@ continues to distribute and/or communicate the Work.
|
|||
|
||||
|
||||
|
||||
##4. Limitations on copyright
|
||||
## 4. Limitations on copyright
|
||||
|
||||
Nothing in this Licence is intended to deprive the Licensee of the benefits from
|
||||
any exception or limitation to the exclusive rights of the rights owners in the
|
||||
|
@ -106,7 +107,7 @@ applicable limitations thereto.
|
|||
|
||||
|
||||
|
||||
##5. Obligations of the Licensee
|
||||
## 5. Obligations of the Licensee
|
||||
|
||||
The grant of the rights mentioned above is subject to some restrictions and
|
||||
obligations imposed on the Licensee. Those obligations are the following:
|
||||
|
@ -147,7 +148,7 @@ reproducing the content of the copyright notice.
|
|||
|
||||
|
||||
|
||||
##6. Chain of Authorship
|
||||
## 6. Chain of Authorship
|
||||
|
||||
The original Licensor warrants that the copyright in the Original Work granted
|
||||
hereunder is owned by him/her or licensed to him/her and that he/she has the
|
||||
|
@ -163,7 +164,7 @@ terms of this Licence.
|
|||
|
||||
|
||||
|
||||
##7. Disclaimer of Warranty
|
||||
## 7. Disclaimer of Warranty
|
||||
|
||||
The Work is a work in progress, which is continuously improved by numerous
|
||||
contributors. It is not a finished work and may therefore contain defects or
|
||||
|
@ -180,7 +181,7 @@ for the grant of any rights to the Work.
|
|||
|
||||
|
||||
|
||||
##8. Disclaimer of Liability
|
||||
## 8. Disclaimer of Liability
|
||||
|
||||
Except in the cases of wilful misconduct or damages directly caused to natural
|
||||
persons, the Licensor will in no event be liable for any direct or indirect,
|
||||
|
@ -193,7 +194,7 @@ laws as far such laws apply to the Work.
|
|||
|
||||
|
||||
|
||||
##9. Additional agreements
|
||||
## 9. Additional agreements
|
||||
|
||||
While distributing the Original Work or Derivative Works, You may choose to
|
||||
conclude an additional agreement to offer, and charge a fee for, acceptance of
|
||||
|
@ -207,7 +208,7 @@ any such warranty or additional liability.
|
|||
|
||||
|
||||
|
||||
##10. Acceptance of the Licence
|
||||
## 10. Acceptance of the Licence
|
||||
|
||||
The provisions of this Licence can be accepted by clicking on an icon “I agree”
|
||||
placed under the bottom of a window displaying the text of this Licence or by
|
||||
|
@ -222,7 +223,7 @@ Distribution and/or Communication by You of the Work or copies thereof.
|
|||
|
||||
|
||||
|
||||
##11. Information to the public
|
||||
## 11. Information to the public
|
||||
|
||||
In case of any Distribution and/or Communication of the Work by means of
|
||||
electronic communication by You (for example, by offering to download the Work
|
||||
|
@ -233,7 +234,7 @@ accessible, concluded, stored and reproduced by the Licensee.
|
|||
|
||||
|
||||
|
||||
##12. Termination of the Licence
|
||||
## 12. Termination of the Licence
|
||||
|
||||
The Licence and the rights granted hereunder will terminate automatically upon
|
||||
any breach by the Licensee of the terms of the Licence.
|
||||
|
@ -244,7 +245,7 @@ remain in full compliance with the Licence.
|
|||
|
||||
|
||||
|
||||
##13. Miscellaneous
|
||||
## 13. Miscellaneous
|
||||
|
||||
Without prejudice of Article 9 above, the Licence represents the complete
|
||||
agreement between the Parties as to the Work licensed hereunder.
|
||||
|
@ -265,7 +266,7 @@ their choice.
|
|||
|
||||
|
||||
|
||||
##14. Jurisdiction
|
||||
## 14. Jurisdiction
|
||||
|
||||
Any litigation resulting from the interpretation of this License, arising
|
||||
between the European Commission, as a Licensor, and any Licensee, will be
|
||||
|
@ -279,7 +280,7 @@ conducts its primary business.
|
|||
|
||||
|
||||
|
||||
##15. Applicable Law
|
||||
## 15. Applicable Law
|
||||
|
||||
This Licence shall be governed by the law of the European Union country where
|
||||
the Licensor resides or has his registered office.
|
||||
|
@ -291,13 +292,12 @@ This licence shall be governed by the Belgian law if:
|
|||
- or registered office inside a European Union country.
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Appendix
|
||||
|
||||
|
||||
##Appendix
|
||||
|
||||
|
||||
**“Compatible Licences”** according to article 5 EUPL are:
|
||||
“Compatible Licences” according to article 5 EUPL are:
|
||||
|
||||
|
||||
- GNU General Public License (GNU GPL) v. 2
|
||||
|
|
|
@ -17,7 +17,7 @@ DataMiner Pool Manager is a service to support the integration of algorithms in
|
|||
|
||||
## Change log
|
||||
|
||||
See [Releases](https://code-repo.d4science.org/gCubeSystem/dataminer-pool-manager/releases).
|
||||
See [CHANGELOG.md](CHANGELOG.md).
|
||||
|
||||
## Authors
|
||||
|
||||
|
@ -37,12 +37,4 @@ open-source software toolkit used for building and operating Hybrid Data
|
|||
Infrastructures enabling the dynamic deployment of Virtual Research Environments
|
||||
by favouring the realisation of reuse oriented policies.
|
||||
|
||||
The projects leading to this software have received funding from a series of European Union programmes including:
|
||||
|
||||
- the Sixth Framework Programme for Research and Technological Development
|
||||
- DILIGENT (grant no. 004260);
|
||||
- the Seventh Framework Programme for research, technological development and demonstration
|
||||
- D4Science (grant no. 212488), D4Science-II (grant no.239019), ENVRI (grant no. 283465), EUBrazilOpenBio (grant no. 288754), iMarine(grant no. 283644);
|
||||
- the H2020 research and innovation programme
|
||||
- BlueBRIDGE (grant no. 675680), EGIEngage (grant no. 654142), ENVRIplus (grant no. 654182), Parthenos (grant no. 654119), SoBigData (grant no. 654024),DESIRA (grant no. 818194), ARIADNEplus (grant no. 823914), RISIS2 (grant no. 824091), PerformFish (grant no. 727610), AGINFRAplus (grant no. 731001);
|
||||
|
||||
The projects leading to this software have received funding from a series of European Union programmes see [FUNDING.md](FUNDING.md)
|
||||
|
|
|
@ -1,11 +1,21 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.dataanalysis.dataminer-pool-manager.2-8-0" date="2024-01-29">
|
||||
<Change>Updated pom.xml to include configuration resources [#26192]</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.dataanalysis.dataminer-pool-manager.2-7-1" date="2022-04-06">
|
||||
<Change>Updated to gcube-smartgears-bom.2.2.0 [#23133]</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.dataanalysis.dataminer-pool-manager.2-7-0" date="2020-04-16">
|
||||
<Change>Updated to new Social Networking API [#19081]</Change>
|
||||
<Change>Added application token for send notifications [#19186]</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.dataanalysis.dataminer-pool-manager.2-6-0" date="2019-12-11">
|
||||
<Change>Updated to Git and Jenkins</Change>
|
||||
<Change>Knime 4.1 added [ticket #18190]</Change>
|
||||
<Change>Knime 4.1 added [#18190]</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.dataanalysis.dataminer-pool-manager.2-5-0" date="2019-01-11">
|
||||
<Change>SVN parameters get from IS</Change>
|
||||
<Change>Python3.6 added [ticket #12742]</Change>
|
||||
<Change>Python3.6 added [#12742]</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.dataanalysis.dataminer-pool-manager.2-4-0" date="2018-11-01">
|
||||
<Change>Notifies the 'conflicts' on SVN</Change>
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
<parent>
|
||||
<artifactId>maven-parent</artifactId>
|
||||
<groupId>org.gcube.tools</groupId>
|
||||
<version>1.1.0</version>
|
||||
<version>1.2.0</version>
|
||||
<relativePath />
|
||||
</parent>
|
||||
|
||||
<groupId>org.gcube.dataanalysis</groupId>
|
||||
<artifactId>dataminer-pool-manager</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>2.6.0</version>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
|
||||
<name>dataminer-pool-manager</name>
|
||||
<description>DataMiner Pool Manager is a service to support the integration of algorithms in D4Science Infrastructure</description>
|
||||
|
@ -56,6 +56,10 @@
|
|||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.gcube.core</groupId>
|
||||
<artifactId>common-encryption</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
|
@ -147,7 +151,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.distribution</groupId>
|
||||
<artifactId>gcube-smartgears-bom</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<version>2.5.0</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
@ -187,9 +191,28 @@
|
|||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-config</id>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<phase>process-resources</phase>
|
||||
<configuration>
|
||||
<outputDirectory>${webappDirectory}/classes</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${project.basedir}/src/main/resources/</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>*/**</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
|
|
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/AnsibleWorker.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/AnsibleWorker.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/AnsibleHost.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/AnsibleHost.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/HostGroup.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/HostGroup.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/Inventory.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/Inventory.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/Playbook.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/Playbook.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/Role.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/Role.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/RoleFile.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansible/model/RoleFile.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/AnsibleBridge.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/AnsibleBridge.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/AnsibleSerializeHelper.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/AnsibleSerializeHelper.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/AlgorithmPackage.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/AlgorithmPackage.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/CranDependencyPackage.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/CranDependencyPackage.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/CustomDependencyPackage.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/CustomDependencyPackage.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/CustomRoleManager.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/CustomRoleManager.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/DependencyPackage.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/DependencyPackage.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/OSDependencyPackage.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/OSDependencyPackage.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/StaticRoleManager.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/StaticRoleManager.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/TemplateManager.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/ansiblebridge/template/TemplateManager.java
Normal file → Executable file
9
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/clients/HAProxy.java
Normal file → Executable file
9
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/clients/HAProxy.java
Normal file → Executable file
|
@ -20,6 +20,9 @@ import au.com.bytecode.opencsv.CSVReader;
|
|||
|
||||
public class HAProxy {
|
||||
|
||||
private static final String token1 = "";
|
||||
private static final String token2 = "";
|
||||
|
||||
private Logger logger;
|
||||
|
||||
private CSVReader reader;
|
||||
|
@ -142,16 +145,16 @@ public class HAProxy {
|
|||
HAProxy a = new HAProxy();
|
||||
//ScopeProvider.instance.set("/gcube/devNext/NextNext");
|
||||
//ScopeProvider.instance.set("/d4science.research-infrastructures.eu/gCubeApps/RPrototypingLab");
|
||||
SecurityTokenProvider.instance.set("3a23bfa4-4dfe-44fc-988f-194b91071dd2-843339462");
|
||||
SecurityTokenProvider.instance.set(token1);
|
||||
|
||||
CheckPermission test = new CheckPermission();
|
||||
CheckPermission.apply("708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548", "/gcube/devNext/NextNext");
|
||||
CheckPermission.apply(token2, "/gcube/devNext/NextNext");
|
||||
|
||||
|
||||
//ScopeProvider.instance.set("/d4science.research-infrastructures.eu/gCubeApps/RPrototypingLab");
|
||||
// System.out.println(a.getHProxy());
|
||||
// System.out.println(a.MapCluster());
|
||||
//System.out.println(a.listDataMinersByCluster("708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548","/gcube/devNext/NextNext"));
|
||||
//System.out.println(a.listDataMinersByCluster("xxx-xxx-xxx-xxx","/gcube/devNext/NextNext"));
|
||||
// System.out.println(a.listDataMinersByCluster());
|
||||
|
||||
// List<Dependency> list = new LinkedList<Dependency>();
|
||||
|
|
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/clients/ISClient.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/clients/ISClient.java
Normal file → Executable file
|
@ -97,16 +97,16 @@ public class ClientConfigurationCache
|
|||
|
||||
if (repositoryPassword != null && repositoryPassword.trim() == "") repositoryPassword = null;
|
||||
|
||||
this.logger.debug("Repository username "+repositoryUsername);
|
||||
this.logger.debug("Repository password "+repositoryPassword);
|
||||
logger.debug("Repository username "+repositoryUsername);
|
||||
logger.debug("Repository password "+repositoryPassword);
|
||||
|
||||
} catch (Exception e)
|
||||
{
|
||||
this.logger.debug("SVN Username and password not present");
|
||||
}
|
||||
|
||||
this.logger.debug("SVN Repository URL: "+repositoryURL);
|
||||
this.logger.debug("SVN Repository path: "+repositoryPath);
|
||||
logger.debug("SVN Repository URL: "+repositoryURL);
|
||||
logger.debug("SVN Repository path: "+repositoryPath);
|
||||
|
||||
response = new SVNRepository(repositoryURL, repositoryPath,repositoryUsername, repositoryPassword);
|
||||
|
||||
|
|
|
@ -30,23 +30,6 @@ public class ConfigurationImpl implements Configuration {
|
|||
}
|
||||
|
||||
|
||||
// enum REPOSITORIES {
|
||||
// REPO ("svn.repository"),
|
||||
// MAIN_ALGO ("svn.algo.main.repo");
|
||||
//
|
||||
// private String type;
|
||||
//
|
||||
// private REPOSITORIES(String type) {
|
||||
// this.type = type;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String toString() {
|
||||
// return this.type;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
private CONFIGURATIONS type;
|
||||
private ClientConfigurationCache cache;
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package org.gcube.dataanalysis.dataminer.poolmanager.clients.configuration;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
|
@ -11,105 +13,89 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
import org.tmatesoft.svn.core.SVNException;
|
||||
|
||||
public class DMPMClientConfiguratorManager
|
||||
{
|
||||
private final Logger logger;
|
||||
public class DMPMClientConfiguratorManager {
|
||||
private final Logger logger=LoggerFactory.getLogger(DMPMClientConfiguratorManager.class);
|
||||
private Properties defaultAdmins;
|
||||
private String admins;
|
||||
|
||||
static DMPMClientConfiguratorManager instance;
|
||||
|
||||
private ScopedCacheMap cacheMap;
|
||||
|
||||
private DMPMClientConfiguratorManager ()
|
||||
{
|
||||
this.admins = null;
|
||||
this.cacheMap = new ScopedCacheMap();
|
||||
this.logger = LoggerFactory.getLogger(DMPMClientConfiguratorManager.class);
|
||||
this.defaultAdmins = new Properties();
|
||||
|
||||
try
|
||||
{
|
||||
this.defaultAdmins.load(this.getClass().getResourceAsStream("/default.admins"));
|
||||
this.logger.debug("Default users successfully loaded");
|
||||
} catch (Exception e)
|
||||
{
|
||||
this.logger.error("Unable to get default users",e);
|
||||
}
|
||||
}
|
||||
|
||||
private ClientConfigurationCache getCurrentCache ()
|
||||
{
|
||||
String currentScope = ScopeProvider.instance.get();
|
||||
this.logger.debug("Current scope = "+currentScope);
|
||||
this.logger.debug("Getting current configuration cache");
|
||||
ClientConfigurationCache cache = this.cacheMap.get(currentScope);
|
||||
|
||||
if (cache == null)
|
||||
{
|
||||
this.logger.debug("Cache not created yet, creating...");
|
||||
cache = new ClientConfigurationCache ();
|
||||
this.cacheMap.put(currentScope, cache);
|
||||
|
||||
}
|
||||
|
||||
return cache;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static DMPMClientConfiguratorManager getInstance ()
|
||||
{
|
||||
if (instance == null) instance = new DMPMClientConfiguratorManager();
|
||||
|
||||
static DMPMClientConfiguratorManager instance;
|
||||
|
||||
private ScopedCacheMap cacheMap;
|
||||
|
||||
private DMPMClientConfiguratorManager() {
|
||||
cacheMap = new ScopedCacheMap();
|
||||
defaultAdmins = new Properties();
|
||||
|
||||
try {
|
||||
defaultAdmins.load(this.getClass().getResourceAsStream("/default.admins"));
|
||||
logger.debug("Default users successfully loaded");
|
||||
} catch (Exception e) {
|
||||
logger.error("Unable to get default users", e);
|
||||
}
|
||||
}
|
||||
|
||||
private ClientConfigurationCache getCurrentCache() {
|
||||
String currentScope = ScopeProvider.instance.get();
|
||||
logger.debug("Current scope = " + currentScope);
|
||||
logger.debug("Getting current configuration cache");
|
||||
ClientConfigurationCache cache = cacheMap.get(currentScope);
|
||||
|
||||
if (cache == null) {
|
||||
logger.debug("Cache not created yet, creating...");
|
||||
cache = new ClientConfigurationCache();
|
||||
cacheMap.put(currentScope, cache);
|
||||
|
||||
}
|
||||
|
||||
return cache;
|
||||
|
||||
}
|
||||
|
||||
public static DMPMClientConfiguratorManager getInstance() {
|
||||
if (instance == null)
|
||||
instance = new DMPMClientConfiguratorManager();
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
public Configuration getProductionConfiguration ()
|
||||
{
|
||||
|
||||
public Configuration getProductionConfiguration() {
|
||||
return new ConfigurationImpl(CONFIGURATIONS.PROD, getCurrentCache());
|
||||
}
|
||||
|
||||
public Configuration getStagingConfiguration ()
|
||||
{
|
||||
|
||||
public Configuration getStagingConfiguration() {
|
||||
return new ConfigurationImpl(CONFIGURATIONS.STAGE, getCurrentCache());
|
||||
}
|
||||
|
||||
public String getDefaultAdmins ()
|
||||
{
|
||||
if (this.admins == null && this.defaultAdmins.isEmpty()) this.admins= "ciro.formisano";
|
||||
else if (admins == null)
|
||||
{
|
||||
Iterator<Object> keys = this.defaultAdmins.keySet().iterator();
|
||||
StringBuilder response = new StringBuilder();
|
||||
|
||||
while (keys.hasNext())
|
||||
{
|
||||
String key = (String) keys.next();
|
||||
response.append(this.defaultAdmins.getProperty(key)).append(", ");
|
||||
}
|
||||
|
||||
this.admins = response.substring(0, response.length()-2);
|
||||
|
||||
public List<String> getDefaultAdmins() {
|
||||
List<String> admins = new ArrayList<String>();
|
||||
|
||||
if (defaultAdmins == null || defaultAdmins.isEmpty()) {
|
||||
admins.add("statistical.manager");
|
||||
} else {
|
||||
Iterator<Object> keys = this.defaultAdmins.keySet().iterator();
|
||||
|
||||
while (keys.hasNext()) {
|
||||
String key = (String) keys.next();
|
||||
admins.add(defaultAdmins.getProperty(key));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
this.logger.debug("Default admins list "+this.admins);
|
||||
return this.admins;
|
||||
|
||||
this.logger.debug("Default admins list: " + admins);
|
||||
return admins;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) throws IOException, SVNException {
|
||||
DMPMClientConfiguratorManager a = new DMPMClientConfiguratorManager();
|
||||
ScopeProvider.instance.set("/gcube/devNext/NextNext");
|
||||
//SecurityTokenProvider.instance.set("708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548");
|
||||
|
||||
System.out.println("RESULT 1"+a.getStagingConfiguration().getSVNCRANDepsList());
|
||||
System.out.println("RESULT 2"+a.getProductionConfiguration().getRepository());
|
||||
System.out.println("RESULT 3"+a.getStagingConfiguration().getSVNRepository().getPath());
|
||||
//System.out.println(a.getRepo());
|
||||
//System.out.println(a.getAlgoRepo());
|
||||
//System.out.println(a.getSVNRepo());
|
||||
ScopeProvider.instance.set("/gcube/devsec/devVRE");
|
||||
// SecurityTokenProvider.instance.set("xxx-xxx-xxx-xxx");
|
||||
|
||||
System.out.println("RESULT 1" + a.getStagingConfiguration().getSVNCRANDepsList());
|
||||
System.out.println("RESULT 2" + a.getProductionConfiguration().getRepository());
|
||||
System.out.println("RESULT 3" + a.getStagingConfiguration().getSVNRepository().getPath());
|
||||
// System.out.println(a.getRepo());
|
||||
// System.out.println(a.getAlgoRepo());
|
||||
// System.out.println(a.getSVNRepo());
|
||||
|
||||
}
|
||||
}
|
||||
|
|
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Action.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Action.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/AlgoResource.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/AlgoResource.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Algorithm.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Algorithm.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/AlgorithmSet.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/AlgorithmSet.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Cluster.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Cluster.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Dependency.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Dependency.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Domain.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Domain.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Host.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Host.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/comparator/AlgorithmComparator.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/comparator/AlgorithmComparator.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/comparator/DependencyComparator.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/comparator/DependencyComparator.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/comparator/HostComparator.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/comparator/HostComparator.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/process/AddAlgorithmCommand.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/process/AddAlgorithmCommand.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/process/AlgorithmPackageParser.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/process/AlgorithmPackageParser.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/rest/PoolManager.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/rest/PoolManager.java
Normal file → Executable file
161
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/rest/RestPoolManager.java
Normal file → Executable file
161
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/rest/RestPoolManager.java
Normal file → Executable file
|
@ -1,6 +1,5 @@
|
|||
package org.gcube.dataanalysis.dataminer.poolmanager.rest;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
|
@ -24,52 +23,44 @@ import org.slf4j.LoggerFactory;
|
|||
import org.tmatesoft.svn.core.SVNException;
|
||||
|
||||
@Path("/")
|
||||
public class RestPoolManager implements PoolManager
|
||||
{
|
||||
//@Context ServletContext context;
|
||||
public class RestPoolManager implements PoolManager {
|
||||
// @Context ServletContext context;
|
||||
|
||||
private final Logger logger;
|
||||
private DataminerPoolManager service;
|
||||
|
||||
//@Context
|
||||
//private ApplicationContext context = ContextProvider.get();
|
||||
|
||||
public RestPoolManager()
|
||||
{
|
||||
|
||||
// @Context
|
||||
// private ApplicationContext context = ContextProvider.get();
|
||||
|
||||
public RestPoolManager() {
|
||||
this.logger = LoggerFactory.getLogger(RestPoolManager.class);
|
||||
this.service = new DataminerPoolManager();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@GET
|
||||
@Path("/algorithm/stage")
|
||||
@Produces("text/plain")
|
||||
public String stageAlgorithm(
|
||||
@QueryParam("algorithmPackageURL") String algorithmPackageURL,
|
||||
@QueryParam("targetVRE") String targetVRE,
|
||||
@QueryParam("category") String category,
|
||||
public String stageAlgorithm(@QueryParam("algorithmPackageURL") String algorithmPackageURL,
|
||||
@QueryParam("targetVRE") String targetVRE, @QueryParam("category") String category,
|
||||
@QueryParam("algorithm_type") String algorithm_type) throws IOException, InterruptedException {
|
||||
this.logger.debug("Stage algorithm method called");
|
||||
Algorithm algo = AlgorithmBuilder.create(algorithmPackageURL);
|
||||
//String env = context.application().getInitParameter("Environment");
|
||||
return this.service.stageAlgorithm(algo,targetVRE,category,algorithm_type/*,env*/);
|
||||
Algorithm algo = AlgorithmBuilder.create(algorithmPackageURL);
|
||||
// String env = context.application().getInitParameter("Environment");
|
||||
return this.service.stageAlgorithm(algo, targetVRE, category, algorithm_type/* ,env */);
|
||||
}
|
||||
|
||||
|
||||
@GET
|
||||
@Path("/algorithm/add")
|
||||
@Produces("text/plain")
|
||||
public String publishAlgorithm(
|
||||
@QueryParam("algorithmPackageURL") String algorithmPackageURL,
|
||||
//@QueryParam("targetVREToken") String targetVREToken,
|
||||
@QueryParam("targetVRE") String targetVRE,
|
||||
@QueryParam("category") String category,
|
||||
public String publishAlgorithm(@QueryParam("algorithmPackageURL") String algorithmPackageURL,
|
||||
// @QueryParam("targetVREToken") String targetVREToken,
|
||||
@QueryParam("targetVRE") String targetVRE, @QueryParam("category") String category,
|
||||
@QueryParam("algorithm_type") String algorithm_type) throws IOException, InterruptedException {
|
||||
this.logger.debug("Publish algorithm method called");
|
||||
Algorithm algo = AlgorithmBuilder.create(algorithmPackageURL);
|
||||
//String env = context.application().getInitParameter("Environment");
|
||||
return this.service.publishAlgorithm(algo, /*targetVREToken,*/ targetVRE,category,algorithm_type/*,env*/);
|
||||
// String env = context.application().getInitParameter("Environment");
|
||||
return this.service.publishAlgorithm(algo, /* targetVREToken, */ targetVRE, category, algorithm_type/* ,env */);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -87,7 +78,6 @@ public class RestPoolManager implements PoolManager
|
|||
return service.getLogById(logUrl);
|
||||
}
|
||||
|
||||
|
||||
@GET
|
||||
@Path("/monitor")
|
||||
@Produces("text/plain")
|
||||
|
@ -97,72 +87,77 @@ public class RestPoolManager implements PoolManager
|
|||
this.logger.debug("Returning Log =" + logUrl);
|
||||
return service.getMonitorById(logUrl);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
public Algorithm extractAlgorithm(String url) throws IOException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws ObjectNotFound, Exception {
|
||||
|
||||
|
||||
|
||||
// System.out.println(System.getProperty("user.home")+File.separator+"/gcube/dataminer-pool-manager");
|
||||
// // ProxySelector.setDefault(new
|
||||
// // PropertiesBasedProxySelector("/home/ngalante/.proxy-settings"));
|
||||
//
|
||||
// ScopeProvider.instance.set("/d4science.research-infrastructures.eu/gCubeApps/RPrototypingLab");
|
||||
// SecurityTokenProvider.instance.set("3a23bfa4-4dfe-44fc-988f-194b91071dd2-843339462");
|
||||
|
||||
|
||||
ScopeProvider.instance.set("/gcube/devNext");
|
||||
SecurityTokenProvider.instance.set("708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548");
|
||||
|
||||
|
||||
|
||||
// AuthorizationEntry entry = authorizationService().get("708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548");
|
||||
SecurityTokenProvider.instance.set("");
|
||||
|
||||
// AuthorizationEntry entry = authorizationService().get("xxxx-xxx-xxxxx-xxxx");
|
||||
// System.out.println(entry.getContext());
|
||||
|
||||
|
||||
RestPoolManager a = new RestPoolManager();
|
||||
|
||||
|
||||
a.stageAlgorithm("http://data-d.d4science.org/TSt3cUpDTG1teUJMemxpcXplVXYzV1lBelVHTTdsYjlHbWJQNStIS0N6Yz0");
|
||||
// //a.publishAlgorithm("http://data.d4science.org/MnovRjZIdGV5WlB0WXE5NVNaZnRoRVg0SU8xZWpWQlFHbWJQNStIS0N6Yz0", "708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548","/gcube/devNext/NextNext");
|
||||
// //a.publishAlgorithm("http://data.d4science.org/MnovRjZIdGV5WlB0WXE5NVNaZnRoRVg0SU8xZWpWQlFHbWJQNStIS0N6Yz0", "xxxx-xxx-xxxx-xxxx","/gcube/devNext/NextNext");
|
||||
// // PoolManager aa = new DataminerPoolManager();
|
||||
//
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Production Testing
|
||||
|
||||
// Production Testing
|
||||
/*
|
||||
stageAlgorithm(Rproto caller token,pacchetto, category)
|
||||
http://node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/rest/algorithm/stage?gcube-token=3a23bfa4-4dfe-44fc-988f-194b91071dd2-843339462&algorithmPackageURL=http://data.d4science.org/dENQTTMxdjNZcGRpK0NHd2pvU0owMFFzN0VWemw3Zy9HbWJQNStIS0N6Yz0&category=ICHTHYOP_MODEL
|
||||
|
||||
publishAlgorithm(Rproto caller token, pacchetto, category, target token, target prod vre)
|
||||
node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/rest/algorithm/add?gcube-token=708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548&algorithmPackageURL=http://data.d4science.org/dENQTTMxdjNZcGRpK0NHd2pvU0owMFFzN0VWemw3Zy9HbWJQNStIS0N6Yz0&category=ICHTHYOP_MODEL&targetVREToken=3a23bfa4-4dfe-44fc-988f-194b91071dd2-843339462&targetVRE=/d4science.research-infrastructures.eu/gCubeApps/RPrototypingLab
|
||||
|
||||
getLogById(Rproto caller token, logid)
|
||||
http://node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/rest/log?gcube-token=3a23bfa4-4dfe-44fc-988f-194b91071dd2-843339462&logUrl=
|
||||
*/
|
||||
|
||||
|
||||
//dev Testing
|
||||
* stageAlgorithm(Rproto caller token,pacchetto, category)
|
||||
* http://node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/
|
||||
* rest/algorithm/stage?gcube-token=xxx-xxx-xxx-xxx&algorithmPackageURL=http://
|
||||
* data.d4science.org/
|
||||
* dENQTTMxdjNZcGRpK0NHd2pvU0owMFFzN0VWemw3Zy9HbWJQNStIS0N6Yz0&category=
|
||||
* ICHTHYOP_MODEL
|
||||
*
|
||||
* publishAlgorithm(Rproto caller token, pacchetto, category, target token,
|
||||
* target prod vre)
|
||||
* node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/rest/
|
||||
* algorithm/add?gcube-token=xxxx-xxxx-xxx-xxx&algorithmPackageURL=http://data.
|
||||
* d4science.org/dENQTTMxdjNZcGRpK0NHd2pvU0owMFFzN0VWemw3Zy9HbWJQNStIS0N6Yz0&
|
||||
* category=ICHTHYOP_MODEL&targetVREToken=xxxx-xxxx-xxxx&targetVRE=/d4science.
|
||||
* research-infrastructures.eu/gCubeApps/RPrototypingLab
|
||||
*
|
||||
* getLogById(Rproto caller token, logid)
|
||||
* http://node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/
|
||||
* rest/log?gcube-token=xxxx-xxx-xxx-xxx&logUrl=
|
||||
*/
|
||||
|
||||
// dev Testing
|
||||
/*
|
||||
stageAlgorithm(dev_caller_vre_token,pacchetto, category)
|
||||
http://node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/rest/algorithm/stage?gcube-token=708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548&algorithmPackageURL=http://data.d4science.org/dENQTTMxdjNZcGRpK0NHd2pvU0owMFFzN0VWemw3Zy9HbWJQNStIS0N6Yz0&category=ICHTHYOP_MODEL
|
||||
|
||||
publishAlgorithm(dev_caller_vre_token, pacchetto, category, target token, target prod vre)
|
||||
http://node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/rest/log?gcube-token=708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548&logUrl=450bb7f9-9e38-4bde-8f4d-f3296f95deba
|
||||
|
||||
getLogById(dev_caller_vre_token, logid)
|
||||
http://node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/rest/log?gcube-token=708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548&logUrl=426c8e35-a624-4710-b612-c90929c32c27 */
|
||||
|
||||
* stageAlgorithm(dev_caller_vre_token,pacchetto, category)
|
||||
* http://node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/
|
||||
* rest/algorithm/stage?gcube-token=xxxx-xxxx-xxxx&algorithmPackageURL=http://
|
||||
* data.d4science.org/
|
||||
* dENQTTMxdjNZcGRpK0NHd2pvU0owMFFzN0VWemw3Zy9HbWJQNStIS0N6Yz0&category=
|
||||
* ICHTHYOP_MODEL
|
||||
*
|
||||
* publishAlgorithm(dev_caller_vre_token, pacchetto, category, target token,
|
||||
* target prod vre)
|
||||
* http://node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/
|
||||
* rest/log?gcube-token=xxxx-xxxx-xxx-xxxx&logUrl=450bb7f9-9e38-4bde-8f4d-
|
||||
* f3296f95deba
|
||||
*
|
||||
* getLogById(dev_caller_vre_token, logid)
|
||||
* http://node2-d-d4s.d4science.org:8080/dataminer-pool-manager-1.0.0-SNAPSHOT/
|
||||
* rest/log?gcube-token=xxx-xxx-xxx-xxx&logUrl=426c8e35-a624-4710-b612-
|
||||
* c90929c32c27
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void getLogId(Algorithm algo, String vre) {
|
||||
|
@ -176,8 +171,6 @@ public class RestPoolManager implements PoolManager
|
|||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public URL getURLfromWorkerLog(String logUrl) throws MalformedURLException, UnknownHostException {
|
||||
// TODO Auto-generated method stub
|
||||
|
@ -196,37 +189,31 @@ public class RestPoolManager implements PoolManager
|
|||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<String> updateSVN(String file, List<String> ldep) throws SVNException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String addAlgorithmToHost(Algorithm algo, String host, boolean test)
|
||||
public String addAlgorithmToHost(Algorithm algo, String host, boolean test)
|
||||
throws IOException, InterruptedException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String addAlgorithmToVRE(Algorithm algo, String vre, boolean test)
|
||||
throws IOException, InterruptedException {
|
||||
public String addAlgorithmToVRE(Algorithm algo, String vre, boolean test) throws IOException, InterruptedException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String stageAlgorithm(String algorithmPackageURL) throws IOException, InterruptedException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String publishAlgorithm(String algorithmPackageURL, String targetVREToken, String targetVRE)
|
||||
throws IOException, InterruptedException {
|
||||
|
@ -234,12 +221,4 @@ public class RestPoolManager implements PoolManager
|
|||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/service/DMPMJob.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/service/DMPMJob.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/service/DataminerPoolManager.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/service/DataminerPoolManager.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/service/ProductionPublishingJob.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/service/ProductionPublishingJob.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/service/StagingJob.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/service/StagingJob.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/AlgorithmBuilder.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/AlgorithmBuilder.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/CheckMethod.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/CheckMethod.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/CheckPermission.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/CheckPermission.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/ClusterBuilder.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/ClusterBuilder.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/NotificationHelper.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/NotificationHelper.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/PropertiesBasedProxySelector.java
Normal file → Executable file
0
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/PropertiesBasedProxySelector.java
Normal file → Executable file
|
@ -14,11 +14,10 @@ public class SVNRepositoryManager {
|
|||
|
||||
private SVNRepository svnRepository;
|
||||
private static SVNRepositoryManager instance;
|
||||
private Logger logger;
|
||||
private Logger logger=LoggerFactory.getLogger(SVNRepositoryManager.class);
|
||||
|
||||
private SVNRepositoryManager (Configuration configuration) throws SVNException
|
||||
{
|
||||
this.logger = LoggerFactory.getLogger(SVNRepositoryManager.class);
|
||||
org.gcube.dataanalysis.dataminer.poolmanager.clients.configuration.SVNRepository repository = configuration.getSVNRepository();
|
||||
this.svnRepository = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(repository.getBaseUrl()));
|
||||
ISVNAuthenticationManager authManager = null;
|
||||
|
|
42
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/SVNUpdater.java
Normal file → Executable file
42
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/SVNUpdater.java
Normal file → Executable file
|
@ -45,12 +45,11 @@ public abstract class SVNUpdater {
|
|||
|
||||
private SVNRepository svnRepository;
|
||||
private Configuration configuration;
|
||||
private Logger logger;
|
||||
private Logger logger=LoggerFactory.getLogger(SVNUpdater.class);
|
||||
|
||||
public SVNUpdater(Configuration configuration) throws SVNException {
|
||||
this.configuration = configuration;
|
||||
this.svnRepository = SVNRepositoryManager.getInstance(configuration).getSvnRepository();
|
||||
this.logger = LoggerFactory.getLogger(SVNUpdater.class);
|
||||
}
|
||||
|
||||
// public void updateRPRotoDeps(Algorithm algorithm) {
|
||||
|
@ -72,7 +71,7 @@ public abstract class SVNUpdater {
|
|||
|
||||
private String getDependencyFile (Configuration configuration, String language)
|
||||
{
|
||||
this.logger.debug("Getting dependency file for language "+language);
|
||||
logger.debug("Getting dependency file for language "+language);
|
||||
|
||||
switch (language)
|
||||
{
|
||||
|
@ -123,7 +122,7 @@ public abstract class SVNUpdater {
|
|||
|
||||
private void updateAlgorithmList(String svnMainAlgoRepo, File algorithmsFile) throws SVNException, SVNCommitException
|
||||
{
|
||||
this.logger.debug("Adding .jar file: " + algorithmsFile + " to repository " + svnMainAlgoRepo);
|
||||
logger.debug("Adding .jar file: " + algorithmsFile + " to repository " + svnMainAlgoRepo);
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -137,7 +136,7 @@ public abstract class SVNUpdater {
|
|||
}
|
||||
catch (FileNotFoundException e)
|
||||
{
|
||||
this.logger.error("Temporary algorithm file not found: this exception should not happen",e);
|
||||
logger.error("Temporary algorithm file not found: this exception should not happen",e);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -149,7 +148,7 @@ public abstract class SVNUpdater {
|
|||
|
||||
public void putFile(FileInputStream fileInputSreeam, String destinationFolder, String fileName) throws SVNException, SVNCommitException
|
||||
{
|
||||
this.logger.debug("Putting new file on the SVN repository");
|
||||
logger.debug("Putting new file on the SVN repository");
|
||||
final ISVNEditor commitEditor = svnRepository.getCommitEditor("Add algorithm to list", null);
|
||||
commitEditor.openRoot(-1);
|
||||
commitEditor.openDir(destinationFolder, -1);
|
||||
|
@ -166,17 +165,17 @@ public abstract class SVNUpdater {
|
|||
|
||||
if (errorMessage != null)
|
||||
{
|
||||
this.logger.error("Operation failed: "+errorMessage.getFullMessage());
|
||||
logger.error("Operation failed: "+errorMessage.getFullMessage());
|
||||
throw new SVNCommitException(errorMessage,fileName);
|
||||
}
|
||||
|
||||
this.logger.debug("Operation completed");
|
||||
logger.debug("Operation completed");
|
||||
}
|
||||
|
||||
|
||||
public void updateFile(FileInputStream fileInputStream, String destinationFolder, String fileName) throws SVNException, SVNCommitException {
|
||||
|
||||
this.logger.debug("Updating existing file on the SVN repository");
|
||||
logger.debug("Updating existing file on the SVN repository");
|
||||
final ISVNEditor commitEditor = svnRepository.getCommitEditor("Updating algorithm", null);
|
||||
commitEditor.openRoot(-1);
|
||||
commitEditor.openDir(destinationFolder, -1);
|
||||
|
@ -197,12 +196,12 @@ public abstract class SVNUpdater {
|
|||
|
||||
if (errorMessage != null)
|
||||
{
|
||||
this.logger.error("Operation failed: "+errorMessage.getFullMessage());
|
||||
logger.error("Operation failed: "+errorMessage.getFullMessage());
|
||||
|
||||
throw new SVNCommitException(errorMessage,fileName+" to be updated");
|
||||
}
|
||||
|
||||
this.logger.debug("Operation completed");
|
||||
logger.debug("Operation completed");
|
||||
}
|
||||
|
||||
|
||||
|
@ -231,7 +230,7 @@ public abstract class SVNUpdater {
|
|||
boolean response = false;
|
||||
|
||||
try {
|
||||
this.logger.debug("Updating algorithm list: " + file);
|
||||
logger.debug("Updating algorithm list: " + file);
|
||||
final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
||||
svnRepository.getFile(file, SVNRepository.INVALID_REVISION, null, byteArrayOutputStream);
|
||||
String lines[] = byteArrayOutputStream.toString().split("\\r?\\n");
|
||||
|
@ -277,7 +276,7 @@ public abstract class SVNUpdater {
|
|||
|
||||
if (errorMessage != null)
|
||||
{
|
||||
this.logger.error("Operation failed: "+errorMessage.getFullMessage());
|
||||
logger.error("Operation failed: "+errorMessage.getFullMessage());
|
||||
response = false;
|
||||
}
|
||||
else response = true;
|
||||
|
@ -286,7 +285,7 @@ public abstract class SVNUpdater {
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.logger.error("Unable to commit algorithm list",ex);
|
||||
logger.error("Unable to commit algorithm list",ex);
|
||||
response = false;
|
||||
}
|
||||
|
||||
|
@ -314,7 +313,7 @@ public abstract class SVNUpdater {
|
|||
sb.append("none | ");
|
||||
sb.append(this.getTimeZone() + " | ");
|
||||
|
||||
this.logger.info("Algo details: "+sb.toString());
|
||||
logger.info("Algo details: "+sb.toString());
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
@ -337,7 +336,7 @@ public abstract class SVNUpdater {
|
|||
}
|
||||
|
||||
|
||||
this.logger.debug("Checking dependencies list: " + file);
|
||||
logger.debug("Checking dependencies list: " + file);
|
||||
|
||||
|
||||
List<String> validDependencies = new LinkedList<String>();
|
||||
|
@ -351,7 +350,7 @@ public abstract class SVNUpdater {
|
|||
validDependencies.add(l.trim());
|
||||
}}
|
||||
|
||||
this.logger.debug("Valid dependencies are: "+validDependencies);
|
||||
logger.debug("Valid dependencies are: "+validDependencies);
|
||||
for(Dependency d: deps){
|
||||
String depName = d.getName();
|
||||
if(!validDependencies.contains(depName)){
|
||||
|
@ -410,6 +409,7 @@ public abstract class SVNUpdater {
|
|||
// return check;
|
||||
} catch (SVNException e)
|
||||
{
|
||||
logger.error(e.getLocalizedMessage(),e);
|
||||
throw new GenericException(e);
|
||||
}
|
||||
|
||||
|
@ -423,7 +423,7 @@ public abstract class SVNUpdater {
|
|||
|
||||
boolean check = false;
|
||||
try {
|
||||
this.logger.info("Checking dependencies list: " + file);
|
||||
logger.info("Checking dependencies list: " + file);
|
||||
final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
||||
svnRepository.getFile(file, SVNRepository.INVALID_REVISION, null, byteArrayOutputStream);
|
||||
String lines[] = byteArrayOutputStream.toString().split("\\r?\\n");
|
||||
|
@ -454,7 +454,7 @@ public abstract class SVNUpdater {
|
|||
// }
|
||||
} catch (Exception a)
|
||||
{
|
||||
this.logger.error(a.getMessage(),a);
|
||||
logger.error(a.getMessage(),a);
|
||||
|
||||
}
|
||||
|
||||
|
@ -464,7 +464,7 @@ public abstract class SVNUpdater {
|
|||
|
||||
public void updateSVN(String file, Collection<Dependency> deps) {
|
||||
try {
|
||||
this.logger.info("Updating dependencies list: " + file);
|
||||
logger.info("Updating dependencies list: " + file);
|
||||
|
||||
final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
||||
svnRepository.getFile(file, SVNRepository.INVALID_REVISION, null, byteArrayOutputStream);
|
||||
|
@ -543,7 +543,7 @@ public abstract class SVNUpdater {
|
|||
Date fromDate = formatter.parse(cal.getTime().toString());
|
||||
TimeZone central = TimeZone.getTimeZone("UTC");
|
||||
formatter.setTimeZone(central);
|
||||
this.logger.info(formatter.format(fromDate));
|
||||
logger.info(formatter.format(fromDate));
|
||||
return formatter.format(fromDate);
|
||||
}
|
||||
|
||||
|
|
446
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/SendMail.java
Normal file → Executable file
446
src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/SendMail.java
Normal file → Executable file
|
@ -8,12 +8,11 @@ import java.io.BufferedReader;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.LinkedList;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
|
@ -23,141 +22,187 @@ import org.apache.http.util.EntityUtils;
|
|||
import org.gcube.common.authorization.client.exceptions.ObjectNotFound;
|
||||
import org.gcube.common.authorization.library.AuthorizationEntry;
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.common.encryption.encrypter.StringEncrypter;
|
||||
import org.gcube.common.resources.gcore.GCoreEndpoint;
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.gcube.common.resources.gcore.ServiceEndpoint;
|
||||
import org.gcube.common.resources.gcore.ServiceEndpoint.AccessPoint;
|
||||
import org.gcube.common.resources.gcore.ServiceEndpoint.Property;
|
||||
import org.gcube.common.resources.gcore.utils.Group;
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.clients.configuration.DMPMClientConfiguratorManager;
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.util.exception.EMailException;
|
||||
import org.gcube.resources.discovery.client.api.DiscoveryClient;
|
||||
import org.gcube.resources.discovery.client.queries.api.SimpleQuery;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class SendMail {
|
||||
|
||||
public class SendMail {
|
||||
|
||||
private Logger logger;
|
||||
private final String WRITE_MESSAGE_ADDRESS_PATH ="messages/writeMessageToUsers?gcube-token=",
|
||||
USER_ROLES_ADDRESS_PATH ="2/users/get-usernames-by-role?role-name=DataMiner-Manager&gcube-token=",
|
||||
ENCODING = "UTF-8",
|
||||
SENDER_PARAMETER_FORMAT = "&sender=dataminer&recipients=%s&subject=%s&body=%s",
|
||||
SOCIAL_SERVICE_QUERY_CONDITION ="$resource/Profile/ServiceName/text() eq 'SocialNetworking'",
|
||||
SOCIAL_SERVICE_URI="jersey-servlet",
|
||||
JSON_MIME_TYPE = "application/json";
|
||||
private static final Logger logger = LoggerFactory.getLogger(SendMail.class);
|
||||
|
||||
private static final String WRITE_MESSAGE_ADDRESS_PATH = "2/messages/write-message?gcube-token=";
|
||||
private static final String USER_ROLES_ADDRESS_PATH = "2/users/get-usernames-by-role?role-name=DataMiner-Manager&gcube-token=";
|
||||
private static final String SOCIAL_SERVICE_QUERY_CONDITION = "$resource/Profile/ServiceName/text() eq 'SocialNetworking'";
|
||||
private static final String SOCIAL_SERVICE_URI = "jersey-servlet", JSON_MIME_TYPE = "application/json";
|
||||
private static final String DMPOOLMANAGER_SERVICE_QUERY_CONDITION = "$resource/Profile/Name/text() eq 'DMPoolManager'";
|
||||
|
||||
|
||||
private String socialServiceAddress;
|
||||
private String applicationToken;
|
||||
|
||||
public SendMail() {
|
||||
this.logger = LoggerFactory.getLogger(SendMail.class);
|
||||
|
||||
}
|
||||
|
||||
private String getRequestMessage (String addressPath)
|
||||
{
|
||||
String serviceAddress = this.getSocialService();
|
||||
StringBuilder requestMessageBuilder = new StringBuilder(serviceAddress);
|
||||
|
||||
if (!serviceAddress.endsWith("/")) requestMessageBuilder.append('/');
|
||||
|
||||
requestMessageBuilder.append(addressPath).append(SecurityTokenProvider.instance.get());
|
||||
String requestForMessage = requestMessageBuilder.toString();
|
||||
this.logger.debug("Request "+requestForMessage);
|
||||
return requestForMessage;
|
||||
public void sendNotification(String subject, String body) throws EMailException {
|
||||
logger.debug("SendNotification");
|
||||
logger.debug("Notification Subject: " + subject);
|
||||
logger.debug("Notification Body: " + body);
|
||||
|
||||
applicationToken = retrieveApplicationToken();
|
||||
|
||||
retrieveSocialService();
|
||||
|
||||
String postBody = createPostBody(subject, body);
|
||||
|
||||
sendPostRequest(postBody);
|
||||
|
||||
}
|
||||
|
||||
public void sendNotification(String subject, String body) throws EMailException
|
||||
{
|
||||
this.logger.debug("Sending mail notification for "+subject);
|
||||
this.logger.debug("Body "+body);
|
||||
|
||||
|
||||
private String createPostBody(String subject, String body) throws EMailException {
|
||||
try {
|
||||
List<String> recipientsList = getRecipients();
|
||||
if (recipientsList == null || recipientsList.isEmpty()) {
|
||||
logger.error("Invalid recipient list: " + recipientsList);
|
||||
throw new EMailException("Unable to send email notification. Invalid recipient list:" + recipientsList);
|
||||
}
|
||||
|
||||
// {"subject": "subject-content", "body": "body-content",
|
||||
// "recipients":[{"id":"userid"}]}
|
||||
|
||||
//AnalysisLogger.getLogger().debug("Emailing System->Request url is going to be " + requestForMessage);
|
||||
JSONObject data = new JSONObject();
|
||||
data.put("subject", subject);
|
||||
data.put("body", body);
|
||||
|
||||
JSONArray recipients = new JSONArray();
|
||||
for (String recipient : recipientsList) {
|
||||
JSONObject d = new JSONObject();
|
||||
d.put("id", recipient);
|
||||
recipients.put(d);
|
||||
}
|
||||
data.put("recipients", recipients);
|
||||
|
||||
logger.debug("Post Body: " + data);
|
||||
return data.toString();
|
||||
|
||||
} catch (EMailException e) {
|
||||
throw e;
|
||||
} catch (Throwable e) {
|
||||
logger.error("Error creating the notification body: " + e.getLocalizedMessage(), e);
|
||||
throw new EMailException(e);
|
||||
|
||||
// put the sender, the recipients, subject and body of the mail here
|
||||
|
||||
try
|
||||
{
|
||||
subject = URLEncoder.encode(subject, ENCODING);
|
||||
body = URLEncoder.encode(body, ENCODING);
|
||||
}
|
||||
catch (UnsupportedEncodingException e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private String retrieveApplicationToken() throws EMailException {
|
||||
try {
|
||||
logger.info("Retrieve Application Token");
|
||||
SimpleQuery query = queryFor(ServiceEndpoint.class);
|
||||
query.addCondition(DMPOOLMANAGER_SERVICE_QUERY_CONDITION);
|
||||
DiscoveryClient<ServiceEndpoint> client = clientFor(ServiceEndpoint.class);
|
||||
List<ServiceEndpoint> resources = client.submit(query);
|
||||
if (resources.isEmpty()) {
|
||||
logger.error("No services resource found on IS!");
|
||||
} else {
|
||||
logger.debug("Retrieved: " + resources.get(0));
|
||||
}
|
||||
|
||||
Group<AccessPoint> accessPoints = resources.get(0).profile().accessPoints();
|
||||
if (!accessPoints.isEmpty()) {
|
||||
Iterator<AccessPoint> iterator = accessPoints.iterator();
|
||||
AccessPoint ap = iterator.next();
|
||||
Group<Property> props = ap.properties();
|
||||
if (!props.isEmpty()) {
|
||||
Iterator<Property> iteratorProps = props.iterator();
|
||||
Property p = iteratorProps.next();
|
||||
String applicationToken = StringEncrypter.getEncrypter().decrypt(p.value());
|
||||
logger.debug("Application token found: " + applicationToken);
|
||||
logger.info("Application Token retrieved");
|
||||
return applicationToken;
|
||||
|
||||
} else {
|
||||
String error = "DMPoolManager application token not found in service resource on IS!";
|
||||
logger.error(error);
|
||||
throw new EMailException(error);
|
||||
}
|
||||
} else {
|
||||
String error = "DMPoolManager invalid service resource on IS!";
|
||||
logger.error(error);
|
||||
throw new EMailException(error);
|
||||
}
|
||||
|
||||
} catch (Throwable e) {
|
||||
logger.error("DMPoolManager application token not found: " + e.getLocalizedMessage(), e);
|
||||
throw new EMailException("DMPoolManager application token not found: " + e.getLocalizedMessage(), e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void retrieveSocialService() throws EMailException {
|
||||
try {
|
||||
SimpleQuery query = queryFor(GCoreEndpoint.class);
|
||||
query.addCondition(SOCIAL_SERVICE_QUERY_CONDITION);
|
||||
DiscoveryClient<GCoreEndpoint> client = clientFor(GCoreEndpoint.class);
|
||||
List<GCoreEndpoint> resources = client.submit(query);
|
||||
socialServiceAddress = resources.get(0).profile().endpointMap().get(SOCIAL_SERVICE_URI).uri().toString();
|
||||
logger.info("Retrieved Social Service Address: " + socialServiceAddress);
|
||||
if (socialServiceAddress == null || socialServiceAddress.isEmpty()) {
|
||||
throw new EMailException(
|
||||
"Unable to send email notification. Invalid address in GCoreEndpoint resource on IS.");
|
||||
}
|
||||
} catch (EMailException e) {
|
||||
logger.error(e.getLocalizedMessage(), e);
|
||||
throw e;
|
||||
} catch (Throwable e) {
|
||||
logger.error(e.getLocalizedMessage(), e);
|
||||
throw new EMailException(e);
|
||||
}
|
||||
|
||||
String requestForMessage = getRequestMessage(WRITE_MESSAGE_ADDRESS_PATH);
|
||||
requestForMessage = requestForMessage.replace("http://", "https://").replace(":80", "");
|
||||
|
||||
String requestParameters = String.format(SENDER_PARAMETER_FORMAT, this.getAdmins(), subject , body);
|
||||
|
||||
|
||||
String response = this.sendPostRequest(requestForMessage, requestParameters);
|
||||
//AnalysisLogger.getLogger().debug("Emailing System->Emailing response OK ");
|
||||
|
||||
if (response == null) throw new EMailException();
|
||||
|
||||
}
|
||||
|
||||
// public void notifySubmitter(String a, String b) throws Exception {
|
||||
// NotificationHelper nh = new NotificationHelper();
|
||||
// super.sendNotification(nh.getSubject(),
|
||||
// nh.getBody());
|
||||
// }
|
||||
|
||||
public String username(String token) throws ObjectNotFound, Exception {
|
||||
private String username(String token) throws ObjectNotFound, Exception {
|
||||
AuthorizationEntry entry = authorizationService().get(token);
|
||||
this.logger.debug(entry.getClientInfo().getId());
|
||||
logger.debug(entry.getClientInfo().getId());
|
||||
return entry.getClientInfo().getId();
|
||||
}
|
||||
|
||||
// public String retrieveAdminRole() throws Exception {
|
||||
// String serviceAddress = InfraRetrieval.findEmailingSystemAddress(ScopeProvider.instance.get());
|
||||
//
|
||||
// if (!serviceAddress.endsWith("/"))
|
||||
// serviceAddress = serviceAddress + "/";
|
||||
//
|
||||
// String requestForMessage = serviceAddress + "2/users/get-usernames-by-global-role";
|
||||
// requestForMessage = requestForMessage.replace("https://", "http://").replace(":80", "");
|
||||
// String requestParameters = "&role-name=Administrator" + "&gcube-token=" + SecurityTokenProvider.instance.get();
|
||||
//
|
||||
// String response = HttpRequest.sendGetRequest(requestForMessage, requestParameters);
|
||||
// System.out.println(response.toString());
|
||||
//
|
||||
// if (response == null) {
|
||||
// Exception e = new Exception("Error in querying the recipient");
|
||||
// throw e;
|
||||
// }
|
||||
// return response;
|
||||
//
|
||||
// }
|
||||
|
||||
public String getSocialService() {
|
||||
SimpleQuery query = queryFor(GCoreEndpoint.class);
|
||||
query.addCondition(SOCIAL_SERVICE_QUERY_CONDITION);
|
||||
DiscoveryClient<GCoreEndpoint> client = clientFor(GCoreEndpoint.class);
|
||||
List<GCoreEndpoint> resources = client.submit(query);
|
||||
String a = resources.get(0).profile().endpointMap().get(SOCIAL_SERVICE_URI).uri().toString();
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String sendPostRequest(String endpoint, String requestParameters) {
|
||||
private void sendPostRequest(String postBody) throws EMailException {
|
||||
|
||||
this.logger.debug("Sending post request");
|
||||
// Build parameter string
|
||||
String data = requestParameters;
|
||||
try {
|
||||
logger.info("Execute Post Body:" + postBody);
|
||||
|
||||
StringBuilder requestMessageBuilder = new StringBuilder(socialServiceAddress);
|
||||
|
||||
if (!socialServiceAddress.endsWith("/"))
|
||||
requestMessageBuilder.append('/');
|
||||
|
||||
requestMessageBuilder.append(WRITE_MESSAGE_ADDRESS_PATH);
|
||||
logger.info("Execute Post Request: " + requestMessageBuilder.toString());
|
||||
requestMessageBuilder.append(applicationToken);
|
||||
String endpoint = requestMessageBuilder.toString();
|
||||
|
||||
// Send the request
|
||||
URL url = new URL(endpoint);
|
||||
URLConnection conn = url.openConnection();
|
||||
|
||||
conn.setRequestProperty("Accept", JSON_MIME_TYPE);
|
||||
conn.setRequestProperty("Content-Type", JSON_MIME_TYPE);
|
||||
conn.setDoOutput(true);
|
||||
OutputStreamWriter writer = new OutputStreamWriter(conn.getOutputStream());
|
||||
|
||||
// write parameters
|
||||
writer.write(data);
|
||||
OutputStreamWriter writer = new OutputStreamWriter(conn.getOutputStream());
|
||||
writer.write(postBody);
|
||||
writer.flush();
|
||||
|
||||
// Get the response
|
||||
|
@ -170,125 +215,102 @@ public class SendMail {
|
|||
writer.close();
|
||||
reader.close();
|
||||
|
||||
this.logger.debug("Operation completed");
|
||||
String response = answer.toString();
|
||||
this.logger.debug("Response "+response);
|
||||
// Output the response
|
||||
return response;
|
||||
logger.debug("Operation completed");
|
||||
String response = answer.toString();
|
||||
logger.info("Notification Response: " + response);
|
||||
checkResponse(response);
|
||||
|
||||
} catch (MalformedURLException ex) {
|
||||
this.logger.error("Invalid URL",ex);
|
||||
} catch (IOException ex) {
|
||||
|
||||
this.logger.error("Error in the IO process",ex);
|
||||
} catch (EMailException e) {
|
||||
throw e;
|
||||
} catch (MalformedURLException e) {
|
||||
logger.error("Invalid URL: " + e.getLocalizedMessage(), e);
|
||||
throw new EMailException(e);
|
||||
} catch (IOException e) {
|
||||
logger.error("Error in the IO process: " + e.getLocalizedMessage(), e);
|
||||
throw new EMailException(e);
|
||||
} catch (Throwable e) {
|
||||
logger.error("Error executing post:" + e.getLocalizedMessage(), e);
|
||||
throw new EMailException(e);
|
||||
}
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public String getAdminRoles() throws Exception{
|
||||
|
||||
// discover social gcore endpoint
|
||||
|
||||
//GcoreEndpointReader ep = new GcoreEndpointReader(ScopeProvider.instance.get());
|
||||
|
||||
|
||||
String serviceAddress = getRequestMessage(USER_ROLES_ADDRESS_PATH);
|
||||
//String serviceAddress = InfraRetrieval.findEmailingSystemAddress(ScopeProvider.instance.get());
|
||||
|
||||
|
||||
//String serviceAddress = ep.getResourceEntyName();//"https://socialnetworking1.d4science.org/social-networking-library-ws/rest/";
|
||||
// serviceAddress = serviceAddress.endsWith("/") ? serviceAddress : serviceAddress + "/";
|
||||
// serviceAddress+= "2/users/get-usernames-by-role?role-name=DataMiner-Manager&gcube-token=" + SecurityTokenProvider.instance.get();
|
||||
|
||||
this.logger.debug("Admin roles url is " + serviceAddress);
|
||||
|
||||
|
||||
private void checkResponse(String response) throws EMailException {
|
||||
if (response == null) {
|
||||
logger.error("Invalid notification response: " + response);
|
||||
throw new EMailException();
|
||||
} else {
|
||||
try {
|
||||
JSONObject res = new JSONObject(response);
|
||||
boolean success = res.getBoolean("success");
|
||||
if (!success) {
|
||||
String message = res.getString("message");
|
||||
logger.error("Error in send email notification: " + message);
|
||||
throw new EMailException("Error in send email notification: " + message);
|
||||
}
|
||||
|
||||
} catch (JSONException e) {
|
||||
logger.error("Invalid notification response: " + response);
|
||||
throw new EMailException(e);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private List<String> getRecipients() {
|
||||
try {
|
||||
List<String> recipients = new ArrayList<String>();
|
||||
String dataMinerManagers = retrieveDataMinerManagers();
|
||||
logger.debug("Retrieved DataMiner Managers: " + dataMinerManagers);
|
||||
if (dataMinerManagers != null && !dataMinerManagers.isEmpty()) {
|
||||
JSONObject obj = new JSONObject(dataMinerManagers);
|
||||
JSONArray data = obj.getJSONArray("result");
|
||||
if (data != null) {
|
||||
for (int i = 0; i < data.length(); i++) {
|
||||
recipients.add(data.getString(i));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
logger.info("Use the default admins how workaround ");
|
||||
List<String> defaultManagers = DMPMClientConfiguratorManager.getInstance().getDefaultAdmins();
|
||||
recipients.addAll(defaultManagers);
|
||||
}
|
||||
recipients.add(this.username(SecurityTokenProvider.instance.get()));
|
||||
|
||||
logger.info("Retrieved Recipients: " + recipients);
|
||||
return recipients;
|
||||
} catch (Exception e) {
|
||||
logger.error("Error retrieving recipients: " + e.getLocalizedMessage(), e);
|
||||
logger.info("Use the default admins how workaround ");
|
||||
return DMPMClientConfiguratorManager.getInstance().getDefaultAdmins();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private String retrieveDataMinerManagers() throws Exception {
|
||||
// Try to retrieve a url like this:
|
||||
// https://api.d4science.org/social-networking-library-ws/rest/2/users/get-usernames-by-role?role-name=DataMiner-Manager&gcube-token=xxx-xxxx-xxxx-xxx
|
||||
|
||||
StringBuilder requestMessageBuilder = new StringBuilder(socialServiceAddress);
|
||||
|
||||
if (!socialServiceAddress.endsWith("/"))
|
||||
requestMessageBuilder.append('/');
|
||||
|
||||
requestMessageBuilder.append(USER_ROLES_ADDRESS_PATH);
|
||||
logger.info("Request Admins Url: " + requestMessageBuilder.toString());
|
||||
// SecurityTokenProvider.instance.get()
|
||||
requestMessageBuilder.append(applicationToken);
|
||||
|
||||
String requestAdminsUrl = requestMessageBuilder.toString();
|
||||
|
||||
CloseableHttpClient client = HttpClientBuilder.create().build();
|
||||
HttpGet getReq = new HttpGet(serviceAddress);
|
||||
HttpGet getReq = new HttpGet(requestAdminsUrl);
|
||||
getReq.setHeader("accept", JSON_MIME_TYPE);
|
||||
getReq.setHeader("content-type", JSON_MIME_TYPE);
|
||||
this.logger.info(EntityUtils.toString(client.execute(getReq).getEntity()));
|
||||
|
||||
logger.info("Response: " + EntityUtils.toString(client.execute(getReq).getEntity()));
|
||||
|
||||
return EntityUtils.toString(client.execute(getReq).getEntity());
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getAdmins(){
|
||||
try{
|
||||
List<String> s = new LinkedList<String>();
|
||||
JSONObject obj = new JSONObject(this.getAdminRoles());
|
||||
JSONArray data = obj.getJSONArray("result");
|
||||
if (data != null) {
|
||||
String[] names = new String[data.length()];
|
||||
for (int i = 0; i < data.length(); i++) {
|
||||
names[i] = data.getString(i);
|
||||
s.add(names[i]);
|
||||
}
|
||||
s.add(this.username(SecurityTokenProvider.instance.get()));
|
||||
}
|
||||
return s.toString().replace("[", "").replace("]", "");
|
||||
}
|
||||
catch(Exception a){return DMPMClientConfiguratorManager.getInstance().getDefaultAdmins(); }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// public String getRootToken() throws Exception {
|
||||
//
|
||||
// //ApplicationContext ctx = ContextProvider.get(); // get this info from
|
||||
// // SmartGears
|
||||
// //System.out.println(ctx.container().configuration().infrastructure());
|
||||
// String a = "";
|
||||
// SimpleQuery query2 = queryFor(ServiceEndpoint.class);
|
||||
// query2.addCondition("$resource/Profile/Name/text() eq 'SAIService'").setResult("$resource");
|
||||
//
|
||||
// DiscoveryClient<ServiceEndpoint> client2 = clientFor(ServiceEndpoint.class);
|
||||
// List<ServiceEndpoint> df = client2.submit(query2);
|
||||
//
|
||||
// for (ServiceEndpoint b : df) {
|
||||
// a = StringEncrypter.getEncrypter().decrypt(b.profile().accessPoints().iterator().next().password());
|
||||
// }
|
||||
// return a;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
//ScopeProvider.instance.set("/d4science.research-infrastructures.eu/gCubeApps/RPrototypingLab");
|
||||
//SecurityTokenProvider.instance.set("3a23bfa4-4dfe-44fc-988f-194b91071dd2-843339462");
|
||||
|
||||
//ScopeProvider.instance.set("/gcube/devNext");
|
||||
//SecurityTokenProvider.instance.set("aa6eec71-fe07-43ab-bd1c-f03df293e430-98187548");
|
||||
|
||||
//NotificationHelper nh = new NotificationHelper();
|
||||
|
||||
SendMail sm = new SendMail();
|
||||
|
||||
//ScopeProvider.instance.set("/gcube/devNext/NextNext");
|
||||
//SecurityTokenProvider.instance.set("708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548");
|
||||
//System.out.println(sm.getRootToken());
|
||||
//sm.getGenericResourceByName("");
|
||||
|
||||
ScopeProvider.instance.set("/gcube/preprod/preVRE");
|
||||
SecurityTokenProvider.instance.set("2eceaf27-0e22-4dbe-8075-e09eff199bf9-98187548");
|
||||
|
||||
|
||||
//sm.sendNotification(nh.getFailedSubject(), nh.getFailedBody("test failed"));
|
||||
// sm.username(SecurityTokenProvider.instance.get());
|
||||
//sm.retrieveAdminRole();
|
||||
//sm.getAdminRoles();
|
||||
System.out.println(sm.getAdmins());
|
||||
//System.out.println(sm.getAdmins());
|
||||
//sm.sendNotification("test", "test");
|
||||
//System.out.println(sm.getSocialService());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,23 +2,27 @@ package org.gcube.dataanalysis.dataminer.poolmanager.util.exception;
|
|||
|
||||
public class EMailException extends Exception {
|
||||
|
||||
|
||||
private static final String MESSAGE = "Unable to send email notification";
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public EMailException() {
|
||||
super (MESSAGE);
|
||||
}
|
||||
|
||||
public EMailException(Throwable cause) {
|
||||
super (MESSAGE,cause);
|
||||
super(MESSAGE);
|
||||
}
|
||||
|
||||
public EMailException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public EMailException(String message, Throwable e) {
|
||||
super(message, e);
|
||||
}
|
||||
|
||||
public EMailException(Throwable e) {
|
||||
super(MESSAGE, e);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ public class CheckMethodProduction extends CheckMethod{
|
|||
|
||||
|
||||
//a.copyFromDmToSVN(aa);
|
||||
// if (a.checkMethod("dataminer-ghost-d.dev.d4science.org", "708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548")){
|
||||
// if (a.checkMethod("dataminer-ghost-d.dev.d4science.org", "xxx-xxx-xxx-xxx")){
|
||||
// System.out.println("AAA"); }
|
||||
//
|
||||
// if (a.doesExist("/home/gcube/wps_algorithms/algorithms/WINDOWS_BLACK_BOX_EXAMPLE.jar")){
|
||||
|
@ -63,15 +63,14 @@ public class CheckMethodProduction extends CheckMethod{
|
|||
|
||||
|
||||
//System.out.println(a.checkMethod("dataminer-ghost-t.pre.d4science.org",
|
||||
// "2eceaf27-0e22-4dbe-8075-e09eff199bf9-98187548"));
|
||||
|
||||
//System.out.println(a.checkMethod("dataminer-proto-ghost.d4science.org",
|
||||
// "3a23bfa4-4dfe-44fc-988f-194b91071dd2-843339462"));
|
||||
// "xxx-xxxx-xxx-xx"));
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
a.checkMethod("dataminer-ghost-d.dev.d4science.org",
|
||||
"708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548");
|
||||
a.checkMethod("dataminer-ghost.cloud-dev.d4science.org",
|
||||
"xxx-xxx-xxx-xxx");
|
||||
} catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
|
@ -85,7 +84,7 @@ public class CheckMethodProduction extends CheckMethod{
|
|||
////
|
||||
//ServiceConfiguration bp = new ServiceConfiguration();
|
||||
////
|
||||
//SecurityTokenProvider.instance.set("708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548");
|
||||
//SecurityTokenProvider.instance.set("xxxx-xxx-xxx-xxx");
|
||||
////
|
||||
//if (a.checkMethod(bp.getStagingHost(), SecurityTokenProvider.instance.get())&&a.algoExists(aa)); {
|
||||
//System.out.println("ciao");
|
||||
|
|
|
@ -38,7 +38,7 @@ public class CheckMethodStaging extends CheckMethod{
|
|||
|
||||
|
||||
//a.copyFromDmToSVN(aa);
|
||||
// if (a.checkMethod("dataminer-ghost-d.dev.d4science.org", "708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548")){
|
||||
// if (a.checkMethod("dataminer-ghost-d.dev.d4science.org", "xxxx-xxxx-xxx-xxx")){
|
||||
// System.out.println("AAA"); }
|
||||
//
|
||||
// if (a.doesExist("/home/gcube/wps_algorithms/algorithms/WINDOWS_BLACK_BOX_EXAMPLE.jar")){
|
||||
|
@ -55,15 +55,15 @@ public class CheckMethodStaging extends CheckMethod{
|
|||
|
||||
|
||||
//System.out.println(a.checkMethod("dataminer-ghost-t.pre.d4science.org",
|
||||
// "2eceaf27-0e22-4dbe-8075-e09eff199bf9-98187548"));
|
||||
// "xxxx-xxx-xxx-xxx"));
|
||||
|
||||
//System.out.println(a.checkMethod("dataminer-proto-ghost.d4science.org",
|
||||
// "3a23bfa4-4dfe-44fc-988f-194b91071dd2-843339462"));
|
||||
// "xxx-xxx-xxx-xxx"));
|
||||
|
||||
try
|
||||
{
|
||||
a.checkMethod("dataminer-ghost-d.dev.d4science.org",
|
||||
"708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548");
|
||||
"xxxx-xxxx-xxxx-xxxx");
|
||||
} catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
|
@ -77,7 +77,8 @@ public class CheckMethodStaging extends CheckMethod{
|
|||
////
|
||||
//ServiceConfiguration bp = new ServiceConfiguration();
|
||||
////
|
||||
//SecurityTokenProvider.instance.set("708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548");
|
||||
//SecurityTokenProvider.instance.set("xxx-xxx-xxx-xxx");
|
||||
|
||||
////
|
||||
//if (a.checkMethod(bp.getStagingHost(), SecurityTokenProvider.instance.get())&&a.algoExists(aa)); {
|
||||
//System.out.println("ciao");
|
||||
|
|
|
@ -6,7 +6,7 @@ svn.algo.main.repo = /trunk/data-analysis/DataMinerConfiguration/algorithms
|
|||
|
||||
|
||||
#STAGE
|
||||
STAGE_GHOST = dataminer-ghost-d.dev.d4science.org
|
||||
STAGE_GHOST = dataminer-ghost.cloud-dev.d4science.org
|
||||
svn.stage.algorithms-list = /trunk/data-analysis/DataMinerConfiguration/algorithms/dev/algorithms
|
||||
|
||||
svn.stage.deps-linux-compiled = /trunk/data-analysis/RConfiguration/RPackagesManagement/r_deb_pkgs.txt
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
dependencies:
|
||||
# - { role: gcube-dataminer }
|
||||
# - { role: os-unzip }
|
||||
# - { role: os-java-1.7.0 }
|
||||
# - { role: os-java-1.8.0 }
|
||||
|
|
4
src/main/resources/static/os-java-1.7.0/tasks/main.yaml → src/main/resources/static/os-java-1.8.0/tasks/main.yaml
Normal file → Executable file
4
src/main/resources/static/os-java-1.7.0/tasks/main.yaml → src/main/resources/static/os-java-1.8.0/tasks/main.yaml
Normal file → Executable file
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
|
||||
- name: adding OS Package java-1.7.0
|
||||
- name: adding OS Package java-1.8.0
|
||||
package:
|
||||
name: java-1.7.0-openjdk
|
||||
name: java-1.8.0-openjdk
|
||||
state: "{{os_package_state}}"
|
||||
become: true
|
|
@ -0,0 +1,6 @@
|
|||
/LICENSE.md
|
||||
/README.md
|
||||
/changelog.xml
|
||||
/gcube-app.xml
|
||||
/profile.xml
|
||||
/classes/
|
|
@ -1,117 +0,0 @@
|
|||
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Algorithm;
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.AlgorithmSet;
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.process.AddAlgorithmCommand;
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.process.AlgorithmPackageParser;
|
||||
|
||||
public class AlgorithmPackageParserTest {
|
||||
|
||||
private static int BUFFER_SIZE = 2048;
|
||||
|
||||
public void extractAllAlgorithms() throws IOException {
|
||||
String url = "http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-analysis/DataMinerConfiguration/algorithms/dev/algorithms";
|
||||
List<String> commands = this.extractAddAlgorithmCommands(url);
|
||||
AlgorithmSet algorithms = new AlgorithmSet();
|
||||
for (String cmd : commands) {
|
||||
System.out.println("-----------------------------------------");
|
||||
System.out.println(cmd);
|
||||
AddAlgorithmCommand aac = new AddAlgorithmCommand(cmd);
|
||||
System.out.println(aac);
|
||||
|
||||
// start creating the algo from the command
|
||||
Algorithm algo = new Algorithm();
|
||||
algo.setAlgorithmType(aac.getAlgorithmType());
|
||||
algo.setCategory(aac.getCategory());
|
||||
algo.setClazz(aac.getClazz());
|
||||
algo.setDescription(aac.getDescription());
|
||||
algo.setName(aac.getName());
|
||||
algo.setPackageURL(aac.getUrl());
|
||||
algo.setSkipJava(aac.getSkipjava());
|
||||
|
||||
// then override with info from the package
|
||||
if (aac.getUrl().length() > 4) {
|
||||
Algorithm packagedAlgo = this.extractAlgorithm(aac.getUrl());
|
||||
if (packagedAlgo != null) {
|
||||
algo.setDependencies(packagedAlgo.getDependencies());
|
||||
}
|
||||
}
|
||||
algorithms.addAlgorithm(algo);
|
||||
break;
|
||||
}
|
||||
//to uncomment
|
||||
// new DataminerPoolManager().addAlgorithmsToVRE(algorithms,
|
||||
// "/gcube/devNext/NextNext");
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract 'addAlgorithm' commands from a file containing wiki-table-style
|
||||
* entries for algorithm.
|
||||
*
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
private List<String> extractAddAlgorithmCommands(String listUrl)
|
||||
throws IOException {
|
||||
URL url = new URL(listUrl);
|
||||
InputStream is = url.openStream();
|
||||
|
||||
StringBuilder s = new StringBuilder();
|
||||
byte[] buffer = new byte[BUFFER_SIZE];
|
||||
int read = 0;
|
||||
while ((read = is.read(buffer)) != -1) {
|
||||
s.append(new String(buffer, 0, read));
|
||||
}
|
||||
List<String> out = new Vector<>();
|
||||
String[] lines = s.toString().split("\n");
|
||||
for (String line : lines) {
|
||||
System.out.println("--------------------");
|
||||
if (!line.isEmpty()) {
|
||||
String[] parts = line.split("\\|");
|
||||
int c = 1;
|
||||
for (String part : parts) {
|
||||
if (part == null || part.trim().isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
System.out.println(c + ". " + part);
|
||||
c++;
|
||||
if (part.contains("addAlgorithm.sh")) {
|
||||
String cmd = part.trim();
|
||||
cmd = cmd.replaceAll("<notextile>", "");
|
||||
cmd = cmd.replaceAll("</notextile>", "");
|
||||
System.out.println(cmd);
|
||||
// AddAlgorithmCommand aac = new AddAlgorithmCommand(cmd);
|
||||
// System.out.println(aac);
|
||||
out.add(cmd);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an Algorithm starting from the algorithm jar.
|
||||
*
|
||||
* @param url
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
private Algorithm extractAlgorithm(String url) throws IOException {
|
||||
return new AlgorithmPackageParser().parsePackage(url);
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
// ProxySelector.setDefault(new PropertiesBasedProxySelector(
|
||||
// "/home/ngalante/.proxy-settings"));
|
||||
|
||||
new AlgorithmPackageParserTest().extractAllAlgorithms();
|
||||
}
|
||||
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.ansible.AnsibleWorker;
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.Inventory;
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.Playbook;
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.Role;
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.ansible.model.RoleFile;
|
||||
|
||||
public class AnsibleWorkerTest {
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
AnsibleWorker worker = new AnsibleWorker(new File("/home/nagalante/gcube/dataminer-pool-manager/work/"+UUID.randomUUID().toString()));
|
||||
|
||||
System.out.println("created worker named " + worker.getWorkerId());
|
||||
|
||||
worker.setInventory(new Inventory());
|
||||
worker.setPlaybook(new Playbook());
|
||||
|
||||
Role r = new Role();
|
||||
r.setName("latex");
|
||||
|
||||
RoleFile tf = new RoleFile("main", "do something special for " + r.getName());
|
||||
r.addTaskFile(tf);
|
||||
worker.addRole(r);
|
||||
|
||||
//worker.apply();
|
||||
}
|
||||
|
||||
}
|
|
@ -1,225 +0,0 @@
|
|||
|
||||
|
||||
import java.net.ProxySelector;
|
||||
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Algorithm;
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.AlgorithmSet;
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Dependency;
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.util.PropertiesBasedProxySelector;
|
||||
|
||||
public class DataminerPoolManagerTest {
|
||||
|
||||
/*
|
||||
private static Map<String, Domain> domains = new HashMap<>();
|
||||
private static Map<String, Cluster> clusters = new HashMap<>();
|
||||
|
||||
private static Dependency createDependency(String depName) {
|
||||
String[] parts = depName.split(":");
|
||||
Dependency out = new Dependency();
|
||||
if(parts.length>1) {
|
||||
out.setType(parts[0]);
|
||||
out.setName(parts[1]);
|
||||
} else {
|
||||
out.setType("os");
|
||||
out.setName(depName);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
private static Algorithm createAlgorithm(String name, String ... deps) {
|
||||
Algorithm a = new Algorithm();
|
||||
a.setName(name);
|
||||
for(String dep:deps) {
|
||||
a.addDependency(createDependency(dep));
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
private static AlgorithmSet createAlgorithmSet(String name, Algorithm ... algs) {
|
||||
AlgorithmSet out = new AlgorithmSet();
|
||||
out.setName(name);
|
||||
for(Algorithm a:algs) {
|
||||
out.addAlgorithm(a);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
private static Domain getDomain(String name) {
|
||||
if(domains.get(name)==null) {
|
||||
Domain d = new Domain();
|
||||
d.setName(name);
|
||||
domains.put(name, d);
|
||||
return d;
|
||||
} else {
|
||||
return domains.get(name);
|
||||
}
|
||||
}
|
||||
|
||||
private static Host createHost(String hostname, String domainName) {
|
||||
Host out = new Host();
|
||||
out.setName(hostname);
|
||||
Domain d = getDomain(domainName);
|
||||
out.setDomain(d);
|
||||
return out;
|
||||
}
|
||||
|
||||
private static Cluster getCluster(String name) {
|
||||
if(clusters.get(name)==null) {
|
||||
Cluster d = new Cluster();
|
||||
d.setName(name);
|
||||
clusters.put(name, d);
|
||||
return d;
|
||||
} else {
|
||||
return clusters.get(name);
|
||||
}
|
||||
}
|
||||
|
||||
private static Collection<Dependency> extractDependencies() {
|
||||
Collection<Dependency> out = new TreeSet<>(new DependencyComparator());
|
||||
for(Cluster c:clusters.values()) {
|
||||
for(AlgorithmSet as:c.getAlgorithmSets()) {
|
||||
for(Algorithm a:as.getAlgorithms()) {
|
||||
for(Dependency d:a.getDependencies()) {
|
||||
out.add(d);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
private static Collection<Algorithm> extractAlgorithms() {
|
||||
Collection<Algorithm> out = new TreeSet<>(new AlgorithmComparator());
|
||||
for(Cluster c:clusters.values()) {
|
||||
for(AlgorithmSet as:c.getAlgorithmSets()) {
|
||||
for(Algorithm a:as.getAlgorithms()) {
|
||||
out.add(a);
|
||||
}
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
static {
|
||||
|
||||
Algorithm ewe = createAlgorithm("ewe", "mono", "latex", "cran:some_R_package", "custom:some_git_package");
|
||||
Algorithm ensemble = createAlgorithm("ensemble", "python");
|
||||
Algorithm voodoo = createAlgorithm("voodoo", "os:latex", "custom:blah");
|
||||
|
||||
AlgorithmSet as1 = createAlgorithmSet("as1-fishes", ewe);
|
||||
AlgorithmSet as2 = createAlgorithmSet("as2-stat", ensemble);
|
||||
AlgorithmSet as3 = createAlgorithmSet("as3-blackmagic", voodoo, ewe);
|
||||
|
||||
Cluster cluster1 = getCluster("cluster-1");
|
||||
cluster1.addHost(createHost("host1", "domain1"));
|
||||
cluster1.addHost(createHost("host2", "domain1"));
|
||||
cluster1.addHost(createHost("host3", "domain1"));
|
||||
cluster1.addHost(createHost("host1", "domain2"));
|
||||
cluster1.addHost(createHost("host2", "domain2"));
|
||||
|
||||
Cluster cluster2 = getCluster("cluster-2");
|
||||
cluster2.addHost(createHost("host4", "domain1"));
|
||||
cluster2.addHost(createHost("host5", "domain1"));
|
||||
cluster2.addHost(createHost("host6", "domain1"));
|
||||
cluster2.addHost(createHost("host3", "domain2"));
|
||||
cluster2.addHost(createHost("host4", "domain2"));
|
||||
cluster2.addHost(createHost("host5", "domain2"));
|
||||
|
||||
cluster1.addAlgorithmSet(as1);
|
||||
cluster1.addAlgorithmSet(as2);
|
||||
|
||||
cluster2.addAlgorithmSet(as1);
|
||||
cluster2.addAlgorithmSet(as3);
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
/*
|
||||
AnsibleBridge ab = new AnsibleBridge();
|
||||
ab.printInventoryByDomainAndSets(clusters.values());
|
||||
System.out.println("-----------");
|
||||
ab.printInventoryBySets(clusters.values());
|
||||
|
||||
AnsibleWorker worker = ab.createWorker();
|
||||
|
||||
for(Algorithm a:extractAlgorithms()) {
|
||||
for(Role r:ab.generateRoles(a)) {
|
||||
worker.addRole(r);
|
||||
}
|
||||
}
|
||||
|
||||
for(Dependency d:extractDependencies()) {
|
||||
for(Role r:ab.generateRoles(d)) {
|
||||
worker.addRole(r);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
ScopeProvider.instance.set("/gcube/devNext/NextNext");
|
||||
|
||||
ProxySelector.setDefault(new PropertiesBasedProxySelector("/home/ngalante/.proxy-settings"));
|
||||
//
|
||||
// // create the algorithm (download it, etc etc)
|
||||
// Algorithm algorithm = new Algorithm();
|
||||
// algorithm.setName("ichtyop");
|
||||
// algorithm.setClazz("org.gcube...");
|
||||
// algorithm.setDescription("some description");
|
||||
//
|
||||
// Dependency d = new Dependency();
|
||||
// d.setName("libpng");
|
||||
// d.setType("os");
|
||||
// algorithm.addDependency(d);
|
||||
//
|
||||
// d = new Dependency();
|
||||
// d.setName("some-r-package");
|
||||
// d.setType("cran");
|
||||
// algorithm.addDependency(d);
|
||||
//
|
||||
// d = new Dependency();
|
||||
// d.setName("some-other-r-package");
|
||||
// d.setType("cran");
|
||||
// algorithm.addDependency(d);
|
||||
//
|
||||
// d = new Dependency();
|
||||
// d.setName("voodoo");
|
||||
// d.setType("custom");
|
||||
// algorithm.addDependency(d);
|
||||
//
|
||||
// // create the algorithm (download it, etc etc)
|
||||
// Algorithm ewe = new Algorithm();
|
||||
// ewe.setName("ewe");
|
||||
//
|
||||
// d = new Dependency();
|
||||
// d.setName("voodoo");
|
||||
// d.setType("custom");
|
||||
// ewe.addDependency(d);
|
||||
|
||||
AlgorithmSet algorithms = new AlgorithmSet();
|
||||
algorithms.setName("dummy-set");
|
||||
|
||||
|
||||
// algorithms.addAlgorithm(algorithm);
|
||||
// algorithms.addAlgorithm(ewe);
|
||||
|
||||
Algorithm ensemble = new Algorithm();
|
||||
ensemble.setName("ewe");
|
||||
ensemble.setCategory("a");
|
||||
ensemble.setAlgorithmType("transducerers");
|
||||
ensemble.setPackageURL("http://data.d4science.org/eDd5b2ovMmpSVEZaZWYvY3g2bDZNcGRFNUIxNi85UFlHbWJQNStIS0N6Yz0");
|
||||
ensemble.setClazz("org.gcube.dataanalysis.executor.rscripts.Ichthyopmodelonebyone");
|
||||
ensemble.setSkipJava("N");
|
||||
ensemble.setDescription("test");
|
||||
|
||||
Dependency d = new Dependency();
|
||||
d.setName("libpng3");
|
||||
d.setType("os");
|
||||
ensemble.addDependency(d);
|
||||
algorithms.addAlgorithm(ensemble);
|
||||
|
||||
//new DataminerPoolManager().addAlgorithmsToVRE(algorithms, "/gcube/devNext/NextNext", "test"+UUID.randomUUID(), false);
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
|
||||
|
||||
import java.net.ProxySelector;
|
||||
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.clients.ISClient;
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.util.PropertiesBasedProxySelector;
|
||||
|
||||
public class ISClientTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
ProxySelector.setDefault(new PropertiesBasedProxySelector("/home/ngalante/.proxy-settings"));
|
||||
ScopeProvider.instance.set("/gcube/devNext/NextNext");
|
||||
System.out.println(new ISClient().listDataminersInVRE());
|
||||
}
|
||||
|
||||
}
|
0
src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/AlgorithmPackageParserTest.java
Normal file → Executable file
0
src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/AlgorithmPackageParserTest.java
Normal file → Executable file
0
src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/AnsibleWorkerTest.java
Normal file → Executable file
0
src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/AnsibleWorkerTest.java
Normal file → Executable file
|
@ -0,0 +1,69 @@
|
|||
package org.gcube.dataanalysis.dataminerpoolmanager;
|
||||
|
||||
import static org.gcube.resources.discovery.icclient.ICFactory.clientFor;
|
||||
import static org.gcube.resources.discovery.icclient.ICFactory.queryFor;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.common.encryption.encrypter.StringEncrypter;
|
||||
import org.gcube.common.resources.gcore.ServiceEndpoint;
|
||||
import org.gcube.common.resources.gcore.ServiceEndpoint.AccessPoint;
|
||||
import org.gcube.common.resources.gcore.ServiceEndpoint.Property;
|
||||
import org.gcube.common.resources.gcore.utils.Group;
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.gcube.resources.discovery.client.api.DiscoveryClient;
|
||||
import org.gcube.resources.discovery.client.queries.api.SimpleQuery;
|
||||
|
||||
public class ApplicationTokenTest {
|
||||
|
||||
private static final String DMPOOLMANAGER_SERVICE_QUERY_CONDITION = "$resource/Profile/Name/text() eq 'DMPoolManager'";
|
||||
|
||||
public static void main(String[] args) {
|
||||
ScopeProvider.instance.set("/gcube/devsec/devVRE");
|
||||
SecurityTokenProvider.instance.set("xxxx-xxxx-xxx");
|
||||
|
||||
decryptToken();
|
||||
}
|
||||
|
||||
private static void decryptToken() {
|
||||
try {
|
||||
|
||||
SimpleQuery query = queryFor(ServiceEndpoint.class);
|
||||
query.addCondition(DMPOOLMANAGER_SERVICE_QUERY_CONDITION);
|
||||
DiscoveryClient<ServiceEndpoint> client = clientFor(ServiceEndpoint.class);
|
||||
List<ServiceEndpoint> resources = client.submit(query);
|
||||
if (resources.isEmpty()) {
|
||||
System.out.println("No services resource found on IS!");
|
||||
|
||||
} else {
|
||||
System.out.println("Retrieved: " + resources.get(0));
|
||||
}
|
||||
|
||||
|
||||
Group<AccessPoint> accessPoints = resources.get(0).profile().accessPoints();
|
||||
if (!accessPoints.isEmpty()) {
|
||||
Iterator<AccessPoint> iterator = accessPoints.iterator();
|
||||
AccessPoint ap = iterator.next();
|
||||
Group<Property> props = ap.properties();
|
||||
if (!props.isEmpty()) {
|
||||
Iterator<Property> iteratorProps = props.iterator();
|
||||
Property p = iteratorProps.next();
|
||||
String applicationToken = StringEncrypter.getEncrypter().decrypt(p.value());
|
||||
System.out.println("Application token found: " + applicationToken);
|
||||
|
||||
} else {
|
||||
System.out.println("No application token found in service resource on IS!");
|
||||
}
|
||||
} else {
|
||||
System.out.println("Invalid service resource on IS!");
|
||||
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
0
src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/DataminerPoolManagerTest.java
Normal file → Executable file
0
src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/DataminerPoolManagerTest.java
Normal file → Executable file
0
src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/ISClientTest.java
Normal file → Executable file
0
src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/ISClientTest.java
Normal file → Executable file
0
src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/JobTest.java
Normal file → Executable file
0
src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/JobTest.java
Normal file → Executable file
2
src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/SVNTests.java
Normal file → Executable file
2
src/test/java/org/gcube/dataanalysis/dataminerpoolmanager/SVNTests.java
Normal file → Executable file
|
@ -24,7 +24,7 @@ public class SVNTests {
|
|||
//algo.setClazz(algo.getClazz() + "TEST");
|
||||
algo.setAlgorithmType("transducerers");
|
||||
algo.setCategory("NLP");
|
||||
algo.setFullname("Ondřej Košarko");
|
||||
algo.setFullname("Master Test");
|
||||
//System.out.println(algo.getCategory());
|
||||
//System.out.println(algo.getSkipJava());
|
||||
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
package org.gcube.dataanalysis.dataminerpoolmanager;
|
||||
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.util.SendMail;
|
||||
|
||||
public class SendMailTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
|
||||
// NotificationHelper nh = new NotificationHelper();
|
||||
|
||||
SendMail sm = new SendMail();
|
||||
|
||||
ScopeProvider.instance.set("/gcube/devNext/NextNext");
|
||||
SecurityTokenProvider.instance.set("xxxx-xxxx-xxx");
|
||||
// System.out.println(sm.getRootToken());
|
||||
// sm.getGenericResourceByName("");
|
||||
|
||||
//ScopeProvider.instance.set("/gcube/devsec/devVRE");
|
||||
//SecurityTokenProvider.instance.set("xxxx-xxxx-xxxx");
|
||||
|
||||
// sm.sendNotification(nh.getFailedSubject(), nh.getFailedBody("test
|
||||
// failed"));
|
||||
// sm.username(SecurityTokenProvider.instance.get());
|
||||
// sm.retrieveAdminRole();
|
||||
// sm.getAdminRoles();
|
||||
sm.sendNotification("Test DMPoolManager Notification", "This is only a test please cancel this message.");
|
||||
// System.out.println(sm.getAdmins());
|
||||
// sm.sendNotification("test", "test");
|
||||
// System.out.println(sm.getSocialService());
|
||||
} catch (Exception e) {
|
||||
System.out.println("Error in sent mail: "+e.getLocalizedMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
/devsec.gcubekey
|
Loading…
Reference in New Issue