diff options
-rw-r--r-- | INFO.yaml | 42 | ||||
-rw-r--r-- | pom.xml | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/dbcapi/authentication/ApiPerms.java | 6 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/dbcapi/model/Feed.java | 5 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/dbcapi/resources/BridgeResource.java | 4 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/dbcapi/resources/DR_SubResource.java | 4 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/dbcapi/service/DmaapService.java | 13 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/dbcapi/util/Graph.java | 13 | ||||
-rw-r--r-- | src/test/java/org/onap/dmaap/dbcapi/util/FqdnTest.java | 33 |
9 files changed, 97 insertions, 25 deletions
diff --git a/INFO.yaml b/INFO.yaml new file mode 100644 index 0000000..172026d --- /dev/null +++ b/INFO.yaml @@ -0,0 +1,42 @@ +--- +project: 'dmaap-dbcapi' +project_creation_date: '2017-08-29' +lifecycle_state: 'Incubation' +project_lead: &onap_releng_ptl + name: 'Ram Koya' + email: 'rk541m@att.com' + id: 'rampi_k' + company: 'ATT' + timezone: 'America/Dallas' +primary_contact: *onap_releng_ptl +issue_tracking: + type: 'jira' + url: 'https://jira.onap.org/projects/DMAAP' + key: 'DMAAP' +meetings: + - type: 'zoom' + agenda: '' + url: 'https://wiki.onap.org/pages/viewpage.action?pageId=13599275' + server: 'n/a' + channel: 'n/a' + repeats: 'weekly' + time: '13:00 UTC' +committers: + - <<: *onap_releng_ptl + - name: 'Ramdas Sawant' + email: 'rs873m@att.com' + company: 'ATT' + id: 'rs873m' + timezone: 'America/Dallas' + - name: 'Varun Gudisena' + email: 'vg411h@att.com' + company: 'ATT' + id: 'vg411h' + timezone: 'America/Dallas' +tsc: + approval: 'https://lists.onap.org/pipermail/onap-tsc' + changes: + - type: 'Removal' + name: 'Habib Madani' + name: 'Xinhui Li' + name: 'Jing Wang' @@ -379,7 +379,7 @@ <jackson.version>2.9.5</jackson.version> <jersey.version>2.26</jersey.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <jettyVersion>9.3.8.RC0</jettyVersion> + <jettyVersion>9.4.12.RC2</jettyVersion> <eelf.version>1.0.0</eelf.version> <artifact.version>1.0.20-SNAPSHOT</artifact.version> <!-- SONAR --> diff --git a/src/main/java/org/onap/dmaap/dbcapi/authentication/ApiPerms.java b/src/main/java/org/onap/dmaap/dbcapi/authentication/ApiPerms.java index f3b9ebc..bcadf40 100644 --- a/src/main/java/org/onap/dmaap/dbcapi/authentication/ApiPerms.java +++ b/src/main/java/org/onap/dmaap/dbcapi/authentication/ApiPerms.java @@ -3,6 +3,8 @@ * org.onap.dmaap * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * + * Modifications Copyright (C) 2018 IBM. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -172,8 +174,8 @@ public class ApiPerms extends BaseLoggingClass { } public void setEnvMap() { - Dmaap dmaap = new DmaapService().getDmaap(); - String dmaapName = dmaap.getDmaapName(); + Dmaap dmaapVar = new DmaapService().getDmaap(); + String dmaapName = dmaapVar.getDmaapName(); PermissionMap.initMap( envMap, dmaapName ); } diff --git a/src/main/java/org/onap/dmaap/dbcapi/model/Feed.java b/src/main/java/org/onap/dmaap/dbcapi/model/Feed.java index 648812f..b78377b 100644 --- a/src/main/java/org/onap/dmaap/dbcapi/model/Feed.java +++ b/src/main/java/org/onap/dmaap/dbcapi/model/Feed.java @@ -3,6 +3,8 @@ * org.onap.dmaap * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * + * Modifications Copyright (C) 2019 IBM. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -262,8 +264,7 @@ public class Feed extends DmaapObject { } public static String getSubProvURL( String feedId ) { - String ret = new String(); - ret = new DmaapService().getDmaap().getDrProvUrl() + "/subscribe/" + feedId ; + String ret = new DmaapService().getDmaap().getDrProvUrl() + "/subscribe/" + feedId ; return ret; } diff --git a/src/main/java/org/onap/dmaap/dbcapi/resources/BridgeResource.java b/src/main/java/org/onap/dmaap/dbcapi/resources/BridgeResource.java index e6fede7..192b63d 100644 --- a/src/main/java/org/onap/dmaap/dbcapi/resources/BridgeResource.java +++ b/src/main/java/org/onap/dmaap/dbcapi/resources/BridgeResource.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -121,7 +123,7 @@ public class BridgeResource extends BaseLoggingClass { } logger.info( "Count for "+ key + ": " + mCnt); totCnt += mCnt; - if (showDetail) { + if (showDetail && mm!=null) { brTopic[s] = new BrTopic(); brTopic[s].setBrSource( mm.getSourceCluster()); brTopic[s].setBrTarget(mm.getTargetCluster()); diff --git a/src/main/java/org/onap/dmaap/dbcapi/resources/DR_SubResource.java b/src/main/java/org/onap/dmaap/dbcapi/resources/DR_SubResource.java index 58a39df..28bfdc5 100644 --- a/src/main/java/org/onap/dmaap/dbcapi/resources/DR_SubResource.java +++ b/src/main/java/org/onap/dmaap/dbcapi/resources/DR_SubResource.java @@ -3,6 +3,8 @@ * org.onap.dmaap * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * + * Modifications Copyright (C) 2019 IBM. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -120,8 +122,6 @@ public class DR_SubResource extends BaseLoggingClass { fnew.setSubs(subs); logger.info( "update feed"); - //feeds.updateFeed( fnew, err ); - return resp.success(Status.CREATED.getStatusCode(), snew); } diff --git a/src/main/java/org/onap/dmaap/dbcapi/service/DmaapService.java b/src/main/java/org/onap/dmaap/dbcapi/service/DmaapService.java index 48ee661..408d000 100644 --- a/src/main/java/org/onap/dmaap/dbcapi/service/DmaapService.java +++ b/src/main/java/org/onap/dmaap/dbcapi/service/DmaapService.java @@ -3,6 +3,8 @@ * org.onap.dmaap * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * + * Modifications Copyright (C) 2019 IBM. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,16 +23,6 @@ package org.onap.dmaap.dbcapi.service; import java.util.ArrayList; - - - - - - - - - - import org.onap.dmaap.dbcapi.aaf.AafService; import org.onap.dmaap.dbcapi.aaf.DmaapGrant; import org.onap.dmaap.dbcapi.aaf.DmaapPerm; @@ -43,7 +35,6 @@ import org.onap.dmaap.dbcapi.logging.DmaapbcLogMessageEnum; import org.onap.dmaap.dbcapi.model.ApiError; import org.onap.dmaap.dbcapi.model.Dmaap; import org.onap.dmaap.dbcapi.model.MR_Client; -import org.onap.dmaap.dbcapi.model.ReplicationType; import org.onap.dmaap.dbcapi.model.Topic; import org.onap.dmaap.dbcapi.model.DmaapObject.DmaapObject_Status; import org.onap.dmaap.dbcapi.util.DmaapConfig; diff --git a/src/main/java/org/onap/dmaap/dbcapi/util/Graph.java b/src/main/java/org/onap/dmaap/dbcapi/util/Graph.java index a7700a1..700c77f 100644 --- a/src/main/java/org/onap/dmaap/dbcapi/util/Graph.java +++ b/src/main/java/org/onap/dmaap/dbcapi/util/Graph.java @@ -3,6 +3,8 @@ * org.onap.dmaap * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * + * Modifications Copyright (C) 2019 IBM. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,18 +22,17 @@ package org.onap.dmaap.dbcapi.util; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - import org.onap.dmaap.dbcapi.database.DatabaseClass; import org.onap.dmaap.dbcapi.model.DcaeLocation; import org.onap.dmaap.dbcapi.model.MR_Client; import org.onap.dmaap.dbcapi.model.MR_Cluster; import org.onap.dmaap.dbcapi.service.MR_ClusterService; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + public class Graph { private HashMap<String, String> graph; diff --git a/src/test/java/org/onap/dmaap/dbcapi/util/FqdnTest.java b/src/test/java/org/onap/dmaap/dbcapi/util/FqdnTest.java new file mode 100644 index 0000000..7c7815f --- /dev/null +++ b/src/test/java/org/onap/dmaap/dbcapi/util/FqdnTest.java @@ -0,0 +1,33 @@ +/*- + * ============LICENSE_START======================================================= + * org.onap.dmaap + * ================================================================================ + * Copyright (C) 2019 IBM 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========================================================= + */ +package org.onap.dmaap.dbcapi.util; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class FqdnTest { + + @Test + public void testIsValid() { + assertTrue(Fqdn.isValid("www.ibm.com")); + assertFalse(Fqdn.isValid("testuser@ibm.com")); + } +}
\ No newline at end of file |