aboutsummaryrefslogtreecommitdiffstats
path: root/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncUebClient.java
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2017-07-18 20:32:15 -0400
committerDan Timoney <dtimoney@att.com>2017-08-01 15:10:25 -0400
commitea5bf0a1c8a4e525d2cee03841b8e8f9b3563ed0 (patch)
tree5b85db0e570d86a2d3a7f5db5880196e45d8fe6f /ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncUebClient.java
parentb658ce359742d141428a068ba5ebff876ada3d0a (diff)
[CCSDK-6] Populate seed code
Add seed code for sli/northbound repository Update groupId to org.onap.ccsdk.sli.northbound Update to use CCSDK version of sli core Change-Id: Id3a154a53150a74f4b65060544e76f3e0cad932e Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncUebClient.java')
-rw-r--r--ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncUebClient.java65
1 files changed, 65 insertions, 0 deletions
diff --git a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncUebClient.java b/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncUebClient.java
new file mode 100644
index 00000000..df5dfc0a
--- /dev/null
+++ b/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncUebClient.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 ONAP 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.openecomp.sdnc.uebclient;
+
+import org.openecomp.sdc.api.IDistributionClient;
+import org.openecomp.sdc.api.results.IDistributionClientResult;
+import org.openecomp.sdc.impl.DistributionClientFactory;
+import org.openecomp.sdc.utils.DistributionActionResultEnum;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SdncUebClient {
+
+ private static final Logger LOG = LoggerFactory
+ .getLogger(SdncUebConfiguration.class);
+
+ public static void main(String[] args) {
+ IDistributionClient client = DistributionClientFactory
+ .createDistributionClient();
+
+ SdncUebConfiguration config = new SdncUebConfiguration();
+
+ SdncUebCallback cb = new SdncUebCallback(client, config);
+
+ LOG.info("Scanning for local distribution artifacts before starting client");
+ cb.deployDownloadedFiles(null, null, null);
+
+ LOG.info("Initializing ASDC distribution client");
+
+ IDistributionClientResult result = client.init(
+ config, cb);
+
+ LOG.info("Initialized ASDC distribution client - results = "
+ + result.getDistributionMessageResult());
+
+ if (result.getDistributionActionResult() == DistributionActionResultEnum.SUCCESS) {
+ LOG.info("Starting client...");
+ IDistributionClientResult start = client.start();
+ LOG.info("Client startup result = "
+ + start.getDistributionMessageResult());
+ }
+
+
+ }
+
+}