diff options
author | talasila <talasila@research.att.com> | 2017-02-08 10:13:29 -0500 |
---|---|---|
committer | talasila <talasila@research.att.com> | 2017-02-08 10:15:00 -0500 |
commit | f8a8d5192b1e5013d9e2f699be54b072ef39d5f0 (patch) | |
tree | b7a65bb0a7d70a9dc24c064113868e5f3b8e6a09 /dcae_dmaapbc_model/src/main | |
parent | 72a80fbff7120630576ccd5aa67c20818c2943c7 (diff) |
Initial OpenECOMP UI/DMaapBC commit
Change-Id: Ia492e1b88311b9bed4c31f593b28deaaad73b7e4
Signed-off-by: talasila <talasila@research.att.com>
Diffstat (limited to 'dcae_dmaapbc_model/src/main')
11 files changed, 1235 insertions, 0 deletions
diff --git a/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/DR_Node.java b/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/DR_Node.java new file mode 100644 index 0000000..87ad86e --- /dev/null +++ b/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/DR_Node.java @@ -0,0 +1,87 @@ +/*- + * ================================================================================ + * DCAE DMaaP Bus Controller Models + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * 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. + * ================================================================================ + */ +package org.openecomp.dcae.dmaapbc.model; + +/** + * Bean that models a DMaaP Data Router node. + */ +public class DR_Node extends DmaapObject { + + private String fqdn; + /** dcaeLocation where node VM is deployed */ + private String dcaeLocationName; + /** + * name for this VM (sometimes this is a local VM name and may be different + * than FQDN) + */ + private String hostName; + /** version of Node software package */ + private String version; + + public DR_Node() { + } + + public DR_Node(String lastMod, Dmaap_Status status, String fqdn, String dcaeLocationName, String hostName, + String version) { + super(lastMod, status); + this.fqdn = fqdn; + this.dcaeLocationName = dcaeLocationName; + this.hostName = hostName; + this.version = version; + } + + public String getFqdn() { + return fqdn; + } + + public void setFqdn(String fqdn) { + this.fqdn = fqdn; + } + + public String getDcaeLocationName() { + return dcaeLocationName; + } + + public void setDcaeLocationName(String dcaeLocationName) { + this.dcaeLocationName = dcaeLocationName; + } + + public String getHostName() { + return hostName; + } + + public void setHostName(String hostName) { + this.hostName = hostName; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + @Override + public String toString() { + return "DR_Node[fqdn=" + fqdn + ", dcaeLocationName=" + dcaeLocationName + ", ...]"; + } + +} diff --git a/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/DR_Pub.java b/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/DR_Pub.java new file mode 100644 index 0000000..fe0aeca --- /dev/null +++ b/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/DR_Pub.java @@ -0,0 +1,96 @@ +/*- + * ================================================================================ + * DCAE DMaaP Bus Controller Models + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * 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. + * ================================================================================ + */ +package org.openecomp.dcae.dmaapbc.model; + +/** + * Bean that models a DMaaP Data Router publisher. + */ +public class DR_Pub extends DmaapObject { + + /** dcaeLocation tag where this publisher is deployed */ + private String dcaeLocationName; + /** name used for basic authentication to DR */ + private String username; + /** password used for basic authentication to DR */ + private String userpwd; + /** tag of feed for which this publisher is a source */ + private String feedId; + /** unique id of a DCAE publisher (generated by Data Router PROV) */ + private String pubId; + + public DR_Pub() { + } + + public DR_Pub(Dmaap_Status status, String lastMod, String dcaeLocationName, String username, String userpwd, + String feedId, String pubId) { + super(lastMod, status); + this.dcaeLocationName = dcaeLocationName; + this.username = username; + this.userpwd = userpwd; + this.feedId = feedId; + this.pubId = pubId; + } + + public String getDcaeLocationName() { + return dcaeLocationName; + } + + public void setDcaeLocationName(String dcaeLocationName) { + this.dcaeLocationName = dcaeLocationName; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getUserpwd() { + return userpwd; + } + + public void setUserpwd(String userpwd) { + this.userpwd = userpwd; + } + + public String getFeedId() { + return feedId; + } + + public void setFeedId(String feedId) { + this.feedId = feedId; + } + + public String getPubId() { + return pubId; + } + + public void setPubId(String pubId) { + this.pubId = pubId; + } + + @Override + public String toString() { + return "DR_Pub[dcaeLocationName=" + dcaeLocationName + ", feedId=" + feedId + ", ...]"; + } + +} diff --git a/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/DR_Sub.java b/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/DR_Sub.java new file mode 100644 index 0000000..45adf9c --- /dev/null +++ b/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/DR_Sub.java @@ -0,0 +1,152 @@ +/*- + * ================================================================================ + * DCAE DMaaP Bus Controller Models + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * 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. + * ================================================================================ + */ +package org.openecomp.dcae.dmaapbc.model; + +/** + * Bean that models a DMaaP Data Router subscriber. + */ +public class DR_Sub extends DmaapObject { + + /** Tag where this publisher is deployed */ + private String dcaeLocationName; + /** name used for basic authentication from DR */ + private String username; + /** password used for basic authentication from DR */ + private String userpwd; + /** tag of feed for which this publisher is a source */ + private String feedId; + /** URL used by DR to deliver files to this subscriber */ + private String deliveryURL; + /** URL for accessing the transaction log for this susbcriber */ + private String logURL; + /** unique ID for a subscriber in this DR environment */ + private String subId; + /** TODO */ + private boolean suspended; + /** TODO */ + private boolean use100; + /** TODO */ + private String owner; + + public DR_Sub() { + } + + public DR_Sub(String lastMod, Dmaap_Status status, String dcaeLocationName, String username, String userpwd, + String feedId, String deliveryURL, String logURL, String subId, boolean suspended, boolean use100, + String owner) { + super(lastMod, status); + this.dcaeLocationName = dcaeLocationName; + this.username = username; + this.userpwd = userpwd; + this.feedId = feedId; + this.deliveryURL = deliveryURL; + this.logURL = logURL; + this.subId = subId; + this.suspended = suspended; + this.use100 = use100; + this.owner = owner; + } + + public String getDcaeLocationName() { + return dcaeLocationName; + } + + public void setDcaeLocationName(String dcaeLocationName) { + this.dcaeLocationName = dcaeLocationName; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getUserpwd() { + return userpwd; + } + + public void setUserpwd(String userpwd) { + this.userpwd = userpwd; + } + + public String getFeedId() { + return feedId; + } + + public void setFeedId(String feedId) { + this.feedId = feedId; + } + + public String getDeliveryURL() { + return deliveryURL; + } + + public void setDeliveryURL(String deliveryURL) { + this.deliveryURL = deliveryURL; + } + + public String getLogURL() { + return logURL; + } + + public void setLogURL(String logURL) { + this.logURL = logURL; + } + + public String getSubId() { + return subId; + } + + public void setSubId(String subId) { + this.subId = subId; + } + + public String getOwner() { + return owner; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + public boolean isSuspended() { + return suspended; + } + + public void setSuspended(boolean suspended) { + this.suspended = suspended; + } + + public boolean isUse100() { + return use100; + } + + public void setUse100(boolean use100) { + this.use100 = use100; + } + + @Override + public String toString() { + return "DR_Sub[dcaeLocationName=" + dcaeLocationName + ", feedId=" + feedId + ", ...]"; + } + +} diff --git a/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/DcaeLocation.java b/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/DcaeLocation.java new file mode 100644 index 0000000..3e072e9 --- /dev/null +++ b/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/DcaeLocation.java @@ -0,0 +1,97 @@ +/*- + * ================================================================================ + * DCAE DMaaP Bus Controller Models + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * 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. + * ================================================================================ + */ +package org.openecomp.dcae.dmaapbc.model; + +/** + * Bean that models a DMaaP DCAE location. + */ +public class DcaeLocation extends DmaapObject { + + public enum Dcae_Status { + EMPTY, NEW, STAGED, VALID, INVALID + } + + /** + * AT&T network location code used to identify the location. (might there be more + * than one location per clli?) + */ + private String clli; + /** + * indicator of DCAE layer. Either opendcae-central or opendcae-local-ntc + */ + private String dcaeLayer; + /** + * unique name of this dcaeLocation. Value should match what DCAE Controller + * uses. + */ + private String dcaeLocationName; + /** determines “where,� within the OpenStack deployment, the edge exists */ + private String openStackAvailabilityZone; + + public DcaeLocation() { + } + + public DcaeLocation(String lastMod, Dmaap_Status status, String clli, String dcaeLayer, String dcaeLocationName, + String openStackAvailabilityZone) { + super(lastMod, status); + this.clli = clli; + this.dcaeLayer = dcaeLayer; + this.dcaeLocationName = dcaeLocationName; + this.openStackAvailabilityZone = openStackAvailabilityZone; + } + + public String getClli() { + return clli; + } + + public void setClli(String clli) { + this.clli = clli; + } + + public String getDcaeLayer() { + return dcaeLayer; + } + + public void setDcaeLayer(String dcaeLayer) { + this.dcaeLayer = dcaeLayer; + } + + public String getDcaeLocationName() { + return dcaeLocationName; + } + + public void setDcaeLocationName(String dcaeLocationName) { + this.dcaeLocationName = dcaeLocationName; + } + + public String getOpenStackAvailabilityZone() { + return openStackAvailabilityZone; + } + + public void setOpenStackAvailabilityZone(String openStackAvailabilityZone) { + this.openStackAvailabilityZone = openStackAvailabilityZone; + } + + @Override + public String toString() { + return "DcaeLocation[dcaeLocationName=" + dcaeLocationName + ", dcaeLayer=" + dcaeLayer + ", ...]"; + } + +} diff --git a/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/Dmaap.java b/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/Dmaap.java new file mode 100644 index 0000000..a644e2f --- /dev/null +++ b/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/Dmaap.java @@ -0,0 +1,141 @@ +/*- + * ================================================================================ + * DCAE DMaaP Bus Controller Models + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * 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. + * ================================================================================ + */ +package org.openecomp.dcae.dmaapbc.model; + +/** + * Bean that models a DMaaP instance. + */ +public class Dmaap extends DmaapObject { + + /** the version of DMaaP BC software */ + private String version; + /** the root portion of the topic namespace */ + private String topicNsRoot; + /** + * a unique identifier for this instance. e.g. 1607.somersetLab or 1607.FTL + */ + private String dmaapName; + /** URL for DR Provisioning Server */ + private String drProvUrl; + /** + * topic name used by MR Bridge Admin to communicate which topics to + * replicate + */ + private String bridgeAdminTopic; + /** used by DCAE Controller to upload event logs */ + private String loggingUrl; + /** used by DCAE Controller to authenticate inter-node messages */ + private String nodeKey; + /** used by DCAE Controller to set up ssh access to VMs */ + private String accessKeyOwner; + + public Dmaap() { + } + + public Dmaap(String lastMod, Dmaap_Status status, String version, String topicNsRoot, String dmaapName, + String drProvUrl, String loggingUrl, String nodeKey, String accessKeyOwner) { + super(lastMod, status); + this.version = version; + this.topicNsRoot = topicNsRoot; + this.dmaapName = dmaapName; + this.drProvUrl = drProvUrl; + this.loggingUrl = loggingUrl; + this.nodeKey = nodeKey; + this.accessKeyOwner = accessKeyOwner; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getTopicNsRoot() { + return topicNsRoot; + } + + public void setTopicNsRoot(String topicNsRoot) { + this.topicNsRoot = topicNsRoot; + } + + public String getDmaapName() { + return dmaapName; + } + + public void setDmaapName(String dmaapName) { + this.dmaapName = dmaapName; + } + + public String getDrProvUrl() { + return drProvUrl; + } + + public void setDrProvUrl(String drProvUrl) { + this.drProvUrl = drProvUrl; + } + + public String getLogginUrl() { + return loggingUrl; + } + + public void setLogginUrl(String logginUrl) { + this.loggingUrl = logginUrl; + } + + public String getNodeKey() { + return nodeKey; + } + + public void setNodeKey(String nodeKey) { + this.nodeKey = nodeKey; + } + + public String getAccessKeyOwner() { + return accessKeyOwner; + } + + public void setAccessKeyOwner(String accessKeyOwner) { + this.accessKeyOwner = accessKeyOwner; + } + + public String getLoggingUrl() { + return loggingUrl; + } + + public void setLoggingUrl(String loggingUrl) { + this.loggingUrl = loggingUrl; + } + + public String getBridgeAdminTopic() { + return bridgeAdminTopic; + } + + public void setBridgeAdminTopic(String bridgeAdminTopic) { + this.bridgeAdminTopic = bridgeAdminTopic; + } + + @Override + public String toString() { + return "Dmaap[dmaapName=" + dmaapName + ", version=" + version + ", ...]"; + } + +} diff --git a/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/DmaapObject.java b/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/DmaapObject.java new file mode 100644 index 0000000..fc66281 --- /dev/null +++ b/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/DmaapObject.java @@ -0,0 +1,70 @@ +/*- + * ================================================================================ + * DCAE DMaaP Bus Controller Models + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * 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. + * ================================================================================ + */ +package org.openecomp.dcae.dmaapbc.model; + +/** + * Parent class for all DMaaP BC models. + */ +public abstract class DmaapObject { + + public enum Dmaap_Status { + EMPTY, NEW, STAGED, VALID, INVALID //, DELETED + } + + /** time stamp when object was last modified */ + private String lastMod; + /** indicator of health of this object using values common in this API */ + private Dmaap_Status status; + /** TODO */ + private String type; + + public DmaapObject() { + } + + public DmaapObject(String lastMod, Dmaap_Status status) { + this.lastMod = lastMod; + this.status = status; + } + + public String getLastMod() { + return lastMod; + } + + public void setLastMod(String lastMod) { + this.lastMod = lastMod; + } + + public Dmaap_Status getStatus() { + return status; + } + + public void setStatus(Dmaap_Status status) { + this.status = status; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + +} diff --git a/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/ErrorResponse.java b/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/ErrorResponse.java new file mode 100644 index 0000000..2cdb182 --- /dev/null +++ b/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/ErrorResponse.java @@ -0,0 +1,65 @@ +/*- + * ================================================================================ + * DCAE DMaaP Bus Controller Models + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * 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. + * ================================================================================ + */ +package org.openecomp.dcae.dmaapbc.model; + +/** + * Bean that models a DMaaP Bus Controller error response. + * + * This inherits some fields (e.g., lastMod and status) that are not used. + */ +public class ErrorResponse extends DmaapObject { + + private Integer code; + private String message; + private String fields; + + public ErrorResponse() { + } + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public String getFields() { + return fields; + } + + public void setFields(String fields) { + this.fields = fields; + } + + @Override + public String toString() { + return "ErrorResponse[code=" + code + ", message=" + message + ", fields=" + fields + "]"; + } + +} diff --git a/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/Feed.java b/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/Feed.java new file mode 100644 index 0000000..f56aa54 --- /dev/null +++ b/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/Feed.java @@ -0,0 +1,193 @@ +/*- + * ================================================================================ + * DCAE DMaaP Bus Controller Models + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * 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. + * ================================================================================ + */ +package org.openecomp.dcae.dmaapbc.model; + +import java.util.ArrayList; +import java.util.List; + +/** + * Bean that models a DMaaP Data Router feed. + */ +public class Feed extends DmaapObject { + + public enum Feed_Status { + EMPTY, NEW, STAGED, VALID, INVALID, DELETED + } + + /** unique id assigned by the DR PROV server for this feed */ + private String feedId; + /** name of feed. Combined with feedVersion must be unique */ + private String feedName; + /** version of feed. Combined with feedName must be unique */ + private String feedVersion; + /** description */ + private String feedDescription; + /** ASPR classification */ + private String asprClassification; + /** provisioning URL for adding subscribers to this feed */ + private String subscribeURL; + /** URL publisher use to connect to DR */ + private String publishURL; + /** URL for transaction log for this feed */ + private String logURL; + /** indicator of whether the feed is suspended */ + private boolean suspended; + /** what identity owns this feed */ + private String owner; + /** id of format description of feed content */ + private String formatUuid; + /** a set of publishers for this feed */ + private List<DR_Pub> pubs; + /** a set of subscribers for this feed */ + private List<DR_Sub> subs; + + public Feed() { + this.pubs = new ArrayList<DR_Pub>(); + this.subs = new ArrayList<DR_Sub>(); + } + + public Feed(Dmaap_Status status, String lastMod, String feedName, String feedVersion, String feedDescription, + String asprClassification, String subscribeURL, String publishURL, String logURL, boolean suspended, + String owner, String formatUuid) { + super(lastMod, status); + this.feedName = feedName; + this.feedVersion = feedVersion; + this.feedDescription = feedDescription; + this.asprClassification = asprClassification; + this.subscribeURL = subscribeURL; + this.publishURL = publishURL; + this.logURL = logURL; + this.suspended = suspended; + this.owner = owner; + this.formatUuid = formatUuid; + this.pubs = new ArrayList<DR_Pub>(); + this.subs = new ArrayList<DR_Sub>(); + } + + public String getFeedId() { + return feedId; + } + + public void setFeedId(String feedId) { + this.feedId = feedId; + } + + public String getFeedName() { + return feedName; + } + + public void setFeedName(String feedName) { + this.feedName = feedName; + } + + public String getFeedVersion() { + return feedVersion; + } + + public void setFeedVersion(String feedVersion) { + this.feedVersion = feedVersion; + } + + public String getFeedDescription() { + return feedDescription; + } + + public void setFeedDescription(String feedDescription) { + this.feedDescription = feedDescription; + } + + public String getOwner() { + return owner; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + public String getAsprClassification() { + return asprClassification; + } + + public void setAsprClassification(String asprClassification) { + this.asprClassification = asprClassification; + } + + public String getSubscribeURL() { + return subscribeURL; + } + + public void setSubscribeURL(String subscribeURL) { + this.subscribeURL = subscribeURL; + } + + public String getPublishURL() { + return publishURL; + } + + public void setPublishURL(String publishURL) { + this.publishURL = publishURL; + } + + public String getLogURL() { + return logURL; + } + + public void setLogURL(String logURL) { + this.logURL = logURL; + } + + public boolean isSuspended() { + return suspended; + } + + public void setSuspended(boolean suspended) { + this.suspended = suspended; + } + + public String getFormatUuid() { + return formatUuid; + } + + public void setFormatUuid(String formatUuid) { + this.formatUuid = formatUuid; + } + + public List<DR_Pub> getPubs() { + return pubs; + } + + public void setPubs(List<DR_Pub> pubs) { + this.pubs = pubs; + } + + public List<DR_Sub> getSubs() { + return subs; + } + + public void setSubs(List<DR_Sub> subs) { + this.subs = subs; + } + + @Override + public String toString() { + return "Feed[feedId=" + feedId + ", feedName=" + feedName + ", feedVersion=" + feedVersion + ", ...]"; + } + +} diff --git a/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/MR_Client.java b/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/MR_Client.java new file mode 100644 index 0000000..a1abc70 --- /dev/null +++ b/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/MR_Client.java @@ -0,0 +1,110 @@ +/*- + * ================================================================================ + * DCAE DMaaP Bus Controller Models + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * 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. + * ================================================================================ + */ +package org.openecomp.dcae.dmaapbc.model; + +/** + * Bean that models a DMaaP Message Router client. + */ +public class MR_Client extends DmaapObject { + + /** dcaeLocation tag where this client is deployed */ + private String dcaeLocationName; + /** fully qualified topic name */ + private String fqtn; + /** + * name of role of client which will be + * granted the AAF permission associated with any action + */ + private String clientRole; + /** an array of actions. Current possibilities are view, pub, sub */ + private String[] action; + /** unique handle for this client, generated by DMaaP Bus Controller */ + private String mrClientId; + /** TODO */ + private String topicURL; + + public MR_Client() { + } + + public MR_Client(String lastMod, Dmaap_Status status, String dcaeLocationName, String fqtn, String clientRole, + String[] action, String mrClientId, String topicURL) { + super(lastMod, status); + this.dcaeLocationName = dcaeLocationName; + this.fqtn = fqtn; + this.clientRole = clientRole; + this.action = action; + this.mrClientId = mrClientId; + this.topicURL = topicURL; + } + + public String getDcaeLocationName() { + return dcaeLocationName; + } + + public void setDcaeLocationName(String dcaeLocationName) { + this.dcaeLocationName = dcaeLocationName; + } + + public String getFqtn() { + return fqtn; + } + + public void setFqtn(String fqtn) { + this.fqtn = fqtn; + } + + public String getClientRole() { + return clientRole; + } + + public void setClientRole(String clientRole) { + this.clientRole = clientRole; + } + + public String[] getAction() { + return action; + } + + public void setAction(String[] action) { + this.action = action; + } + + public String getMrClientId() { + return mrClientId; + } + + public void setMrClientId(String mrClientId) { + this.mrClientId = mrClientId; + } + + public String getTopicURL() { + return topicURL; + } + + public void setTopicURL(String topicURL) { + this.topicURL = topicURL; + } + + @Override + public String toString() { + return "MR_Client[dcaeLocationName=" + dcaeLocationName + ", fqtn=" + fqtn + ", ...]"; + } + +} diff --git a/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/MR_Cluster.java b/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/MR_Cluster.java new file mode 100644 index 0000000..21d87cf --- /dev/null +++ b/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/MR_Cluster.java @@ -0,0 +1,102 @@ +/*- + * ================================================================================ + * DCAE DMaaP Bus Controller Models + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * 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. + * ================================================================================ + */ +package org.openecomp.dcae.dmaapbc.model; + +import java.util.List; + +/** + * Bean that models a DMaaP Message Router cluster. + */ +public class MR_Cluster extends DmaapObject { + + /** dcaeLocation where cluster VMs are deployed */ + private String dcaeLocationName; + /** DNS name used by MR clients for this cluster */ + private String fqdn; + /** an array of hosts that are part of the MR Cluster. */ + private List<String> hosts; + /** TODO */ + private String topicPort; + /** TODO */ + private String topicProtocol; + + public MR_Cluster() { + } + + /** + * @param dcaeLocationName + * @param fqdn + * @param hosts + */ + public MR_Cluster(Dmaap_Status status, String lastMod, String dcaeLocationName, String fqdn, + final String[] hosts) { + super(lastMod, status); + this.dcaeLocationName = dcaeLocationName; + this.fqdn = fqdn; + for (String h : hosts) + this.hosts.add(h); + } + + public String getDcaeLocationName() { + return dcaeLocationName; + } + + public void setDcaeLocationName(String dcaeLocationName) { + this.dcaeLocationName = dcaeLocationName; + } + + public String getFqdn() { + return fqdn; + } + + public void setFqdn(String fqdn) { + this.fqdn = fqdn; + } + + public List<String> getHosts() { + return hosts; + } + + public void setHosts(List<String> hosts) { + this.hosts = hosts; + } + + public String getTopicPort() { + return topicPort; + } + + public void setTopicPort(String topicPort) { + this.topicPort = topicPort; + } + + public String getTopicProtocol() { + return topicProtocol; + } + + public void setTopicProtocol(String topicProtocol) { + this.topicProtocol = topicProtocol; + } + + @Override + public String toString() { + return "MR_Cluster[dcaeLocationName=" + dcaeLocationName + ", fqdn=" + fqdn + ", ...]"; + } + +} diff --git a/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/Topic.java b/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/Topic.java new file mode 100644 index 0000000..b76a34b --- /dev/null +++ b/dcae_dmaapbc_model/src/main/java/org/openecomp/dcae/dmaapbc/model/Topic.java @@ -0,0 +1,122 @@ +/*- + * ================================================================================ + * DCAE DMaaP Bus Controller Models + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * 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. + * ================================================================================ + */ +package org.openecomp.dcae.dmaapbc.model; + +import java.util.ArrayList; +import java.util.List; + +/** + * Bean that models a DMaaP Message Router topic. + */ +public class Topic extends DmaapObject { + + /** fully qualified topic name (topic_ns_root.environment.topic_name) */ + private String fqtn; + /** application supplied value for topicName */ + private String topicName; + /** description of topic */ + private String topicDescription; + /** what identity owns this topic */ + private String owner; + /** flag to MR indicating whether transactions are enabled for this topic */ + private String tnxEnabled; + /** id of format description of feed content */ + private String formatUuid; + /** a set of publishers and subscribers for this topic */ + private List<MR_Client> clients; + + public Topic() { + this.clients = new ArrayList<MR_Client>(); + } + + public Topic(String lastMod, Dmaap_Status status, String fqtn, String topicName, String topicDescription, + String owner, String tnxEnabled, String formatUuid) { + super(lastMod, status); + this.fqtn = fqtn; + this.topicName = topicName; + this.topicDescription = topicDescription; + this.owner = owner; + this.tnxEnabled = tnxEnabled; + this.formatUuid = formatUuid; + this.clients = new ArrayList<MR_Client>(); + } + + public String getFqtn() { + return fqtn; + } + + public void setFqtn(String fqtn) { + this.fqtn = fqtn; + } + + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public String getTopicDescription() { + return topicDescription; + } + + public void setTopicDescription(String topicDescription) { + this.topicDescription = topicDescription; + } + + public String getTnxEnabled() { + return tnxEnabled; + } + + public void setTnxEnabled(String tnxEnabled) { + this.tnxEnabled = tnxEnabled; + } + + public String getOwner() { + return owner; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + public String getFormatUuid() { + return formatUuid; + } + + public void setFormatUuid(String formatUuid) { + this.formatUuid = formatUuid; + } + + public List<MR_Client> getClients() { + return clients; + } + + public void setClients(List<MR_Client> clients) { + this.clients = clients; + } + + @Override + public String toString() { + return "Topic[fqtn=" + fqtn + ", topicName=" + topicName + ", ...]"; + } + +} |