diff options
author | Tony Hansen <tony@att.com> | 2019-02-27 00:25:14 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-02-27 00:25:14 +0000 |
commit | b1fee35cd69ff8019c9deb38b482f24aa20a2ddd (patch) | |
tree | 4227cdb343b2ab6b67e706b8c756064b258d555e /src/main | |
parent | 791165faf645ae4d149c0f9493b4e28bab44355f (diff) | |
parent | 3d029128ac97bd581ce96814c897e0e3419a6a6c (diff) |
Merge "Update configuration"
Diffstat (limited to 'src/main')
3 files changed, 44 insertions, 10 deletions
diff --git a/src/main/java/org/onap/dcaegen2/services/pmmapper/datarouter/DataRouterSubscriber.java b/src/main/java/org/onap/dcaegen2/services/pmmapper/datarouter/DataRouterSubscriber.java index 40efde5..4dcad3e 100644 --- a/src/main/java/org/onap/dcaegen2/services/pmmapper/datarouter/DataRouterSubscriber.java +++ b/src/main/java/org/onap/dcaegen2/services/pmmapper/datarouter/DataRouterSubscriber.java @@ -124,7 +124,7 @@ public class DataRouterSubscriber implements HttpHandler { 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()); diff --git a/src/main/java/org/onap/dcaegen2/services/pmmapper/model/EnvironmentConfig.java b/src/main/java/org/onap/dcaegen2/services/pmmapper/model/EnvironmentConfig.java index fe48bfc..e2c1c6e 100644 --- a/src/main/java/org/onap/dcaegen2/services/pmmapper/model/EnvironmentConfig.java +++ b/src/main/java/org/onap/dcaegen2/services/pmmapper/model/EnvironmentConfig.java @@ -31,13 +31,13 @@ public class EnvironmentConfig { public static final String ENV_SERVICE_NAME_KEY = "HOSTNAME";
public static String getServiceName() throws EnvironmentConfigException {
- return Optional.ofNullable(System.getenv("HOSTNAME"))
+ return Optional.ofNullable(System.getenv(ENV_SERVICE_NAME_KEY))
.orElseThrow(() -> new EnvironmentConfigException(
ENV_SERVICE_NAME_KEY+ " environment variable must be defined prior to pm-mapper initialization."));
}
public static String getCBSHostName() throws EnvironmentConfigException {
- return Optional.ofNullable(System.getenv("CONFIG_BINDING_SERVICE_SERVICE_HOST"))
+ return Optional.ofNullable(System.getenv(ENV_CBS_HOST_KEY))
.orElseThrow(() -> new EnvironmentConfigException(
ENV_CBS_HOST_KEY+ " environment variable must be defined prior to pm-mapper initialization."));
}
@@ -45,12 +45,11 @@ public class EnvironmentConfig { public static Integer getCBSPort() throws EnvironmentConfigException {
Integer port = DEFAULT_CBS_PORT;
try {
- port = Optional.ofNullable(System.getenv("CONFIG_BINDING_SERVICE_SERVICE_PORT"))
+ port = Optional.ofNullable(System.getenv(ENV_CBS_PORT_KEY))
.map(Integer::valueOf).orElse(DEFAULT_CBS_PORT);
} catch (NumberFormatException e) {
throw new EnvironmentConfigException(ENV_CBS_PORT_KEY + " must be valid: " + port);
}
return port;
-
}
}
diff --git a/src/main/java/org/onap/dcaegen2/services/pmmapper/model/MapperConfig.java b/src/main/java/org/onap/dcaegen2/services/pmmapper/model/MapperConfig.java index 1753c2c..40327db 100644 --- a/src/main/java/org/onap/dcaegen2/services/pmmapper/model/MapperConfig.java +++ b/src/main/java/org/onap/dcaegen2/services/pmmapper/model/MapperConfig.java @@ -42,12 +42,21 @@ public class MapperConfig { private StreamsSubscribes streamsSubscribes;
@GSONRequired
+ @Getter(AccessLevel.PRIVATE)
+ @SerializedName("streams_publishes")
+ private StreamsPublishes streamsPublishes;
+
+ @GSONRequired
@SerializedName("buscontroller_feed_subscription_endpoint")
private String busControllerSubscriptionEndpoint;
@GSONRequired
- @SerializedName("buscontroller_feed_id")
- private String busControllerFeedId;
+ @SerializedName("dmaap_dr_feed_id")
+ private String dmaapDRFeedId;
+
+ @GSONRequired
+ @SerializedName("dmaap_dr_delete_endpoint")
+ private String dmaapDRDeleteEndpoint;
public String getBusControllerDeliveryUrl() {
return this.getStreamsSubscribes().getDmaapSubscriber().getDmaapInfo().getDeliveryUrl();
@@ -87,8 +96,23 @@ public class MapperConfig { @Getter
@EqualsAndHashCode
- class DmaapInfo {
+ private class StreamsPublishes {
+ @GSONRequired
+ @SerializedName("dmaap_publisher")
+ DmaapPublisher dmaapPublisher;
+ }
+
+ @Getter
+ @EqualsAndHashCode
+ class DmaapPublisher {
@GSONRequired
+ @SerializedName("dmaap_info")
+ DmaapInfo dmaapInfo;
+ }
+
+ @Getter
+ @EqualsAndHashCode
+ class DmaapInfo {
private String location;
private String username;
private String password;
@@ -98,9 +122,20 @@ public class MapperConfig { @SerializedName("subscriber_id")
private String subscriberId;
- }
-}
+ @SerializedName("aaf_username")
+ private String aafUsername;
+ @SerializedName("aaf_password")
+ private String aafPassword;
+ @SerializedName("client_role")
+ private String clientRole;
+ @SerializedName("client_id")
+ private String clientId;
+
+ @SerializedName("topic_url")
+ private String topicUrl;
+ }
+}
\ No newline at end of file |