From ca63da6e0cb7fb63e231343d0b52a40036f6b6aa Mon Sep 17 00:00:00 2001 From: Varun Gudisena Date: Wed, 30 Aug 2017 16:00:10 -0500 Subject: Add Initial Code Import Added initial code for DMaaP Message Router Component Issue-id: DMAAP-76 Change-Id: Ica6f265ea4f2901cf47191f21b4448514ea7c8d4 Signed-off-by: Varun Gudisena --- src/main/resources/DMaaPUrl.properties | 39 +++++++++ src/main/resources/cambriaApiVersion.properties | 23 +++++ src/main/resources/dme2testcase.properties | 85 ++++++++++++++++++ src/main/resources/endpoint.properties | 31 +++++++ src/main/resources/images/attLogo.gif | Bin 0 -> 1885 bytes src/main/resources/images/att_vt_1cp_grd_rev.gif | Bin 0 -> 5238 bytes src/main/resources/routes.conf | 106 +++++++++++++++++++++++ src/main/resources/templates/hello.html | 9 ++ 8 files changed, 293 insertions(+) create mode 100644 src/main/resources/DMaaPUrl.properties create mode 100644 src/main/resources/cambriaApiVersion.properties create mode 100644 src/main/resources/dme2testcase.properties create mode 100644 src/main/resources/endpoint.properties create mode 100644 src/main/resources/images/attLogo.gif create mode 100644 src/main/resources/images/att_vt_1cp_grd_rev.gif create mode 100644 src/main/resources/routes.conf create mode 100644 src/main/resources/templates/hello.html (limited to 'src/main/resources') diff --git a/src/main/resources/DMaaPUrl.properties b/src/main/resources/DMaaPUrl.properties new file mode 100644 index 0000000..8c90912 --- /dev/null +++ b/src/main/resources/DMaaPUrl.properties @@ -0,0 +1,39 @@ +############################################################################### +# ============LICENSE_START======================================================= +# org.onap.dmaap +# ================================================================================ +# Copyright © 2017 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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========================================================= +# +# ECOMP is a trademark and service mark of AT&T Intellectual Property. +# +############################################################################### +#dev1 server +#url=http://hltd435.hydc.sbc.com:8080/DMaaP/dmaaprest + +#dev2 server +#url=http://hltd436.hydc.sbc.com:8080/DMaaP/dmaaprest/ +#url=http://hltd436.hydc.sbc.com:8181/DMaaP/dmaaprest/ + +#localhost +#url=http://hltd435.hydc.sbc.com:8089/DMaaP/dmaaprest/ +url=http://hltd436.hydc.sbc.com:8080/DMaaP/dmaaprest/ +#cloud +#url=http://127.0.0.1:8090/DMaaP/dmaaprest/ + +#X-Cambria-Date +date=2015-11-23T8:56:19-0700 + +# topic +topicName=org.onap.dmaap.messagerouter.msgrtr.app.dmaap.mr.sharjeel \ No newline at end of file diff --git a/src/main/resources/cambriaApiVersion.properties b/src/main/resources/cambriaApiVersion.properties new file mode 100644 index 0000000..4521526 --- /dev/null +++ b/src/main/resources/cambriaApiVersion.properties @@ -0,0 +1,23 @@ +############################################################################### +# ============LICENSE_START======================================================= +# org.onap.dmaap +# ================================================================================ +# Copyright © 2017 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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========================================================= +# +# ECOMP is a trademark and service mark of AT&T Intellectual Property. +# +############################################################################### + +cambriaApiVersion=${project.version} diff --git a/src/main/resources/dme2testcase.properties b/src/main/resources/dme2testcase.properties new file mode 100644 index 0000000..6f358a3 --- /dev/null +++ b/src/main/resources/dme2testcase.properties @@ -0,0 +1,85 @@ +############################################################################### +# ============LICENSE_START======================================================= +# org.onap.dmaap +# ================================================================================ +# Copyright © 2017 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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========================================================= +# +# ECOMP is a trademark and service mark of AT&T Intellectual Property. +# +############################################################################### +Version =1.0 +Environment =TEST +Latitude =37.66 +Longitude =-122.096839 +ServiceName =dmaap-v1.dev.dmaap.dt.saat.acsi.att.com/apiKeys +Partner =MR1 + +#producerConsumer +SubContextPathproducer =/events/ +SubContextPathConsumer=/events/ +group=group +id=rk229m@csp.att.com + +#filter +SubContextPathConsumerFilter=/events/ +filterType=filter={"class":"Equals", "field":"email", "value":"ai039a@att.com"} + +#topics +subContextPathGetAllTopic=/topics +subContextPathGetOneTopic=/topics/ +SubContextPathGetPublisher=/topics/org.onap.dmaap.messagerouter.msgrtr.app.dmaap.mr.sharjeel/producers +SubContextPathGetPermitPublisher=/topics/org.onap.dmaap.messagerouter.msgrtr.app.dmaap.mr.sharjeel/producers/rk229m@csp.att.com +SubContextPathGetConsumer=/topics/org.onap.dmaap.messagerouter.msgrtr.app.dmaap.mr.sharjeel/consumers +SubContextPathCreateTopic=/topics/create +SubContextPathGetPermitConsumer=/topics/org.onap.dmaap.messagerouter.msgrtr.app.dmaap.mr.sharjeel/consumers/rk229m@att.com +newTopic=org.onap.dmaap.messagerouter.msgrtr.dmaap.mr.junittestingtopic +topicDescription=new topic creation +partition=1 +replication=1 +txenabled=true +deleteTopic=org.onap.dmaap.messagerouter.msgrtr.dmaap.mr.deleteTopic + + +#Admin +SubContextPathGetAdminConsumerCache=/consumerCache +SubContextPathDropAdminConsumerCache=/dropConsumerCache + +#Metrics +SubContextPathGetMetrics=/metrics +SubContextPathGetMetricsByName=/metrics/startTime + +#apikey +SubContextPathGetApiKeys=/apiKeys +SubContextPathGetCreateKeys=/create +SubContextPathUpdateKeys=/apiKeys/ +SubContextPathDeleteteKeys=/apiKeys/ +SubContextPathGetOneKey=/apiKeys/ + +Protocol =http + + +#methodType +MethodTypePost =POST +MethodTypeGet=GET +MethodTypePut=PUT +MethodTypeDelete=DELETE +message ={"id": "example@att.com"} + +user= +password= + + +contenttype=application/json +contenttypejson=application/json \ No newline at end of file diff --git a/src/main/resources/endpoint.properties b/src/main/resources/endpoint.properties new file mode 100644 index 0000000..f1ab131 --- /dev/null +++ b/src/main/resources/endpoint.properties @@ -0,0 +1,31 @@ +############################################################################### +# ============LICENSE_START======================================================= +# org.onap.dmaap +# ================================================================================ +# Copyright © 2017 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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========================================================= +# +# ECOMP is a trademark and service mark of AT&T Intellectual Property. +# +############################################################################### +Latitude =37.66 +Longitude =-122.096839 +Version =1.0.0 +ServiceName =org.onap.dmaap.messagerouter.msgrtr.acsi.saat.dt.dmaap.dev.demo1 +Environment =DEV +RouteOffer =LA +HostName =hltd436.hydc.sbc.com +Port =8080 +ContextPath =/DMaaP/dmaaprest +Protocol =http \ No newline at end of file diff --git a/src/main/resources/images/attLogo.gif b/src/main/resources/images/attLogo.gif new file mode 100644 index 0000000..10f184c Binary files /dev/null and b/src/main/resources/images/attLogo.gif differ diff --git a/src/main/resources/images/att_vt_1cp_grd_rev.gif b/src/main/resources/images/att_vt_1cp_grd_rev.gif new file mode 100644 index 0000000..034515c Binary files /dev/null and b/src/main/resources/images/att_vt_1cp_grd_rev.gif differ diff --git a/src/main/resources/routes.conf b/src/main/resources/routes.conf new file mode 100644 index 0000000..14c4f56 --- /dev/null +++ b/src/main/resources/routes.conf @@ -0,0 +1,106 @@ +package org.onap.dmaap.messagerouter.msgrtr.nsa.cambria.endpoints + +# +# We need to deprecate the original non-versioned paths and use /v1/ for them. +# Non-versioned paths will be supported "permanently." +# + +# +# metrics +# +GET /metrics CambriaMetrics.get +GET /metrics/{metricName} CambriaMetrics.getMetricByName + +GET /v1/metrics CambriaMetrics.get +GET /v1/metrics/{metricName} CambriaMetrics.getMetricByName + +# +# get and post events +# +GET /events/{topic}/{consumerGroup}/{clientId} CambriaEvents.getEvents +POST /events/{topic} CambriaEvents.pushEvents +POST /events/{topic}/{partition} CambriaEvents.pushEvents + +GET /v1/events/{topic}/{consumerGroup}/{clientId} CambriaEvents.getEvents +POST /v1/events/{topic} CambriaEvents.pushEvents +POST /v1/events/{topic}/{partition} CambriaEvents.pushEvents + + +# +# api keys +# +GET /apiKeys CambriaApiKeys.getAllApiKeys +POST /apiKeys/create CambriaApiKeys.createApiKey +GET /apiKeys/{apiKey} CambriaApiKeys.getApiKey +PATCH /apiKeys/{apiKey} CambriaApiKeys.updateApiKey +DELETE /apiKeys/{apiKey} CambriaApiKeys.deleteApiKey + +GET /v1/apiKeys CambriaApiKeys.getAllApiKeys +POST /v1/apiKeys/create CambriaApiKeys.createApiKey +GET /v1/apiKeys/{apiKey} CambriaApiKeys.getApiKey +PATCH /v1/apiKeys/{apiKey} CambriaApiKeys.updateApiKey +DELETE /v1/apiKeys/{apiKey} CambriaApiKeys.deleteApiKey + +# +# topics +# +POST /topics/create CambriaTopics.createTopic +GET /topics CambriaTopics.getTopics +GET /topics/{topicName} CambriaTopics.getTopic +DELETE /topics/{topicName} CambriaTopics.deleteTopic + +POST /v1/topics/create CambriaTopics.createTopic +GET /v1/topics CambriaTopics.getTopics +GET /v1/topics/{topicName} CambriaTopics.getTopic +DELETE /v1/topics/{topicName} CambriaTopics.deleteTopic + +# +# topic permissions +# +GET /topics/{topicName}/producers CambriaTopics.getPublishersByTopicName +PUT /topics/{topicName}/producers/{producerId} CambriaTopics.permitPublisherForTopic +DELETE /topics/{topicName}/producers/{producerId} CambriaTopics.denyPublisherForTopic + +GET /topics/{topicName}/consumers CambriaTopics.getConsumersByTopicName +PUT /topics/{topicName}/consumers/{consumerId} CambriaTopics.permitConsumerForTopic +DELETE /topics/{topicName}/consumers/{consumerId} CambriaTopics.denyConsumerForTopic + +GET /v1/topics/{topicName}/producers CambriaTopics.getPublishersByTopicName +PUT /v1/topics/{topicName}/producers/{producerId} CambriaTopics.permitPublisherForTopic +DELETE /v1/topics/{topicName}/producers/{producerId} CambriaTopics.denyPublisherForTopic + +GET /v1/topics/{topicName}/consumers CambriaTopics.getConsumersByTopicName +PUT /v1/topics/{topicName}/consumers/{consumerId} CambriaTopics.permitConsumerForTopic +DELETE /v1/topics/{topicName}/consumers/{consumerId} CambriaTopics.denyConsumerForTopic + +# +# Admin +# +GET /admin/consumerCache CambriaAdmin.showConsumerCache +POST /admin/dropConsumerCache CambriaAdmin.dropConsumerCache + +GET /v1/admin/consumerCache CambriaAdmin.showConsumerCache +POST /v1/admin/dropConsumerCache CambriaAdmin.dropConsumerCache + +############################################################################### +# +# UI routes don't need to be versioned +# + +# +# UI +# +GET / CambriaUi.hello +GET /ui/apikeys CambriaUi.getApiKeysTable +GET /ui/apikeys/{apiKey} CambriaUi.getApiKey +GET /ui/topics CambriaUi.getTopicsTable +GET /ui/topics/{topic} CambriaUi.getTopic + + +# typical static file paths +GET /css/ staticDir:css +GET /js/ staticDir:js +GET /images/ staticDir:images +GET /font/ staticDir:font +GET /favicon.ico staticFile:images/attLogo.gif +GET /font-awesome/ staticDir:font-awesome diff --git a/src/main/resources/templates/hello.html b/src/main/resources/templates/hello.html new file mode 100644 index 0000000..69a65ab --- /dev/null +++ b/src/main/resources/templates/hello.html @@ -0,0 +1,9 @@ +#set($tab="") +#parse("header.html") + +

Cambria API

+

This is a Cambria API server, part of the Universal Event Broker service, a general purpose, + high-throughput pub/sub event routing system.

+

Please see the Cambria project information page. + +#parse("footer.html") -- cgit 1.2.3-korg