JsonObject subscriberObj = new JsonObject();
subscriberObj.addProperty("dcaeLocationName", config.getDcaeLocation());
subscriberObj.addProperty("deliveryURL", config.getBusControllerDeliveryUrl());
- subscriberObj.addProperty("feedId", config.getBusControllerFeedId());
+ subscriberObj.addProperty("feedId", config.getDmaapDRFeedId());
subscriberObj.addProperty("lastMod", Instant.now().toString());
subscriberObj.addProperty("username", config.getBusControllerUserName());
subscriberObj.addProperty("userpwd", config.getBusControllerPassword());
public static final String ENV_SERVICE_NAME_KEY = "HOSTNAME";\r
\r
public static String getServiceName() throws EnvironmentConfigException {\r
- return Optional.ofNullable(System.getenv("HOSTNAME"))\r
+ return Optional.ofNullable(System.getenv(ENV_SERVICE_NAME_KEY))\r
.orElseThrow(() -> new EnvironmentConfigException(\r
ENV_SERVICE_NAME_KEY+ " environment variable must be defined prior to pm-mapper initialization."));\r
}\r
\r
public static String getCBSHostName() throws EnvironmentConfigException {\r
- return Optional.ofNullable(System.getenv("CONFIG_BINDING_SERVICE_SERVICE_HOST"))\r
+ return Optional.ofNullable(System.getenv(ENV_CBS_HOST_KEY))\r
.orElseThrow(() -> new EnvironmentConfigException(\r
ENV_CBS_HOST_KEY+ " environment variable must be defined prior to pm-mapper initialization."));\r
}\r
public static Integer getCBSPort() throws EnvironmentConfigException {\r
Integer port = DEFAULT_CBS_PORT;\r
try {\r
- port = Optional.ofNullable(System.getenv("CONFIG_BINDING_SERVICE_SERVICE_PORT"))\r
+ port = Optional.ofNullable(System.getenv(ENV_CBS_PORT_KEY))\r
.map(Integer::valueOf).orElse(DEFAULT_CBS_PORT);\r
} catch (NumberFormatException e) {\r
throw new EnvironmentConfigException(ENV_CBS_PORT_KEY + " must be valid: " + port);\r
}\r
return port;\r
-\r
}\r
}\r
@SerializedName("streams_subscribes")\r
private StreamsSubscribes streamsSubscribes;\r
\r
+ @GSONRequired\r
+ @Getter(AccessLevel.PRIVATE)\r
+ @SerializedName("streams_publishes")\r
+ private StreamsPublishes streamsPublishes;\r
+\r
@GSONRequired\r
@SerializedName("buscontroller_feed_subscription_endpoint")\r
private String busControllerSubscriptionEndpoint;\r
\r
@GSONRequired\r
- @SerializedName("buscontroller_feed_id")\r
- private String busControllerFeedId;\r
+ @SerializedName("dmaap_dr_feed_id")\r
+ private String dmaapDRFeedId;\r
+\r
+ @GSONRequired\r
+ @SerializedName("dmaap_dr_delete_endpoint")\r
+ private String dmaapDRDeleteEndpoint;\r
\r
public String getBusControllerDeliveryUrl() {\r
return this.getStreamsSubscribes().getDmaapSubscriber().getDmaapInfo().getDeliveryUrl();\r
\r
@Getter\r
@EqualsAndHashCode\r
- class DmaapInfo {\r
+ private class StreamsPublishes {\r
+ @GSONRequired\r
+ @SerializedName("dmaap_publisher")\r
+ DmaapPublisher dmaapPublisher;\r
+ }\r
+\r
+ @Getter\r
+ @EqualsAndHashCode\r
+ class DmaapPublisher {\r
@GSONRequired\r
+ @SerializedName("dmaap_info")\r
+ DmaapInfo dmaapInfo;\r
+ }\r
+\r
+ @Getter\r
+ @EqualsAndHashCode\r
+ class DmaapInfo {\r
private String location;\r
private String username;\r
private String password;\r
\r
@SerializedName("subscriber_id")\r
private String subscriberId;\r
- }\r
-}\r
\r
+ @SerializedName("aaf_username")\r
+ private String aafUsername;\r
\r
+ @SerializedName("aaf_password")\r
+ private String aafPassword;\r
\r
+ @SerializedName("client_role")\r
+ private String clientRole;\r
\r
+ @SerializedName("client_id")\r
+ private String clientId;\r
+\r
+ @SerializedName("topic_url")\r
+ private String topicUrl;\r
+ }\r
+}
\ No newline at end of file
{\r
"pm-mapper-filter": "{ \"filters\":[]}",\r
- "3GPP.schema.file": "{\"3GPP_Schema\":\"./etc/3GPP_relaxed_schema.xsd\"}",\r
"streams_subscribes": {\r
"dmaap_subscriber": {\r
"type": "data_router",\r
"delivery_url": "delivery_url",\r
"username": "username",\r
"password": "password",\r
- "subscriber_id": "subsriber_id"\r
+ "subscriber_id": "subscriber_id"\r
}\r
}\r
},\r
"streams_publishes": {\r
- "pm_mapper_handle_out": {\r
+ "dmaap_publisher": {\r
"type": "message_router",\r
"aaf_password": null,\r
"dmaap_info": {\r
- "topic_url": "https://we-are-message-router.us:3905/events/some-topic",\r
+ "topic_url": "https://message-router.onap.svc.cluster.local:3904/events/some-topic",\r
"client_role": null,\r
"location": null,\r
"client_id": null\r
"aaf_username": null\r
}\r
},\r
- "buscontroller_feed_id": "2",\r
+ "dmaap_dr_feed_id": "2",\r
"buscontroller_feed_subscription_endpoint": "http://dmaap-bc.onap.svc.cluster.local:8080/webapi/dr_subs",\r
+ "dmaap_dr_delete_endpoint": "http://dmaap-dr-node.onap.svc.cluster.local:8443/delete",\r
"services_calls": {}\r
}
\ No newline at end of file