2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
20 package org.openecomp.sdc.be.config;
22 import lombok.AllArgsConstructor;
25 import lombok.ToString;
26 import org.openecomp.sdc.common.api.BasicConfiguration;
27 import org.openecomp.sdc.common.http.config.ExternalServiceConfig;
29 import java.util.ArrayList;
30 import java.util.HashSet;
31 import java.util.List;
37 public class DistributionEngineConfiguration extends BasicConfiguration {
39 private List<String> uebServers;
40 private String distributionNotifTopicName;
41 private String distributionStatusTopicName;
42 private String kafkaBootStrapServers;
43 private Integer initRetryIntervalSec;
44 private Integer initMaxIntervalSec;
45 private ComponentArtifactTypesConfig distribNotifServiceArtifactTypes;
46 private ComponentArtifactTypesConfig distribNotifResourceArtifactTypes;
47 private String uebPublicKey;
48 private String uebSecretKey;
49 private List<String> environments;
50 private DistributionStatusTopicConfig distributionStatusTopic;
51 private CreateTopicConfig createTopic;
52 private boolean startDistributionEngine;
53 private DistributionNotificationTopicConfig distributionNotificationTopic;
54 private Integer defaultArtifactInstallationTimeout = 60;
55 private Integer currentArtifactInstallationTimeout = 120;
56 private boolean useHttpsWithDmaap;
57 private ExternalServiceConfig aaiConfig;
58 private ExternalServiceConfig msoConfig;
59 private Integer opEnvRecoveryIntervalSec;
60 private Integer allowedTimeBeforeStaleSec;
62 public void setEnvironments(List<String> environments) {
63 Set<String> set = new HashSet<>();
64 if (environments != null) {
65 set.addAll(environments);
66 this.environments = new ArrayList<>(set);
68 this.environments = null;
74 public enum ArtifcatTypeEnum {
75 MURANO_PKG("MURANO-PKG"),
78 private final String value;
84 public static class DistribNotifServiceArtifacts {
86 private Map<String, Object> service;
87 private Map<String, Object> resource;
93 public static class NotifArtifactTypes {
95 private List<String> info;
96 private List<String> lifecycle;
102 public static class NotifArtifactTypesResource {
104 private List<ArtifcatTypeEnum> lifecycle;
110 public static class CreateTopicConfig {
112 private Integer partitionCount;
113 private Integer replicationCount;
120 public static class EnvironmentConfig {
123 private List<String> uebServers;
130 public static class DistributionStatusTopicConfig {
132 private Integer pollingIntervalSec;
133 private Integer fetchTimeSec;
134 private String consumerGroup;
135 private String consumerId;
142 public static class DistributionNotificationTopicConfig {
144 private Integer maxWaitingAfterSendingSeconds;
145 private Integer maxThreadPoolSize;
146 private Integer minThreadPoolSize;
153 public static class ComponentArtifactTypesConfig {
155 private List<String> info;
156 private List<String> lifecycle;