diff options
author | Michael Lando <ml636r@att.com> | 2017-02-19 10:28:42 +0200 |
---|---|---|
committer | Michael Lando <ml636r@att.com> | 2017-02-19 10:51:01 +0200 |
commit | 451a3400b76511393c62a444f588a4ed15f4a549 (patch) | |
tree | e4f5873a863d1d3e55618eab48b83262f874719d /distribution-ci/src/main/java/org/openecomp/test/CallableTask.java | |
parent | 5abfe4e1fb5fae4bbd5fbc340519f52075aff3ff (diff) |
Initial OpenECOMP SDC commit
Change-Id: I0924d5a6ae9cdc161ae17c68d3689a30d10f407b
Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'distribution-ci/src/main/java/org/openecomp/test/CallableTask.java')
-rw-r--r-- | distribution-ci/src/main/java/org/openecomp/test/CallableTask.java | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/distribution-ci/src/main/java/org/openecomp/test/CallableTask.java b/distribution-ci/src/main/java/org/openecomp/test/CallableTask.java new file mode 100644 index 0000000000..814fe9ae46 --- /dev/null +++ b/distribution-ci/src/main/java/org/openecomp/test/CallableTask.java @@ -0,0 +1,57 @@ +package org.openecomp.test; + +//import java.util.concurrent.Callable; +// +//import org.openecomp.sdc.api.IDistributionClient; +//import org.openecomp.sdc.api.results.IDistributionClientResult; +//import org.openecomp.sdc.impl.DistributionClientFactory; +//import org.openecomp.sdc.be.model.Service; +//import org.openecomp.sdc.ci.tests.datatypes.ServiceReqDetails; + +public class CallableTask { + +// NotificationCallback notifCallback = null; +// //private ServiceUtils serviceUtils; +// private Service service; +// +// //public CallableTask(ServiceUtils serviceUtils, Service service) { +// public CallableTask(Service service) { +// //this.serviceUtils = serviceUtils; +// this.service = service; +// } +// +// public NotificationCallback getNotifCallback() { +// return notifCallback; +// } +// +// @Override +// public Boolean call() throws Exception { +// +// IDistributionClient client = DistributionClientFactory.createDistributionClient(); +// +// notifCallback = new NotificationCallback(client); +// IDistributionClientResult result = client.init(new SimpleConfiguration(), notifCallback); +// +// System.out.println("result.getDistributionMessageResult: " + result.getDistributionMessageResult()); +// +// System.out.println("Starting client..."); +// IDistributionClientResult start = client.start(); +// System.out.println(start.getDistributionMessageResult()); +// +//// RestResponse changeStateToDISTRIBUTED = serviceUtils.changeStateToDISTRIBUTED(service, UserUtils.getGovernorDetails1()); +// ServiceReqDetails serviceDetails = new ServiceReqDetails(); +// serviceDetails.setUniqueId(service.getUniqueId()); +// //RestResponse changeStateToDISTRIBUTED = serviceUtils.changeDistributionStatus(serviceDetails, "1.0", UserUtils.getGovernorDetails1(), "change", DistributionStatusEnum.DISTRIBUTED); +// //assertTrue("response code is not 200, returned :" + changeStateToDISTRIBUTED.getErrorCode(), changeStateToDISTRIBUTED.getErrorCode() == 200); +// +// +//// while (simpleCallback.getSimpleCallbackResults().size()<3){ +// System.err.println("Sleeping..."); +// Thread.sleep(5000); +// System.err.println("Finished Sleeping..."); +//// } +// +// return true; +// } + +} |