aboutsummaryrefslogtreecommitdiffstats
path: root/distribution-ci/src/main/java/org/openecomp/test/ClientTest.java
blob: 1a10860828608202987c8a6d35c7210b7c258f95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package org.openecomp.test;

import org.slf4j.LoggerFactory;

import org.openecomp.sdc.api.IDistributionClient;
import org.openecomp.sdc.api.results.IDistributionClientResult;
import org.openecomp.sdc.impl.DistributionClientFactory;

import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.LoggerContext;

public class ClientTest {
	public static void main(String[] args) throws InterruptedException {

		LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
		lc.getLogger("org.apache.http").setLevel(Level.INFO);

		IDistributionClient client = DistributionClientFactory.createDistributionClient();

		IDistributionClientResult result = client.init(new SimpleConfiguration(), new NotificationCallback(client));
		System.out.println(result.getDistributionMessageResult());

		System.out.println("Starting client...");
		IDistributionClientResult startResult = client.start();

		// Thread.sleep(10000);
		// client.stop();

		System.out.println(startResult.getDistributionMessageResult());

	}

}