From f42670da77dabfb638c6b180ac7133ec869ecc69 Mon Sep 17 00:00:00 2001 From: da490c Date: Tue, 17 Jul 2018 14:04:07 -0400 Subject: [PATCH] Implement Spring Profile Sparky Config Issue-ID: AAI-1379 Change-Id: I5d56b766f681452abe7e61b307e008bc5a695814 Signed-off-by: da490c --- .../config/application-camel.properties | 3 + .../config/application-fe-dev.properties | 7 + .../config/application-fe-prod.properties | 7 + .../config/application-gizmo.properties | 7 + .../config/application-http.properties | 1 + .../config/application-oxm-override.properties | 1 + .../config/application-oxm-schema-dev.properties | 1 + .../config/application-oxm-schema-prod.properties | 1 + .../config/application-portal.properties | 0 .../config/application-resources.properties | 8 + .../config/application-ssl.properties | 3 + .../config/application-sync.properties | 6 + .../config/application.properties | 16 + .../config/auth/client-cert-onap.p12 | Bin 0 -> 2556 bytes .../config/auth/csp-cookie-filter.properties | 18 ++ .../config/auth/tomcat_keystore | Bin 0 -> 2214 bytes .../descriptors/aaiEntityNodeDescriptors.json | 218 ++++++++++++++ .../config/filters/aaiui_filters.json | 95 ++++++ .../config/filters/aaiui_views.json | 17 ++ .../subscription_object_inspector_mapping.json | 16 + .../config/logging/logback.xml | 172 +++++++++++ .../portal/BOOT-INF/classes/portal.properties | 21 ++ .../config/portal/portal-authentication.properties | 3 + .../config/portal/roles.config | 6 + .../config/schemaIngest.properties | 7 + .../config/schemas/autoSuggestMappings.json | 10 + .../config/schemas/autoSuggestSettings.json | 21 ++ .../config/schemas/dynamicMappings.json | 14 + .../config/schemas/entityCountHistoryMappings.json | 16 + .../config/schemas/es_mappings.json | 32 ++ .../config/schemas/es_settings.json | 36 +++ .../sparky-aggregate-vnf-search-provider.xml | 34 +++ .../config/spring-beans/sparky-elasticsearch.xml | 32 ++ .../config/spring-beans/sparky-filters.xml | 27 ++ .../config/spring-beans/sparky-gizmo.xml | 30 ++ .../config/spring-beans/sparky-global-search.xml | 26 ++ .../config/spring-beans/sparky-oxm-default.xml | 13 + .../config/spring-beans/sparky-oxm-override.xml | 14 + .../config/spring-beans/sparky-oxm.xml | 185 ++++++++++++ .../config/spring-beans/sparky-resources.xml | 30 ++ .../config/spring-beans/sparky-search-service.xml | 26 ++ .../spring-beans/sparky-subscription-service.xml | 38 +++ .../config/spring-beans/sparky-sync.xml | 328 +++++++++++++++++++++ .../sparky-view-inspect-search-provider.xml | 35 +++ .../sparky-view-inspect-with-gizmo.xml | 63 ++++ .../sparky-view-inspect-with-resources.xml | 66 +++++ sparkybe-onap-application/pom.xml | 31 ++ .../src/main/docker/Dockerfile | 3 + .../main/java/org/onap/aai/sparky/Application.java | 84 +----- .../org/onap/aai/sparky/aai/FrontEndLayoutApi.java | 2 - .../FilterAggregationRouter.java} | 23 +- .../FilterRequestRouter.java} | 23 +- .../GlobalSearchRouter.java} | 23 +- .../onap/aai/sparky/camel/SubscriptionRouter.java | 37 +++ .../onap/aai/sparky/camel/ViewInspectRouter.java | 37 +++ .../onap/aai/sparky/config/CamelConfiguration.java | 19 ++ .../org/onap/aai/sparky/portal/PortalBean.java | 41 +++ .../src/main/scripts/start.sh | 8 +- 58 files changed, 1928 insertions(+), 113 deletions(-) create mode 100644 sparkybe-onap-application/config/application-camel.properties create mode 100644 sparkybe-onap-application/config/application-fe-dev.properties create mode 100644 sparkybe-onap-application/config/application-fe-prod.properties create mode 100644 sparkybe-onap-application/config/application-gizmo.properties create mode 100644 sparkybe-onap-application/config/application-http.properties create mode 100644 sparkybe-onap-application/config/application-oxm-override.properties create mode 100644 sparkybe-onap-application/config/application-oxm-schema-dev.properties create mode 100644 sparkybe-onap-application/config/application-oxm-schema-prod.properties create mode 100644 sparkybe-onap-application/config/application-portal.properties create mode 100644 sparkybe-onap-application/config/application-resources.properties create mode 100644 sparkybe-onap-application/config/application-ssl.properties create mode 100644 sparkybe-onap-application/config/application-sync.properties create mode 100644 sparkybe-onap-application/config/application.properties create mode 100644 sparkybe-onap-application/config/auth/client-cert-onap.p12 create mode 100644 sparkybe-onap-application/config/auth/csp-cookie-filter.properties create mode 100644 sparkybe-onap-application/config/auth/tomcat_keystore create mode 100644 sparkybe-onap-application/config/descriptors/aaiEntityNodeDescriptors.json create mode 100644 sparkybe-onap-application/config/filters/aaiui_filters.json create mode 100644 sparkybe-onap-application/config/filters/aaiui_views.json create mode 100644 sparkybe-onap-application/config/filters/subscription_object_inspector_mapping.json create mode 100644 sparkybe-onap-application/config/logging/logback.xml create mode 100644 sparkybe-onap-application/config/portal/BOOT-INF/classes/portal.properties create mode 100644 sparkybe-onap-application/config/portal/portal-authentication.properties create mode 100644 sparkybe-onap-application/config/portal/roles.config create mode 100644 sparkybe-onap-application/config/schemaIngest.properties create mode 100644 sparkybe-onap-application/config/schemas/autoSuggestMappings.json create mode 100644 sparkybe-onap-application/config/schemas/autoSuggestSettings.json create mode 100644 sparkybe-onap-application/config/schemas/dynamicMappings.json create mode 100644 sparkybe-onap-application/config/schemas/entityCountHistoryMappings.json create mode 100644 sparkybe-onap-application/config/schemas/es_mappings.json create mode 100644 sparkybe-onap-application/config/schemas/es_settings.json create mode 100644 sparkybe-onap-application/config/spring-beans/sparky-aggregate-vnf-search-provider.xml create mode 100644 sparkybe-onap-application/config/spring-beans/sparky-elasticsearch.xml create mode 100644 sparkybe-onap-application/config/spring-beans/sparky-filters.xml create mode 100644 sparkybe-onap-application/config/spring-beans/sparky-gizmo.xml create mode 100644 sparkybe-onap-application/config/spring-beans/sparky-global-search.xml create mode 100644 sparkybe-onap-application/config/spring-beans/sparky-oxm-default.xml create mode 100644 sparkybe-onap-application/config/spring-beans/sparky-oxm-override.xml create mode 100644 sparkybe-onap-application/config/spring-beans/sparky-oxm.xml create mode 100644 sparkybe-onap-application/config/spring-beans/sparky-resources.xml create mode 100644 sparkybe-onap-application/config/spring-beans/sparky-search-service.xml create mode 100644 sparkybe-onap-application/config/spring-beans/sparky-subscription-service.xml create mode 100644 sparkybe-onap-application/config/spring-beans/sparky-sync.xml create mode 100644 sparkybe-onap-application/config/spring-beans/sparky-view-inspect-search-provider.xml create mode 100644 sparkybe-onap-application/config/spring-beans/sparky-view-inspect-with-gizmo.xml create mode 100644 sparkybe-onap-application/config/spring-beans/sparky-view-inspect-with-resources.xml rename sparkybe-onap-application/src/main/java/org/onap/aai/sparky/{config/SparkySslConfigLoader.java => camel/FilterAggregationRouter.java} (69%) rename sparkybe-onap-application/src/main/java/org/onap/aai/sparky/{config/SparkyHttpConfigLoader.java => camel/FilterRequestRouter.java} (69%) rename sparkybe-onap-application/src/main/java/org/onap/aai/sparky/{config/SparkyConfigLoader.java => camel/GlobalSearchRouter.java} (72%) create mode 100644 sparkybe-onap-application/src/main/java/org/onap/aai/sparky/camel/SubscriptionRouter.java create mode 100644 sparkybe-onap-application/src/main/java/org/onap/aai/sparky/camel/ViewInspectRouter.java create mode 100644 sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/CamelConfiguration.java create mode 100644 sparkybe-onap-application/src/main/java/org/onap/aai/sparky/portal/PortalBean.java diff --git a/sparkybe-onap-application/config/application-camel.properties b/sparkybe-onap-application/config/application-camel.properties new file mode 100644 index 0000000..03a7f20 --- /dev/null +++ b/sparkybe-onap-application/config/application-camel.properties @@ -0,0 +1,3 @@ +camel.springboot.name = SparkyCamelContext +#camel.springboot.xmlRests = file:${CONFIG_HOME}/camel-rests/*.xml +camel.component.servlet.mapping.context-path=/rest/* \ No newline at end of file diff --git a/sparkybe-onap-application/config/application-fe-dev.properties b/sparkybe-onap-application/config/application-fe-dev.properties new file mode 100644 index 0000000..bba6656 --- /dev/null +++ b/sparkybe-onap-application/config/application-fe-dev.properties @@ -0,0 +1,7 @@ + +server.servlet.context-path=/services/aai/webapp/ + +# +# attempt to externalize ui JS classes + resources +# +spring.resources.static-locations=file:${APP_HOME}/target/static/ \ No newline at end of file diff --git a/sparkybe-onap-application/config/application-fe-prod.properties b/sparkybe-onap-application/config/application-fe-prod.properties new file mode 100644 index 0000000..b332358 --- /dev/null +++ b/sparkybe-onap-application/config/application-fe-prod.properties @@ -0,0 +1,7 @@ + +server.servlet.context-path=/services/aai/webapp/ + +# +# attempt to externalize ui JS classes + resources +# +spring.resources.static-locations=file:${APP_HOME}/static/ \ No newline at end of file diff --git a/sparkybe-onap-application/config/application-gizmo.properties b/sparkybe-onap-application/config/application-gizmo.properties new file mode 100644 index 0000000..e988873 --- /dev/null +++ b/sparkybe-onap-application/config/application-gizmo.properties @@ -0,0 +1,7 @@ +gizmo.hostname=127.0.0.1 +gizmo.port=9520 +gizmo.authType=SSL_CERT +gizmo.client-cert=client-cert-onap.p12 +gizmo.client-cert-password=1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10 +gizmo.trust-store=tomcat_keystore +gizmo.apiVersion=v12 diff --git a/sparkybe-onap-application/config/application-http.properties b/sparkybe-onap-application/config/application-http.properties new file mode 100644 index 0000000..f81a597 --- /dev/null +++ b/sparkybe-onap-application/config/application-http.properties @@ -0,0 +1 @@ +server.port = 9517 \ No newline at end of file diff --git a/sparkybe-onap-application/config/application-oxm-override.properties b/sparkybe-onap-application/config/application-oxm-override.properties new file mode 100644 index 0000000..1fa006e --- /dev/null +++ b/sparkybe-onap-application/config/application-oxm-override.properties @@ -0,0 +1 @@ +oxm.apiVersionOverride=V11 \ No newline at end of file diff --git a/sparkybe-onap-application/config/application-oxm-schema-dev.properties b/sparkybe-onap-application/config/application-oxm-schema-dev.properties new file mode 100644 index 0000000..66efe1d --- /dev/null +++ b/sparkybe-onap-application/config/application-oxm-schema-dev.properties @@ -0,0 +1 @@ +oxm.schemaNodeDir=${APP_HOME}/target/oxm \ No newline at end of file diff --git a/sparkybe-onap-application/config/application-oxm-schema-prod.properties b/sparkybe-onap-application/config/application-oxm-schema-prod.properties new file mode 100644 index 0000000..111a63f --- /dev/null +++ b/sparkybe-onap-application/config/application-oxm-schema-prod.properties @@ -0,0 +1 @@ +oxm.schemaNodeDir=${APP_HOME}/oxm \ No newline at end of file diff --git a/sparkybe-onap-application/config/application-portal.properties b/sparkybe-onap-application/config/application-portal.properties new file mode 100644 index 0000000..e69de29 diff --git a/sparkybe-onap-application/config/application-resources.properties b/sparkybe-onap-application/config/application-resources.properties new file mode 100644 index 0000000..2a7770f --- /dev/null +++ b/sparkybe-onap-application/config/application-resources.properties @@ -0,0 +1,8 @@ +resources.hostname=127.0.0.1 +resources.port=8443 +resources.authType=SSL_BASIC +resources.basicAuthUserName=AAI +resources.basicAuthPassword=AAI +resources.client-cert=client-cert-onap.p12 +resources.client-cert-password=1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10 +resources.trust-store=tomcat_keystore diff --git a/sparkybe-onap-application/config/application-ssl.properties b/sparkybe-onap-application/config/application-ssl.properties new file mode 100644 index 0000000..04ff25b --- /dev/null +++ b/sparkybe-onap-application/config/application-ssl.properties @@ -0,0 +1,3 @@ +server.port = 8000 +server.ssl.key-store=file:${CONFIG_HOME}/auth/tomcat_keystore +server.ssl.key-store-password=OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10 \ No newline at end of file diff --git a/sparkybe-onap-application/config/application-sync.properties b/sparkybe-onap-application/config/application-sync.properties new file mode 100644 index 0000000..4fb10a2 --- /dev/null +++ b/sparkybe-onap-application/config/application-sync.properties @@ -0,0 +1,6 @@ +aggregationSyncEnabled=true +historicalEntitySyncEnabled=true +autoSuggestSyncEnabled=true +vnfAliasSyncEnabled=true +geoSyncEnabled=true +viewInspectSyncEnabled=true \ No newline at end of file diff --git a/sparkybe-onap-application/config/application.properties b/sparkybe-onap-application/config/application.properties new file mode 100644 index 0000000..54f4f40 --- /dev/null +++ b/sparkybe-onap-application/config/application.properties @@ -0,0 +1,16 @@ +# +# disable the default thyme leaf icon on web-pages +# +spring.mvc.favicon.enabled=false + +#possible values: camel,http,ssl,portal,fe-dev,fe-prod,oxm-default,oxm-override,[resources|gizmo],sync,oxm-schema-prod +spring.profiles.active=camel,ssl,fe-dev,oxm-schema-dev,resources,sync + +elasticsearch.hostname=127.0.0.1 +elasticsearch.port=9200 + +searchservice.hostname=127.0.0.1 +searchservice.port=9502 +searchservice.client-cert=client-cert-onap.p12 +searchservice.client-cert-password=1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10 +searchservice.truststore=tomcat_keystore diff --git a/sparkybe-onap-application/config/auth/client-cert-onap.p12 b/sparkybe-onap-application/config/auth/client-cert-onap.p12 new file mode 100644 index 0000000000000000000000000000000000000000..dbf4fcacecf190fb0244dce0d1b438e6fea4500d GIT binary patch literal 2556 zcmY+EdpHw{8^>p6vvN1q+;S^Iwz0#F1O>%q@$`lt@_`#}p!mZsr!v zrA;)F+=b00##|C}&vBmT_dDk~f4tB8JfH9PegFKR2+$26A3ur!eGP_c+_bv6F3bnv zqY$7^K?G>QJ|?3G0>A$!5^w_%1YGv9lQ! z2xbYdREtLj!#tMeXTuU~Y}^mN=>q~m01yH6;iwV9rpF(${h@HJ?@grEMCee9ri-P) zwzE2^?>3>tjiqo5*=`e>dbXiy^X|@E0$!PKLudIJtgh4W8suwce{PMLt2sx-*UI6F z!=)~#bGYY1wTtBr?TXBfjP2}S>r)?dXjlH6NdFDxJivFEjLiGlmGFMS9SiW?*?m-# z6vbW7ozLnRpnP1x;1qCc*giY4axyE6+VS)Ztd?rL6ea=|uIDxv(Z78GS8#VoK1cJ8 z!FSDn*aO*Dx^Bf(*PeI%;F-7^_85~7(P(TNt(ZEztJE{opI(0q0k#DB4{pJ@<7p|) zpZtoQpC34>S1l`7lj$C)&u8Bd-;@;d-QOjbY?tfoBF&HJ^-Eb@v9|e~4pp?YJgza+-^?9hj4GbOZGiTk*` zAbxe_30a7E8x*F}ckf`o3;K=T_4}P|dc-SD@KbApw{&dRXeRFAiP&yTX{gAZtFhiU;|2D-kJHZr4^2}y z-yy;3?Oqd%Tw_%HZhrrHwr3!+%>6}3Z#<07>lT!6<@ucUdq}KG>~?qu!KmL5y8*bE zLav3Fm)&ApK@K!c7u`27&VN1E-;l89F>JcyJToKFXt1jFa!+dZZf`;1)h>Zi`b+$| zOatMJv&P|yQuXMBaP1FqCUN`b9IyHbW9vytIu}WAz32`X(@&jJe|%8_c9qTdYIHw z3fZtxHhk>d{+J@y6QH!L5;&97BmG4fersW56HO~_aff2xrb14q;B$h>Dl>!u-0^#3 zNM)Lp-+>qA%2{haKilb6wE~VGeF98WyTD%5*2t#3y@legMFULBxF@-nUq$W=S2R<) zI48ac)-CNcs?~L2;SJ0qALf6G&Rw5L^MCbG^vC>37XW*fZee2c>60$!G%;(z%l36t zVR3dNTR{B=kNDllFa+A>A}pnZyHmD?-})}8SjYUd6ghk(<8u1b8VN5Z(jz!uX<@xQ z?gc*Y;wbUR8lJ2rgmFlsgovS9poe; z%0J?oiYmm1E;^?_bV$$TeAa6(KcIHD^=++kgqXG4qb+YU#nLPjzn3`@-VW&ZQ;i&q zQ+=P9?vT$%MXeFKXZMQjXR(BZ77X~0DuFSsn@PzYuW*6-_qZ0DEnz99sZ)ti;* z%*hSuCsbrr8!5ub?T^D8^E{C%|5*w!^qc(G$nIGG>bz3GL;o&GkPg9Z*648Z&9>g4 zxgSFPB5mlK@GzB8nxxlmWRilyg#ccoTDp=D`f8@fW=Uharxj&N8gb2qChAMuxN-e` z@z=#64FA;6o|9IL_x#8ZI(1z(LlCrbIV;B|yf?ti?AILK$%L3pqW_gUAxcv+G_s$C z>&IhLG?_i%%Moj~pI!leKDom7$j?gD`J@t-uW%TSMtJ1I5Y>bsno58xjYj38Ok z#dww61flet6${l96L3ai^70CVZGPYGD<*B_QpKhmaPi`3gUVa&Rkow~faF)WiAIf{ zw!VVbLBOewjxYw*#ZPy-u+{ImT1YqQ$$b;6$<*anGHM4j&i57=^Z96?+pCw6>}QGd-<8Iza65dzA2s5Elcr`LwveyTFFUwuyNMqbe>8zPTb$EBtzuSv%NFNd5cYEh{uDhjr)({@X`vvX!;d%ccy~WAQpexeVZ|F3K zh+iEDrjnV#qVX%yh#DKUexv+rS0|4)+YYs{K9=l0;8pDe`nY>J&-|1qBOe zitqzv1OOly$@=nb#PO1w+DFZwsfNPY!%h`*Aebw;+{L0$LiiNyc&sYG#@NT=%=+JI F_zSHP#{>WX literal 0 HcmV?d00001 diff --git a/sparkybe-onap-application/config/auth/csp-cookie-filter.properties b/sparkybe-onap-application/config/auth/csp-cookie-filter.properties new file mode 100644 index 0000000..48984cd --- /dev/null +++ b/sparkybe-onap-application/config/auth/csp-cookie-filter.properties @@ -0,0 +1,18 @@ +# AT&T Global login page. This is the redirect URL +# Production login page: +# https://www.e-access.att.com/empsvcs/hrpinmgt/pagLogin/ +# +# Test login page: +# https://webtest.csp.att.com/empsvcs/hrpinmgt/pagLogin/ +global.login.url=<%= @GLOBAL_LOGIN_URL %> + +# MOTS ID of the application +application.id=24153 + +# valid domains for open redirect +redirect-domain=<%= @VALID_REDIRECT_DOMAIN %> + +# Required by esGateKeeper. Valid values are: +# DEVL - used during development +# PROD - used in production +gatekeeper.environment=<%= @GATEKEEPER_ENV %> \ No newline at end of file diff --git a/sparkybe-onap-application/config/auth/tomcat_keystore b/sparkybe-onap-application/config/auth/tomcat_keystore new file mode 100644 index 0000000000000000000000000000000000000000..9eec841aa2c1243b5ca3e22b0b116e5bca2afd49 GIT binary patch literal 2214 zcmcJQXHyf35{AvG`{CJ{ot=GmXP3T7-vj^vpko357Sz|n&7RYU`$h=up~Z`{XDvR*`$ zzz#)47haP~tv|D6mK5}zGvJ;XTcs8(8BRtSutt0nY_g%MoRa|;|Md5m6Fh;Jq2N{Y z_@3}C$JB}YtUs*Za?s`JeoMO1+r=63TnZY#qy*QgQqWyhEkSt;6nsS%)@q-fP~E0k z;;U!hctBy*u?73i4m--P-{w7I}r@otzjdND9D8ErKeeYe+W~WR6XoY%67E(c zKG2?clD{PU%-x8D{xsDjm8_i!Iz*!~sprgz-pbd|wD(J^B61Y&c8N|WjVZ|w(#tL3 z);vAKL47*5^D&KRS;w=+hJbeg9DS27bTdLTKaF?v@IGVZYIWHjnM2&;#FbO!hU2qE z+bdse`Ua`*ZDSbQ2`zDZPe8T@&;k+)>fplIw{8rpK#w_^oyy@JG-<*ytx4iE#yxnm0w= zsQ3mhmsjlZsqDe$)4tZiZ8RyqHRA(V@Z-;JVxjT&?A7`G1xSuj{d4T^ z`)2$ClX^CNSj2ZA7>6eiBWnlCZ#_k7+R{j3Zs3k}#59ZG%&egH70h}?*UV&AM*Nux zftp}&{@Bu4uYsw@OI5B^W#l8Gva3CRE@@gldvhn`*Zk<$Y0#?*w(wKl@IPPerG#ew zF#ma(&R;XYX7qXa!7I*7ye&-MlMsvA*gq!(+D7brD%esfz4f5p*wqG`A;*o|ZZ!I} z+5PP#v@U?VeeENz+c5~Ar}mueC$HJKfJ&S_*{uz6VF>tC@l@c(g?Mr?%9Bnz=F$N% zGJwGPmUyvf1q#=GQSz;4>Y0n!PhQ=nPlaG+ZKuVDSYCSTCB@@0XY72sTWR}GFu0sM zuJU)M7B9no2}*V)H*Q$sZ4bK=uc;9Z#*YlOBsxVL(zz4`vhyg-qhWGi7huPU<11)Y5*UN!14#^-uFzS7BV58VKr zEA@&jM5+va6#HX6u>AXmQdEdZs8yblX}kfBR64HCf0!aQRy-pc`BR7Bd{w0`La7pI zkm=yi-+ve=rYfwtttUgeMdb|Jcjx%UI#bu~NFgHk+;KiDl~>v4d7X3w z9rc55$0f!7n&sJ9{L+P^xOe}Ks>QqeF)(&V{YCm!er2w>_iX(t_Tivuge8N>R-3qr~xQviRhIz7E zmF2Mnc|_>mPq`r8ijUH>?@90qr{15OW~Xm0vAh-gzs|zfiNZj${Gzru|mOS5GWjURRewE_Y};HIkp*=k2hBQiz7ez0-g*`J z;kBFnkU1$tF0Q3m>%h|VsX%2p1>*X`1iB_Xsp#U?;-t;1ook?X4d(qVk*{RR6P$!( zp1b3J(1hT0hDnnDpuGp1ZS=|N6}7K@$PGzIw|!Z2!?d{VA_xow0CUArqA20xnF@14 z_#iwJi$B9~LoCv7gCyLen@bi+ATHT|ns~f5$0h;+Rx~^Phbuh2WcIpC_L=IRX6m;L zysyK_ECDymj03FucK5@FeBsQGhhk{RwcU?BM=B2vJs7~^Rk^HuniMI0TX6bN0{i~@uuQZjr@ z0~JCi^gFuj9Za{klpnkui<5%Dg>7HPFqAv?53G&aN9E0RU&+ronb{ED1*wh|l;Zsh_>tSL literal 0 HcmV?d00001 diff --git a/sparkybe-onap-application/config/descriptors/aaiEntityNodeDescriptors.json b/sparkybe-onap-application/config/descriptors/aaiEntityNodeDescriptors.json new file mode 100644 index 0000000..e72bab0 --- /dev/null +++ b/sparkybe-onap-application/config/descriptors/aaiEntityNodeDescriptors.json @@ -0,0 +1,218 @@ +{ + "generalNodeClass": { + "class": "aai-entity-node general-node", + "visualElements": [{ + "type": "circle", + "class": "outer", + "svgAttributes": { + "r": "16" + } + }, + { + "type": "circle", + "class": "inner", + "svgAttributes": { + "r": "10" + } + }, + { + "type": "text", + "class": "id-type-label", + "displayKey": "itemType", + "shapeAttributes": { + "offset": { + "x": "0", + "y": "33" + } + } + }, + { + "type": "text", + "class": "id-value-label", + "displayKey": "itemNameValue", + "shapeAttributes": { + "offset": { + "x": "0", + "y": "48" + } + } + }] + }, + "searchedNodeClass": { + "class": "aai-entity-node search-node", + "visualElements": [{ + "type": "circle", + "class": "outer", + "svgAttributes": { + "r": "16" + } + }, + { + "type": "circle", + "class": "inner", + "svgAttributes": { + "r": "10" + } + }, + { + "type": "text", + "class": "id-type-label", + "displayKey": "itemType", + "shapeAttributes": { + "offset": { + "x": "0", + "y": "33" + } + } + }, + { + "type": "text", + "class": "id-value-label", + "displayKey": "itemNameValue", + "shapeAttributes": { + "offset": { + "x": "0", + "y": "48" + } + } + }] + }, + "selectedSearchedNodeClass": { + "class": "aai-entity-node selected-search-node", + "visualElements": [{ + "type": "circle", + "class": "outer", + "svgAttributes": { + "r": "31" + } + }, + { + "type": "circle", + "class": "inner", + "svgAttributes": { + "r": "20" + } + }, + { + "type": "text", + "class": "id-type-label", + "displayKey": "itemType", + "shapeAttributes": { + "offset": { + "x": "0", + "y": "48" + } + } + }, + { + "type": "text", + "class": "id-value-label", + "displayKey": "itemNameValue", + "shapeAttributes": { + "offset": { + "x": "0", + "y": "63" + } + } + }, + { + "type": "button", + "name": "icon_ellipses", + "class": "node-button", + "shapeAttributes": { + "offset": { + "x": "33", + "y": "-35" + } + }, + "svgAttributes": { + "className": "node-button", + "r": "10" + } + }, + { + "type": "button", + "name": "icon_triangle_warning", + "class": "node-button", + "shapeAttributes": { + "offset": { + "x": "46", + "y": "-12" + } + }, + "svgAttributes": { + "className": "node-button", + "r": "10" + } + }] + }, + "selectedNodeClass": { + "class": "aai-entity-node selected-node", + "visualElements": [{ + "type": "circle", + "class": "outer", + "svgAttributes": { + "r": "31" + } + }, + { + "type": "circle", + "class": "inner", + "svgAttributes": { + "r": "20" + } + }, + { + "type": "text", + "class": "id-type-label", + "displayKey": "itemType", + "shapeAttributes": { + "offset": { + "x": "0", + "y": "48" + } + } + }, + { + "type": "text", + "class": "id-value-label", + "displayKey": "itemNameValue", + "shapeAttributes": { + "offset": { + "x": "0", + "y": "63" + } + } + }, + { + "type": "button", + "name": "icon_ellipses", + "class": "node-button", + "shapeAttributes": { + "offset": { + "x": "33", + "y": "-35" + } + }, + "svgAttributes": { + "className": "node-button", + "r": "10" + } + }, + { + "type": "button", + "name": "icon_triangle_warning", + "class": "node-button", + "shapeAttributes": { + "offset": { + "x": "46", + "y": "-12" + } + }, + "svgAttributes": { + "className": "node-button", + "r": "10" + } + }] + } +} \ No newline at end of file diff --git a/sparkybe-onap-application/config/filters/aaiui_filters.json b/sparkybe-onap-application/config/filters/aaiui_filters.json new file mode 100644 index 0000000..e053442 --- /dev/null +++ b/sparkybe-onap-application/config/filters/aaiui_filters.json @@ -0,0 +1,95 @@ +{ + "filters": [{ + "filterId": "1", + "filterName": "Orchestration-Status", + "displayName": "Orchestration Status", + "dataType": "dropDown", + "multiSelect": "false", + "watermark": "Any Orchestration Status", + "optionsType": "options", + "dataSource": { + "indexName": "aggregate_generic-vnf_index", + "docType": "default", + "fieldName": "orchestration-status" + } + }, + { + "filterId": "2", + "filterName": "Prov-Status", + "displayName": "Provisioning Status", + "dataType": "dropDown", + "multiSelect": "false", + "watermark": "Any Provisioning Status", + "optionsType": "options", + "dataSource": { + "indexName": "aggregate_generic-vnf_index", + "docType": "default", + "fieldName": "prov-status" + } + }, + { + "filterId": "5", + "filterName": "Date", + "displayName": "Date", + "dataType": "date", + "multiSelect": "false", + "watermark": "Choose Date Range", + "defaultValue": { + "decode": "Today", + "code": "last_0_hours" + }, + "optionsType": "dynamicOptions", + "optionsValues": [{ + "decode": "Today", + "code": "last_0_hours" + }, + { + "decode": "Since Yesterday", + "code": "last_1_days" + }, + { + "decode": "Since Last Week", + "code": "last_1_weeks" + }, + { + "decode": "Since Last Month", + "code": "last_1_months" + }, + { + "decode": "Since Last Year", + "code": "last_1_years" + }, + { + "decode": "Custom Range", + "code": "custom_range" + }] + }, + { + "filterId": "7", + "filterName": "nf-type", + "displayName": "Network Function Type", + "dataType": "dropDown", + "multiSelect": "false", + "watermark": "Any Network Function Type", + "optionsType": "options", + "dataSource": { + "indexName": "aggregate_generic-vnf_index", + "docType": "default", + "fieldName": "nf-type" + } + }, + { + "filterId": "8", + "filterName": "nf-role", + "displayName": "Network Function Role", + "dataType": "dropDown", + "multiSelect": "false", + "watermark": "Any Network Function Role", + "optionsType": "options", + "dataSource": { + "indexName": "aggregate_generic-vnf_index", + "docType": "default", + "fieldName": "nf-role" + } + }] +} \ No newline at end of file diff --git a/sparkybe-onap-application/config/filters/aaiui_views.json b/sparkybe-onap-application/config/filters/aaiui_views.json new file mode 100644 index 0000000..74206fb --- /dev/null +++ b/sparkybe-onap-application/config/filters/aaiui_views.json @@ -0,0 +1,17 @@ +{ + "views": [{ + "viewName": "vnfSearch", + "filters": [{ + "filterId": "2" + }, + { + "filterId": "1" + }, + { + "filterId": "7" + }, + { + "filterId": "8" + }] + }] +} \ No newline at end of file diff --git a/sparkybe-onap-application/config/filters/subscription_object_inspector_mapping.json b/sparkybe-onap-application/config/filters/subscription_object_inspector_mapping.json new file mode 100644 index 0000000..ad2ab7a --- /dev/null +++ b/sparkybe-onap-application/config/filters/subscription_object_inspector_mapping.json @@ -0,0 +1,16 @@ +{ + "target": "", + "origin": "", + "messageType": "", + "topic": "", + "message": { + "applicationName": "", + "payload": { + "action": "", + "params": { + "objectName": "", + "externalClassId": "" + } + } + } +} diff --git a/sparkybe-onap-application/config/logging/logback.xml b/sparkybe-onap-application/config/logging/logback.xml new file mode 100644 index 0000000..3d132b7 --- /dev/null +++ b/sparkybe-onap-application/config/logging/logback.xml @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + + + + + + + ${errorLogPattern} + + + + + + + + + + + ${logDirectory}/${generalLogName}.log + + ${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + ${errorLogPattern} + + + + + + INFO + + 256 + + + + + + + + ${logDirectory}/${auditLogName}.log + + ${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + ${auditMetricPattern} + + + + 256 + + + + + ${logDirectory}/${metricsLogName}.log + + ${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + + ${auditMetricPattern} + + + + + + 256 + + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + ${errorLogPattern} + + + + + 256 + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sparkybe-onap-application/config/portal/BOOT-INF/classes/portal.properties b/sparkybe-onap-application/config/portal/BOOT-INF/classes/portal.properties new file mode 100644 index 0000000..ca6b34b --- /dev/null +++ b/sparkybe-onap-application/config/portal/BOOT-INF/classes/portal.properties @@ -0,0 +1,21 @@ +# Java class that implements the ECOMP role and user mgt API +portal.api.impl.class=org.openecomp.sparky.security.portal.PortalRestAPIServiceImpl +# Instance of ECOMP Portal where the app has been on-boarded +# ecomp_rest_url=http://ecomp.homer.att.com/ecompportal/auxapi +# use insecure http for dev purposes to avoid self-signed certificate +ecomp_rest_url=<%= @ECOMP_REST_URL %> + +### CSP-SSO +# Standard global logon page +ecomp_redirect_url=<%= @ECOMP_REDIRECT_URL %> +# Test global logon page only accepts registered users +# ecomp_redirect_url=https://webtest.csp.att.com/ecompportal/ecompportal/process_csp +# CSP settings +csp_cookie_name=<%= @CSP_COOKIE_NAME %> +# Alternate values: DEVL, V_DEVL, V_PROD +csp_gate_keeper_prod_key=PROD + +# No use of UEB; however, this key is used to identify the app. +ueb_listeners_enable=false +# cl778h demo app +ueb_app_key=<%= @UEB_APP_KEY %> \ No newline at end of file diff --git a/sparkybe-onap-application/config/portal/portal-authentication.properties b/sparkybe-onap-application/config/portal/portal-authentication.properties new file mode 100644 index 0000000..a49cc69 --- /dev/null +++ b/sparkybe-onap-application/config/portal/portal-authentication.properties @@ -0,0 +1,3 @@ +username=admin +password=OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10 +onap_enabled=true \ No newline at end of file diff --git a/sparkybe-onap-application/config/portal/roles.config b/sparkybe-onap-application/config/portal/roles.config new file mode 100644 index 0000000..b8313bd --- /dev/null +++ b/sparkybe-onap-application/config/portal/roles.config @@ -0,0 +1,6 @@ +[ + { + "id":1, + "name":"View" + } +] \ No newline at end of file diff --git a/sparkybe-onap-application/config/schemaIngest.properties b/sparkybe-onap-application/config/schemaIngest.properties new file mode 100644 index 0000000..4d06763 --- /dev/null +++ b/sparkybe-onap-application/config/schemaIngest.properties @@ -0,0 +1,7 @@ +# Properties for the SchemaLocationsBean +# The AAI Schema jar will be unpacked +schemaConfig=NA +# Files named aai_oxm_v*.xml are unpacked here: +nodeDir=${oxm.schemaNodeDir} +# Dummy folder/directory: +edgeDir= \ No newline at end of file diff --git a/sparkybe-onap-application/config/schemas/autoSuggestMappings.json b/sparkybe-onap-application/config/schemas/autoSuggestMappings.json new file mode 100644 index 0000000..7857617 --- /dev/null +++ b/sparkybe-onap-application/config/schemas/autoSuggestMappings.json @@ -0,0 +1,10 @@ +{ + "properties" : { + "entity_suggest" : { + "type" : "completion", + "payloads" : true, + "analyzer" : "custom_analyzer", + "preserve_position_increments": false + } + } +} \ No newline at end of file diff --git a/sparkybe-onap-application/config/schemas/autoSuggestSettings.json b/sparkybe-onap-application/config/schemas/autoSuggestSettings.json new file mode 100644 index 0000000..4525be1 --- /dev/null +++ b/sparkybe-onap-application/config/schemas/autoSuggestSettings.json @@ -0,0 +1,21 @@ +{ + "analysis": { + "filter": { + "eng_stop": { + "type": "stop", + "stopwords": "_english_" + } + }, + "analyzer": { + "custom_analyzer": { + "type": "custom", + "tokenizer": "standard", + "filter": [ + "lowercase", + "asciifolding", + "eng_stop" + ] + } + } + } + } \ No newline at end of file diff --git a/sparkybe-onap-application/config/schemas/dynamicMappings.json b/sparkybe-onap-application/config/schemas/dynamicMappings.json new file mode 100644 index 0000000..09a00ac --- /dev/null +++ b/sparkybe-onap-application/config/schemas/dynamicMappings.json @@ -0,0 +1,14 @@ +{ + "dynamic_templates": [ + { + "strings": { + "match_mapping_type": "string", + "match": "*", + "mapping": { + "type": "string", + "index": "not_analyzed" + } + } + } + ] +} \ No newline at end of file diff --git a/sparkybe-onap-application/config/schemas/entityCountHistoryMappings.json b/sparkybe-onap-application/config/schemas/entityCountHistoryMappings.json new file mode 100644 index 0000000..84e3aec --- /dev/null +++ b/sparkybe-onap-application/config/schemas/entityCountHistoryMappings.json @@ -0,0 +1,16 @@ +{ + "properties": { + "count": { + "type": "long" + }, + "entityType": { + "type": "string", + "index": "not_analyzed" + }, + "timestamp": { + "type": "date", + "format": "MMM d y HH:m:s||dd-MM-yyyy HH:mm:ss||yyyy-MM-dd'T'HH:mm:ss.SSSZZ||MM/dd/yyyy||yyyyMMdd'T'HHmmssZ" + } + } +} + diff --git a/sparkybe-onap-application/config/schemas/es_mappings.json b/sparkybe-onap-application/config/schemas/es_mappings.json new file mode 100644 index 0000000..216e3d9 --- /dev/null +++ b/sparkybe-onap-application/config/schemas/es_mappings.json @@ -0,0 +1,32 @@ +{ + "properties": { + "entityType": { + "type": "string", + "analyzer": "ngram_analyzer", + "search_analyzer": "ngram_analyzer" + }, + "entityPrimaryKeyValue": { + "type": "string", + "index": "not_analyzed" + }, + "searchTagIDs": { + "type": "string" + }, + "searchTags": { + "type": "string", + "analyzer": "ngram_analyzer" + }, + "crossEntityReferenceValues": { + "type": "string", + "analyzer": "ngram_analyzer" + }, + "link": { + "type": "string", + "index": "not_analyzed" + }, + "lastmodTimestamp": { + "type": "date", + "format": "MMM d y HH:m:s||dd-MM-yyyy HH:mm:ss||yyyy-MM-dd'T'HH:mm:ss.SSSZZ||yyyy-MM-dd HH:mm:ss||MM/dd/yyyy||yyyyMMdd'T'HHmmssZ" + } + } +} \ No newline at end of file diff --git a/sparkybe-onap-application/config/schemas/es_settings.json b/sparkybe-onap-application/config/schemas/es_settings.json new file mode 100644 index 0000000..21a357c --- /dev/null +++ b/sparkybe-onap-application/config/schemas/es_settings.json @@ -0,0 +1,36 @@ +{ + "analysis": { + "filter": { + "ngram_filter": { + "type": "nGram", + "min_gram": 1, + "max_gram": 50, + "token_chars": [ + "letter", + "digit", + "punctuation", + "symbol" + ] + } + }, + "analyzer": { + "ngram_analyzer": { + "type": "custom", + "tokenizer": "whitespace", + "filter": [ + "lowercase", + "asciifolding", + "ngram_filter" + ] + }, + "whitespace_analyzer": { + "type": "custom", + "tokenizer": "whitespace", + "filter": [ + "lowercase", + "asciifolding" + ] + } + } + } +} \ No newline at end of file diff --git a/sparkybe-onap-application/config/spring-beans/sparky-aggregate-vnf-search-provider.xml b/sparkybe-onap-application/config/spring-beans/sparky-aggregate-vnf-search-provider.xml new file mode 100644 index 0000000..25da171 --- /dev/null +++ b/sparkybe-onap-application/config/spring-beans/sparky-aggregate-vnf-search-provider.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + addSearchProviders + + + + + + + + diff --git a/sparkybe-onap-application/config/spring-beans/sparky-elasticsearch.xml b/sparkybe-onap-application/config/spring-beans/sparky-elasticsearch.xml new file mode 100644 index 0000000..b697fed --- /dev/null +++ b/sparkybe-onap-application/config/spring-beans/sparky-elasticsearch.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sparkybe-onap-application/config/spring-beans/sparky-filters.xml b/sparkybe-onap-application/config/spring-beans/sparky-filters.xml new file mode 100644 index 0000000..2dc4936 --- /dev/null +++ b/sparkybe-onap-application/config/spring-beans/sparky-filters.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sparkybe-onap-application/config/spring-beans/sparky-gizmo.xml b/sparkybe-onap-application/config/spring-beans/sparky-gizmo.xml new file mode 100644 index 0000000..cc6031a --- /dev/null +++ b/sparkybe-onap-application/config/spring-beans/sparky-gizmo.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sparkybe-onap-application/config/spring-beans/sparky-global-search.xml b/sparkybe-onap-application/config/spring-beans/sparky-global-search.xml new file mode 100644 index 0000000..4504f65 --- /dev/null +++ b/sparkybe-onap-application/config/spring-beans/sparky-global-search.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sparkybe-onap-application/config/spring-beans/sparky-oxm-default.xml b/sparkybe-onap-application/config/spring-beans/sparky-oxm-default.xml new file mode 100644 index 0000000..98ce1ad --- /dev/null +++ b/sparkybe-onap-application/config/spring-beans/sparky-oxm-default.xml @@ -0,0 +1,13 @@ + + + + + + + + \ No newline at end of file diff --git a/sparkybe-onap-application/config/spring-beans/sparky-oxm-override.xml b/sparkybe-onap-application/config/spring-beans/sparky-oxm-override.xml new file mode 100644 index 0000000..5c6839b --- /dev/null +++ b/sparkybe-onap-application/config/spring-beans/sparky-oxm-override.xml @@ -0,0 +1,14 @@ + + + + + + + + + \ No newline at end of file diff --git a/sparkybe-onap-application/config/spring-beans/sparky-oxm.xml b/sparkybe-onap-application/config/spring-beans/sparky-oxm.xml new file mode 100644 index 0000000..ed084dc --- /dev/null +++ b/sparkybe-onap-application/config/spring-beans/sparky-oxm.xml @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + java.util.HashMap + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + a + an + and + are + as + at + be + but + by + called + for + if + in + into + is + it + no + not + of + on + or + such + that + the + their + then + there + these + they + this + to + was + will + with + + + + + + diff --git a/sparkybe-onap-application/config/spring-beans/sparky-resources.xml b/sparkybe-onap-application/config/spring-beans/sparky-resources.xml new file mode 100644 index 0000000..2395f82 --- /dev/null +++ b/sparkybe-onap-application/config/spring-beans/sparky-resources.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sparkybe-onap-application/config/spring-beans/sparky-search-service.xml b/sparkybe-onap-application/config/spring-beans/sparky-search-service.xml new file mode 100644 index 0000000..c8d20c6 --- /dev/null +++ b/sparkybe-onap-application/config/spring-beans/sparky-search-service.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sparkybe-onap-application/config/spring-beans/sparky-subscription-service.xml b/sparkybe-onap-application/config/spring-beans/sparky-subscription-service.xml new file mode 100644 index 0000000..2057b9c --- /dev/null +++ b/sparkybe-onap-application/config/spring-beans/sparky-subscription-service.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + pserver + pnf + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sparkybe-onap-application/config/spring-beans/sparky-sync.xml b/sparkybe-onap-application/config/spring-beans/sparky-sync.xml new file mode 100644 index 0000000..34c063b --- /dev/null +++ b/sparkybe-onap-application/config/spring-beans/sparky-sync.xml @@ -0,0 +1,328 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sparkybe-onap-application/config/spring-beans/sparky-view-inspect-search-provider.xml b/sparkybe-onap-application/config/spring-beans/sparky-view-inspect-search-provider.xml new file mode 100644 index 0000000..ac3c920 --- /dev/null +++ b/sparkybe-onap-application/config/spring-beans/sparky-view-inspect-search-provider.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + Schema + + + + + + + + addSearchProviders + + + + + + + + + diff --git a/sparkybe-onap-application/config/spring-beans/sparky-view-inspect-with-gizmo.xml b/sparkybe-onap-application/config/spring-beans/sparky-view-inspect-with-gizmo.xml new file mode 100644 index 0000000..f709446 --- /dev/null +++ b/sparkybe-onap-application/config/spring-beans/sparky-view-inspect-with-gizmo.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + cloud-region + complex + vnf-image + image + flavor + availability-zone + tenant + network-profile + l-interface + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sparkybe-onap-application/config/spring-beans/sparky-view-inspect-with-resources.xml b/sparkybe-onap-application/config/spring-beans/sparky-view-inspect-with-resources.xml new file mode 100644 index 0000000..97fa807 --- /dev/null +++ b/sparkybe-onap-application/config/spring-beans/sparky-view-inspect-with-resources.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + cloud-region + complex + vnf-image + image + flavor + availability-zone + tenant + network-profile + l-interface + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sparkybe-onap-application/pom.xml b/sparkybe-onap-application/pom.xml index 287debe..622ac67 100644 --- a/sparkybe-onap-application/pom.xml +++ b/sparkybe-onap-application/pom.xml @@ -452,6 +452,37 @@ + + org.apache.maven.plugins + maven-resources-plugin + + + copy-config-to-target + package + + copy-resources + + + target/config + true + + + ${basedir}/config + true + + **/* + + + **/auth/* + + + + + + + + + org.apache.maven.plugins maven-dependency-plugin diff --git a/sparkybe-onap-application/src/main/docker/Dockerfile b/sparkybe-onap-application/src/main/docker/Dockerfile index 52e3e84..3f05ff9 100644 --- a/sparkybe-onap-application/src/main/docker/Dockerfile +++ b/sparkybe-onap-application/src/main/docker/Dockerfile @@ -16,18 +16,21 @@ RUN export JAVA_HOME # Build up the deployment folder structure RUN mkdir -p $MICRO_HOME RUN mkdir -p $BIN_HOME +RUN mkdir -p $MICRO_HOME/config/ RUN mkdir -p $MICRO_HOME/lib/ RUN mkdir -p $MICRO_HOME/static/ ADD *.jar $MICRO_HOME/lib/ ADD scripts/* $MICRO_HOME/bin/ COPY static/ $MICRO_HOME/static/ +COPY config/ $MICRO_HOME/config/ COPY oxm $MICRO_HOME/oxm/ RUN chmod 755 $MICRO_HOME/bin/* RUN chmod 755 $MICRO_HOME/lib/* RUN chmod 755 $MICRO_HOME/static/* +RUN chmod 755 $MICRO_HOME/config/* RUN ln -s /logs $MICRO_HOME/logs diff --git a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/Application.java b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/Application.java index 2334297..9958d72 100644 --- a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/Application.java +++ b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/Application.java @@ -20,101 +20,19 @@ */ package org.onap.aai.sparky; -import javax.servlet.Filter; - -import org.apache.camel.component.servlet.CamelHttpTransportServlet; import org.onap.aai.sparky.config.PropertyPasswordConfiguration; -import org.onap.aai.sparky.security.filter.LoginFilter; -import org.openecomp.portalsdk.core.onboarding.crossapi.PortalRestAPIProxy; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.web.servlet.FilterRegistrationBean; -import org.springframework.boot.web.servlet.ServletRegistrationBean; -import org.springframework.context.annotation.Bean; @SpringBootApplication public class Application { - private static final String SPARKY_SSL_ENABLED_PROPERTY = "sparky.ssl.enabled"; - private static final String SPARKY_PORTAL_ENABLED_PROPERTY = "sparky.portal.enabled"; - private static final String SPARKY_SSL_ENABLED_ENV = "SPARKY_SSL_ENABLED"; - private static final String SPARKY_PORTAL_ENABLED_ENV = "SPARKY_PORTAL_ENABLED"; - - private Filter loginFilter = new LoginFilter(); - public static void main(String[] args) { - setDefaultProperties(); SpringApplication app = new SpringApplication(Application.class); app.addInitializers(new PropertyPasswordConfiguration()); app.run(args); } - - protected static void setDefaultProperties() { - - /* - * By default we want ssl and portal integration, however it is possible to turn these off with - * properties for local development and interop in some situations. - */ - - if (System.getenv(SPARKY_SSL_ENABLED_ENV) == null) { - System.setProperty(SPARKY_SSL_ENABLED_PROPERTY, "true"); - } else { - System.setProperty(SPARKY_SSL_ENABLED_PROPERTY, System.getenv(SPARKY_SSL_ENABLED_ENV)); - } - - boolean sslEnabled = Boolean.parseBoolean(System.getProperty(SPARKY_SSL_ENABLED_PROPERTY)); - - if (sslEnabled) { - System.setProperty("server.ssl.key-store-password", System.getenv("KEYSTORE_PASSWORD")); - System.setProperty("server.ssl.key-password", System.getenv("KEYSTORE_ALIAS_PASSWORD")); - } - - if (System.getenv(SPARKY_PORTAL_ENABLED_ENV) == null) { - System.setProperty(SPARKY_PORTAL_ENABLED_PROPERTY, "true"); - } else { - System.setProperty(SPARKY_PORTAL_ENABLED_PROPERTY, System.getenv(SPARKY_PORTAL_ENABLED_ENV)); - } - } - - /* - * This initialization code enabled access to aai-ui-proxy-processor - */ - @Bean - ServletRegistrationBean servletRegistrationBean() { - final ServletRegistrationBean servlet = - new ServletRegistrationBean(new CamelHttpTransportServlet(), "/rest/*"); - servlet.setName("CamelServlet"); - return servlet; - } - - /** - * bind LoginFilter - */ - @Bean - @ConditionalOnProperty(value = "sparky.portal.enabled", havingValue = "true") - public FilterRegistrationBean loginFilterRegistrationBean() { - FilterRegistrationBean registration = new FilterRegistrationBean(); - - registration.setFilter(loginFilter); - registration.addUrlPatterns("/*"); - - return registration; - } - - /** - * Bind the Portal API Proxy - */ - @Bean - @ConditionalOnProperty(value = "sparky.portal.enabled", havingValue = "true") - public ServletRegistrationBean portalApiProxy() { - - final ServletRegistrationBean servlet = - new ServletRegistrationBean(new PortalRestAPIProxy(), "/api/v2/*"); - servlet.setName("PortalRestApiProxy"); - return servlet; - } - + } diff --git a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/aai/FrontEndLayoutApi.java b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/aai/FrontEndLayoutApi.java index 0590cd6..ab74074 100644 --- a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/aai/FrontEndLayoutApi.java +++ b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/aai/FrontEndLayoutApi.java @@ -31,9 +31,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; @RestController public class FrontEndLayoutApi { - public FrontEndLayoutApi() { - } @RequestMapping(value = "/layouts", method = {RequestMethod.GET}) diff --git a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkySslConfigLoader.java b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/camel/FilterAggregationRouter.java similarity index 69% rename from sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkySslConfigLoader.java rename to sparkybe-onap-application/src/main/java/org/onap/aai/sparky/camel/FilterAggregationRouter.java index c216ddd..634dcc5 100644 --- a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkySslConfigLoader.java +++ b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/camel/FilterAggregationRouter.java @@ -1,6 +1,6 @@ /** * ============LICENSE_START======================================================= - * org.onap.aai + * SPARKY (AAI UI service) * ================================================================================ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. * Copyright © 2017-2018 Amdocs @@ -18,15 +18,20 @@ * limitations under the License. * ============LICENSE_END========================================================= */ -package org.onap.aai.sparky.config; +package org.onap.aai.sparky.camel; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; +import org.apache.camel.spring.SpringRouteBuilder; +import org.springframework.stereotype.Component; -@Configuration -@ConditionalOnProperty(value="sparky.ssl.enabled", havingValue = "true") -@PropertySource("file:${CONFIG_HOME}/sparky-ssl-config.properties") -public class SparkySslConfigLoader { +@Component +public class FilterAggregationRouter extends SpringRouteBuilder { + + @Override + public void configure() throws Exception { + + rest().post("/search/filterAggregation") + .to("bean:aggregateSummaryProcessor?method=getFilteredAggregation"); + + } } diff --git a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkyHttpConfigLoader.java b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/camel/FilterRequestRouter.java similarity index 69% rename from sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkyHttpConfigLoader.java rename to sparkybe-onap-application/src/main/java/org/onap/aai/sparky/camel/FilterRequestRouter.java index f6b739c..849f013 100644 --- a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkyHttpConfigLoader.java +++ b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/camel/FilterRequestRouter.java @@ -1,6 +1,6 @@ /** * ============LICENSE_START======================================================= - * org.onap.aai + * SPARKY (AAI UI service) * ================================================================================ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. * Copyright © 2017-2018 Amdocs @@ -18,15 +18,20 @@ * limitations under the License. * ============LICENSE_END========================================================= */ -package org.onap.aai.sparky.config; +package org.onap.aai.sparky.camel; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; +import org.apache.camel.spring.SpringRouteBuilder; +import org.springframework.stereotype.Component; -@Configuration -@ConditionalOnProperty(value="sparky.ssl.enabled", havingValue = "false") -@PropertySource("file:${CONFIG_HOME}/sparky-http-config.properties") -public class SparkyHttpConfigLoader { +@Component +public class FilterRequestRouter extends SpringRouteBuilder { + + @Override + public void configure() throws Exception { + + rest().post("/search/unifiedFilterRequest") + .to("bean:filterProcessor?method=getFiltersWithValues"); + + } } diff --git a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkyConfigLoader.java b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/camel/GlobalSearchRouter.java similarity index 72% rename from sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkyConfigLoader.java rename to sparkybe-onap-application/src/main/java/org/onap/aai/sparky/camel/GlobalSearchRouter.java index 5124ce7..ea87254 100644 --- a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/SparkyConfigLoader.java +++ b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/camel/GlobalSearchRouter.java @@ -1,6 +1,6 @@ /** * ============LICENSE_START======================================================= - * org.onap.aai + * SPARKY (AAI UI service) * ================================================================================ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. * Copyright © 2017-2018 Amdocs @@ -18,14 +18,19 @@ * limitations under the License. * ============LICENSE_END========================================================= */ -package org.onap.aai.sparky.config; +package org.onap.aai.sparky.camel; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; +import org.apache.camel.spring.SpringRouteBuilder; +import org.springframework.stereotype.Component; + +@Component +public class GlobalSearchRouter extends SpringRouteBuilder { + + @Override + public void configure() throws Exception { + + rest().post("/search/querysearch").to("bean:unifiedSearchProcessor?method=search"); + + } -@Configuration -@PropertySource("file:${CONFIG_HOME}/sparky-application.properties") -public class SparkyConfigLoader { - - } diff --git a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/camel/SubscriptionRouter.java b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/camel/SubscriptionRouter.java new file mode 100644 index 0000000..4a28e30 --- /dev/null +++ b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/camel/SubscriptionRouter.java @@ -0,0 +1,37 @@ +/** + * ============LICENSE_START======================================================= + * SPARKY (AAI UI service) + * ================================================================================ + * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright © 2017-2018 Amdocs + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ +package org.onap.aai.sparky.camel; + +import org.apache.camel.spring.SpringRouteBuilder; +import org.springframework.stereotype.Component; + +@Component +public class SubscriptionRouter extends SpringRouteBuilder { + + @Override + public void configure() throws Exception { + + rest().get("/subscription/getsubscription") + .to("bean:subscriptionServiceProcessor?method=getSubscription"); + + } + +} diff --git a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/camel/ViewInspectRouter.java b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/camel/ViewInspectRouter.java new file mode 100644 index 0000000..ee2ae04 --- /dev/null +++ b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/camel/ViewInspectRouter.java @@ -0,0 +1,37 @@ +/** + * ============LICENSE_START======================================================= + * SPARKY (AAI UI service) + * ================================================================================ + * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright © 2017-2018 Amdocs + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ +package org.onap.aai.sparky.camel; + +import org.apache.camel.spring.SpringRouteBuilder; +import org.springframework.stereotype.Component; + +@Component +public class ViewInspectRouter extends SpringRouteBuilder { + + @Override + public void configure() throws Exception { + + rest().post("/visualization/prepareVisualization").route() + .to("bean:schemaVisualizationProcessor?method=processVisualizationRequest"); + + } + +} diff --git a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/CamelConfiguration.java b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/CamelConfiguration.java new file mode 100644 index 0000000..8f433db --- /dev/null +++ b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/CamelConfiguration.java @@ -0,0 +1,19 @@ +package org.onap.aai.sparky.config; + +import org.apache.camel.component.servlet.CamelHttpTransportServlet; +import org.springframework.boot.web.servlet.ServletRegistrationBean; +import org.springframework.context.annotation.Bean; +import org.springframework.stereotype.Component; + +@Component +public class CamelConfiguration { + + @Bean + ServletRegistrationBean servletRegistrationBean() { + final ServletRegistrationBean servlet = + new ServletRegistrationBean(new CamelHttpTransportServlet(), "/rest/*", "/services/*"); + servlet.setName("CamelServlet"); + return servlet; + } + +} \ No newline at end of file diff --git a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/portal/PortalBean.java b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/portal/PortalBean.java new file mode 100644 index 0000000..86f019e --- /dev/null +++ b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/portal/PortalBean.java @@ -0,0 +1,41 @@ +package org.onap.aai.sparky.portal; + +import javax.servlet.Filter; + +import org.onap.aai.sparky.security.filter.LoginFilter; +import org.openecomp.portalsdk.core.onboarding.crossapi.PortalRestAPIProxy; +import org.springframework.boot.web.servlet.FilterRegistrationBean; +import org.springframework.boot.web.servlet.ServletRegistrationBean; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Profile; +import org.springframework.stereotype.Component; + +@Component +@Profile("portal") +public class PortalBean { + + private Filter loginFilter = new LoginFilter(); + + /** + * bind LoginFilter + */ + @Bean + public FilterRegistrationBean loginFilterRegistrationBean() { + FilterRegistrationBean registration = new FilterRegistrationBean(); + + registration.setFilter(loginFilter); + registration.addUrlPatterns("/*"); + + return registration; + } + + @Bean + public ServletRegistrationBean portalApiProxy() { + + final ServletRegistrationBean servlet = + new ServletRegistrationBean(new PortalRestAPIProxy(), "/api/v2/*"); + servlet.setName("PortalRestApiProxy"); + return servlet; + } + +} \ No newline at end of file diff --git a/sparkybe-onap-application/src/main/scripts/start.sh b/sparkybe-onap-application/src/main/scripts/start.sh index a8eba46..c16c9b2 100644 --- a/sparkybe-onap-application/src/main/scripts/start.sh +++ b/sparkybe-onap-application/src/main/scripts/start.sh @@ -1,11 +1,17 @@ #!/bin/sh APP_HOME="/opt/app/sparky" -CONFIG_HOME=${APP_HOME}/appconfig +CONFIG_HOME=${APP_HOME}/config PROPS="-DAPP_HOME=${APP_HOME} -DCONFIG_HOME=${CONFIG_HOME} -Dlogging.config=${CONFIG_HOME}/logging/logback.xml" set -x jar ufv ${APP_HOME}/lib/sparkybe-onap-application*.jar -C ${CONFIG_HOME}/portal/ BOOT-INF/classes/portal.properties + +# +# change the working directory so that Spring-Boot will pick up the config folder from the right path +# +cd $APP_HOME + java -Xms1024m -Xmx4096m $PROPS -jar ${APP_HOME}/lib/sparkybe-onap-application*.jar -- 2.16.6