Commit 842ff7bc authored by Spiros Koulouzis's avatar Spiros Koulouzis

playbook is executed but we have a null exception in the response

parent cb60db51
......@@ -106,17 +106,18 @@ public class DeployService {
return deployDao.save(clusterCred);
}
public DeployResponse deployCluster(DeployRequest deployInfo) {
public DeployResponse deploySoftware(DeployRequest deployInfo) {
try (DRIPCaller deployer = new DeployerCaller(messageBrokerHost);) {
Message deployerInvokationMessage = buildDeployerMessage(
deployInfo.getProvisionID(),
deployInfo.getManagerType().toLowerCase(),
deployInfo.getConfigurationID());
// Message deployerInvokationMessage = MessageGenerator.generateArtificialMessage(System.getProperty("user.home")
// + File.separator + "workspace" + File.separator + "DRIP"
// + File.separator + "docs" + File.separator + "json_samples"
// + File.separator + "deployer_invocation.json");
Message deployerInvokationMessage = MessageGenerator.generateArtificialMessage(System.getProperty("user.home")
+ File.separator + "workspace" + File.separator + "DRIP"
+ File.separator + "docs" + File.separator + "json_samples"
+ File.separator + "deployer_invocation.json");
Message response = (deployer.call(deployerInvokationMessage));
// Message response = generateFakeResponse();
List<MessageParameter> params = response.getParameters();
......
......@@ -73,7 +73,7 @@ public class DeployController0 {
private Result deploy(DeployRequest deployReq) {
DeployResponse key = deployService.deployCluster(deployReq);
DeployResponse key = deployService.deploySoftware(deployReq);
Result res = new Result();
res.info = "INFO";
......
......@@ -62,7 +62,7 @@ public class DeployController {
if (deployRequest.getProvisionID() == null) {
throw new BadRequestException("Must provide provision ID");
}
DeployResponse key = deployService.deployCluster(deployRequest);
DeployResponse key = deployService.deploySoftware(deployRequest);
return key.getId();
}
......
......@@ -28,10 +28,11 @@ channel.queue_declare(queue='deployer_queue')
manager_type = ""
done = False
def threaded_function(args):
while True:
#print "processing data events"
while not done:
print "Done: %r" %(done)
connection.process_data_events()
sleep(30)
......@@ -125,11 +126,12 @@ channel.basic_qos(prefetch_count=1)
channel.basic_consume(on_request, queue='deployer_queue')
#thread = Thread(target = threaded_function, args = (1, ))
#thread.start()
thread = Thread(target = threaded_function, args = (1, ))
thread.start()
print(" [x] Awaiting RPC requests")
channel.start_consuming()
#thread.stop()
\ No newline at end of file
done = True
thread.stop()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment