Commit e4ff23bc authored by Spiros Koulouzis's avatar Spiros Koulouzis

Updated API for uploads

Update planner controller to save tosca result 
parent 40bd8816
......@@ -15,8 +15,13 @@
*/
package nl.uva.sne.drip.api.rest;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.security.RolesAllowed;
import nl.uva.sne.drip.commons.types.CloudCredentials;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -26,9 +31,15 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import nl.uva.sne.drip.api.dao.CloudCredentialsDao;
import nl.uva.sne.drip.api.exception.BadRequestException;
import nl.uva.sne.drip.api.exception.NotFoundException;
import nl.uva.sne.drip.api.service.UserService;
import nl.uva.sne.drip.commons.types.LoginKey;
import org.apache.commons.io.FilenameUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
/**
*
......@@ -42,20 +53,65 @@ public class CloudConfigurationController {
@Autowired
private CloudCredentialsDao cloudCredentialsDao;
// curl -H "Content-Type: application/json" -X POST -d '{"key":"my_secret_password","keyIdAlias":"geni","logineKys":[{"attributes":null,"key":"-----BEGINRSAPUBLICKEY-----\nMIIBCgKCAQEA+xGZ/wcz9ugFpP07Nspo6U17l0YhFiFpxxU4pTk3Lifz9R3zsIsu\nERwta7+fWIfxOo208ett/jhskiVodSEt3QBGh4XBipyWopKwZ93HHaDVZAALi/2A\n+xTBtWdEo7XGUujKDvC2/aZKukfjpOiUI8AhLAfjmlcD/UZ1QPh0mHsglRNCmpCw\nmwSXA9VNmhz+PiB+Dml4WWnKW/VHo2ujTXxq7+efMU4H2fny3Se3KYOsFPFGZ1TN\nQSYlFuShWrHPtiLmUdPoP6CV2mML1tk+l7DIIqXrQhLUKDACeM5roMx0kLhUWB8P\n+0uj1CNlNN4JRZlC7xFfqiMbFRU9Z4N6YwIDAQAB\n-----ENDRSAPUBLICKEY-----","type":"PUBLIC"},{"attributes":null,"key":"-----BEGINRSAPRIVATEKEY-----\nMIICXAIBAAKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUp\nwmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ5\n1s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQABAoGAFijko56+qGyN8M0RVyaRAXz++xTqHBLh\n3tx4VgMtrQ+WEgCjhoTwo23KMBAuJGSYnRmoBZM3lMfTKevIkAidPExvYCdm5dYq3XToLkkLv5L2\npIIVOFMDG+KESnAFV7l2c+cnzRMW0+b6f8mR1CJzZuxVLL6Q02fvLi55/mbSYxECQQDeAw6fiIQX\nGukBI4eMZZt4nscy2o12KyYner3VpoeE+Np2q+Z3pvAMd/aNzQ/W9WaI+NRfcxUJrmfPwIGm63il\nAkEAxCL5HQb2bQr4ByorcMWm/hEP2MZzROV73yF41hPsRC9m66KrheO9HPTJuo3/9s5p+sqGxOlF\nL0NDt4SkosjgGwJAFklyR1uZ/wPJjj611cdBcztlPdqoxssQGnh85BzCj/u3WqBpE2vjvyyvyI5k\nX6zk7S0ljKtt2jny2+00VsBerQJBAJGC1Mg5Oydo5NwD6BiROrPxGo2bpTbu/fhrT8ebHkTz2epl\nU9VQQSQzY1oZMVX8i1m5WUTLPz2yLJIBQVdXqhMCQBGoiuSoSjafUhV7i1cEGpb88h5NBYZzWXGZ\n37sJ5QsW+sJyoNde3xH8vdXhzU7eT82D6X/scw9RZz+/6rCJ4p0=\n-----ENDRSAPRIVATEKEY-----","type":"PRIVATE"}],"cloudProviderName":"exogeni"}' http://localhost:8080/drip-api/configuration
// curl -H "Content-Type: application/json" -X POST -d '{"key":"my_secret_password","keyIdAlias":"geni","logineKeys":[{"attributes":null,"key":"-----BEGINRSAPUBLICKEY-----\nMIIBCgKCAQEA+xGZ/wcz9ugFpP07Nspo6U17l0YhFiFpxxU4pTk3Lifz9R3zsIsu\nERwta7+fWIfxOo208ett/jhskiVodSEt3QBGh4XBipyWopKwZ93HHaDVZAALi/2A\n+xTBtWdEo7XGUujKDvC2/aZKukfjpOiUI8AhLAfjmlcD/UZ1QPh0mHsglRNCmpCw\nmwSXA9VNmhz+PiB+Dml4WWnKW/VHo2ujTXxq7+efMU4H2fny3Se3KYOsFPFGZ1TN\nQSYlFuShWrHPtiLmUdPoP6CV2mML1tk+l7DIIqXrQhLUKDACeM5roMx0kLhUWB8P\n+0uj1CNlNN4JRZlC7xFfqiMbFRU9Z4N6YwIDAQAB\n-----ENDRSAPUBLICKEY-----","type":"PUBLIC"},{"attributes":null,"key":"-----BEGINRSAPRIVATEKEY-----\nMIICXAIBAAKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUp\nwmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ5\n1s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQABAoGAFijko56+qGyN8M0RVyaRAXz++xTqHBLh\n3tx4VgMtrQ+WEgCjhoTwo23KMBAuJGSYnRmoBZM3lMfTKevIkAidPExvYCdm5dYq3XToLkkLv5L2\npIIVOFMDG+KESnAFV7l2c+cnzRMW0+b6f8mR1CJzZuxVLL6Q02fvLi55/mbSYxECQQDeAw6fiIQX\nGukBI4eMZZt4nscy2o12KyYner3VpoeE+Np2q+Z3pvAMd/aNzQ/W9WaI+NRfcxUJrmfPwIGm63il\nAkEAxCL5HQb2bQr4ByorcMWm/hEP2MZzROV73yF41hPsRC9m66KrheO9HPTJuo3/9s5p+sqGxOlF\nL0NDt4SkosjgGwJAFklyR1uZ/wPJjj611cdBcztlPdqoxssQGnh85BzCj/u3WqBpE2vjvyyvyI5k\nX6zk7S0ljKtt2jny2+00VsBerQJBAJGC1Mg5Oydo5NwD6BiROrPxGo2bpTbu/fhrT8ebHkTz2epl\nU9VQQSQzY1oZMVX8i1m5WUTLPz2yLJIBQVdXqhMCQBGoiuSoSjafUhV7i1cEGpb88h5NBYZzWXGZ\n37sJ5QsW+sJyoNde3xH8vdXhzU7eT82D6X/scw9RZz+/6rCJ4p0=\n-----ENDRSAPRIVATEKEY-----","type":"PRIVATE"}],"cloudProviderName":"exogeni"}' http://localhost:8080/drip-api/configuration
// curl -H "Content-Type: application/json" -X POST -d '{"key":"AKISAKISAKIS","keyIdAlias":"6J76J76J76J76J76J76J7","logineKys":[{"attributes":{"domain_name":"California"},"type":"PUBLIC","key":"-----BEGINRSAPRIVATEKEY-----\nMIIEpQIBAAKCAQEA3Tz2mr7SZiAMfQyuvBjM9Oi..Z1BjP5CE/Wm/Rr500P\nRK+Lh9x5eJPo5CAZ3/ANBE0sTK0ZsDGMak2m1g7..3VHqIxFTz0Ta1d+NAj\nwnLe4nOb7/eEJbDPkk05ShhBrJGBKKxb8n104o/..PdzbFMIyNjJzBM2o5y\n5A13wiLitEO7nco2WfyYkQzaxCw0AwzlkVHiIyC..71pSzkv6sv+4IDMbT/\nXpCo8L6wTarzrywnQsh+etLD6FtTjYbbrvZ8RQM..Hg2qxraAV++HNBYmNW\ns0duEdjUbJK+ZarypXI9TtnS4o1Ckj7POfljiQI..IBAFyidxtqRQyv5KrD\nkbJ+q+rsJxQlaipn2M4lGuQJEfIxELFDyd3XpxP..Un/82NZNXlPmRIopXs\n2T91jiLZEUKQw+n73j26adTbteuEaPGSrTZxBLR..yssO0wWomUyILqVeti\n6AkL0NJAuKcucHGqWVgUIa4g1haE0ilcm6dWUDo..fd+PpzdCJf1s4NdUWK\nYV2GJcutGQb+jqT5DTUqAgST7N8M28rwjK6nVMI..BUpP0xpPnuYDyPOw6x\n4hBt8DZQYyduzIXBXRBKNiNdv8fum68/5klHxp6..4HRkMUL958UVeljUsT\nBFQlO9UCgYEA/VqzXVzlz8K36VSTMPEhB5zBATV..PRiXtYK1YpYV4/jSUj\nvvT4hP8uoYNC+BlEMi98LtnxZIh0V4rqHDsScAq..VyeSLH0loKMZgpwFEm\nbEIDnEOD0nKrfT/9K9sPYgvB43wsLEtUujaYw3W..Liy0WKmB8CgYEA34xn\n1QlOOhHBn9Z8qYjoDYhvcj+a89tD9eMPhesfQFw..rsfGcXIonFmWdVygbe\n6Doihc+GIYIq/QP4jgMksE1ADvczJSke92ZfE2i..fitBpQERNJO0BlabfP\nALs5NssKNmLkWS2U2BHCbv4DzDXwiQB37KPOL1c..kBHfF2/htIs20d1UVL\n+PK+aXKwguI6bxLGZ3of0UH+mGsSl0mkp7kYZCm..OTQtfeRqP8rDSC7DgA\nkHc5ajYqh04AzNFaxjRo+M3IGICUaOdKnXd0Fda..QwfoaX4QlRTgLqb7AN\nZTzM9WbmnYoXrx17kZlT3lsCgYEAm757XI3WJVj..WoLj1+v48WyoxZpcai\nuv9bT4Cj+lXRS+gdKHK+SH7J3x2CRHVS+WH/SVC..DxuybvebDoT0TkKiCj\nBWQaGzCaJqZa+POHK0klvS+9ln0/6k539p95tfX..X4TCzbVG6+gJiX0ysz\nYfehn5MCgYEAkMiKuWHCsVyCab3RUf6XA9gd3qY..fCTIGtS1tR5PgFIV+G\nengiVoWc/hkj8SBHZz1n1xLN7KDf8ySU06MDggB..hJ+gXJKy+gf3mF5Kmj\nDtkpjGHQzPF6vOe907y5NQLvVFGXUq/FIJZxB8k..fJdHEm2M4=\n-----ENDRSAPRIVATEKEY-----"},{"attributes":{"domain_name":"Virginia"},"type":"PUBLIC","key":"-----BEGINRSAPRIVATEKEY-----\nMIICXAIBAAKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUp\nwmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ5\n1s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQABAoGAFijko56+qGyN8M0RVyaRAXz++xTqHBLh\n3tx4VgMtrQ+WEgCjhoTwo23KMBAuJGSYnRmoBZM3lMfTKevIkAidPExvYCdm5dYq3XToLkkLv5L2\npIIVOFMDG+KESnAFV7l2c+cnzRMW0+b6f8mR1CJzZuxVLL6Q02fvLi55/mbSYxECQQDeAw6fiIQX\nGukBI4eMZZt4nscy2o12KyYner3VpoeE+Np2q+Z3pvAMd/aNzQ/W9WaI+NRfcxUJrmfPwIGm63il\nAkEAxCL5HQb2bQr4ByorcMWm/hEP2MZzROV73yF41hPsRC9m66KrheO9HPTJuo3/9s5p+sqGxOlF\nL0NDt4SkosjgGwJAFklyR1uZ/wPJjj611cdBcztlPdqoxssQGnh85BzCj/u3WqBpE2vjvyyvyI5k\nX6zk7S0ljKtt2jny2+00VsBerQJBAJGC1Mg5Oydo5NwD6BiROrPxGo2bpTbu/fhrT8ebHkTz2epl\nU9VQQSQzY1oZMVX8i1m5WUTLPz2yLJIBQVdXqhMCQBGoiuSoSjafUhV7i1cEGpb88h5NBYZzWXGZ\n37sJ5QsW+sJyoNde3xH8vdXhzU7eT82D6X/scw9RZz+/6rCJ4p0=\n-----ENDRSAPRIVATEKEY-----"}],"cloudProviderName":"ec2"}'
@RequestMapping(method = RequestMethod.POST)
@RolesAllowed({UserService.USER, UserService.ADMIN})
public @ResponseBody
String postConf(@RequestBody CloudCredentials cc) {
if (cc.getKey() == null) {
throw new BadRequestException("key can't be null");
}
if (cc.getKeyIdAlias() == null) {
throw new BadRequestException("keyIdAlias can't be null");
}
cloudCredentialsDao.save(cc);
return cc.getId();
}
@RequestMapping(value = "/upload/{id}", method = RequestMethod.POST)
@RolesAllowed({UserService.USER, UserService.ADMIN})
public @ResponseBody
String addLogineKey(@RequestParam("file") MultipartFile file, @PathVariable("id") String id) {
try {
CloudCredentials cc = cloudCredentialsDao.findOne(id);
if (cc == null) {
throw new NotFoundException();
}
if (file.isEmpty()) {
throw new BadRequestException("Must uplaod a file");
}
String originalFileName = file.getOriginalFilename();
byte[] bytes = file.getBytes();
List<LoginKey> logInKeys = cc.getLoginKeys();
if (logInKeys == null) {
logInKeys = new ArrayList<>();
}
LoginKey key = new LoginKey();
key.setKey(new String(bytes, "UTF-8"));
if (cc.getCloudProviderName().toLowerCase().equals("ec2")) {
Map<String, String> attributes = new HashMap<>();
attributes.put("domain_name", FilenameUtils.removeExtension(originalFileName));
key.setAttributes(attributes);
}
logInKeys.add(key);
cc.setLogineKeys(logInKeys);
cloudCredentialsDao.save(cc);
return cloudCredentialsDao.findOne(id).getId();
} catch (IOException ex) {
Logger.getLogger(CloudConfigurationController.class.getName()).log(Level.SEVERE, null, ex);
}
return null;
}
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@RolesAllowed({UserService.USER, UserService.ADMIN})
public CloudCredentials get(@PathVariable("id") String id) {
return cloudCredentialsDao.findOne(id);
CloudCredentials cc = cloudCredentialsDao.findOne(id);
if (cc == null) {
throw new NotFoundException();
}
return cc;
}
@RequestMapping(value = "/ids")
......
......@@ -49,7 +49,6 @@ import org.springframework.web.bind.annotation.RestController;
import nl.uva.sne.drip.api.dao.ToscaDao;
import nl.uva.sne.drip.api.rpc.DRIPCaller;
import nl.uva.sne.drip.api.rpc.ProvisionerCaller;
import nl.uva.sne.drip.api.service.PlannerService;
import nl.uva.sne.drip.api.service.UserService;
import nl.uva.sne.drip.commons.types.CloudCredentials;
import nl.uva.sne.drip.commons.types.LoginKey;
......@@ -67,7 +66,7 @@ public class PlannerController {
@Value("${message.broker.host}")
private String messageBrokerHost;
@Autowired
private ToscaDao dao;
private ToscaDao toscaDao;
@Autowired
private CloudCredentialsDao cloudCredentialsDao;
......@@ -78,7 +77,7 @@ public class PlannerController {
public @ResponseBody
String plann(@PathVariable("tosca_id") String toscaId) {
DRIPCaller planner = null;
DRIPCaller provisioner = null;
// DRIPCaller provisioner = null;
List<DRIPCaller> dripComponetens = new ArrayList<>();
try {
......@@ -87,13 +86,27 @@ public class PlannerController {
planner = new PlannerCaller(messageBrokerHost);
dripComponetens.add(planner);
Message plannerReturnedMessage = planner.call(plannerInvokationMessage);
Message provisionerInvokationMessage = buildProvisionerMessage(plannerReturnedMessage, "58a7281c55363e65b3c9eb82");
provisioner = new ProvisionerCaller(messageBrokerHost);
dripComponetens.add(provisioner);
provisioner.call(provisionerInvokationMessage);
return "";
List<Parameter> toscaFiles = plannerReturnedMessage.getParameters();
ToscaRepresentation tr = new ToscaRepresentation();
StringBuilder name = new StringBuilder();
StringBuilder value = new StringBuilder();
String prefix = "";
for (Parameter p : toscaFiles) {
Map<String, String> attributess = p.getAttributes();
String level = attributess.get("level");
name.append(prefix);
name.append(p.getName());
value.append(p.getValue());
value.append("\n");
}
tr.setName(name.toString());
tr.setKvMap(Converter.ymlString2Map(toscaId));
toscaDao.save(tr);
// Message provisionerInvokationMessage = buildProvisionerMessage(plannerReturnedMessage, "58a7281c55363e65b3c9eb82");
// provisioner = new ProvisionerCaller(messageBrokerHost);
// dripComponetens.add(provisioner);
// provisioner.call(provisionerInvokationMessage);
return tr.getId();
} catch (JSONException | IOException | TimeoutException | InterruptedException ex) {
Logger.getLogger(PlannerController.class.getName()).log(Level.SEVERE, null, ex);
} finally {
......@@ -112,7 +125,7 @@ public class PlannerController {
}
private Message buildPlannerMessage(String toscaId) throws JSONException, UnsupportedEncodingException, IOException {
ToscaRepresentation t2 = dao.findOne(toscaId);
ToscaRepresentation t2 = toscaDao.findOne(toscaId);
Map<String, Object> map = t2.getKvMap();
String ymlStr = Converter.map2YmlString(map);
ymlStr = ymlStr.replaceAll("\\uff0E", "\\.");
......@@ -171,7 +184,7 @@ public class PlannerController {
}
private List<Parameter> buildCertificatesParam(CloudCredentials cred) {
List<LoginKey> loginKeys = cred.getLogineKys();
List<LoginKey> loginKeys = cred.getLoginKeys();
List<Parameter> parameters = new ArrayList<>();
for (LoginKey lk : loginKeys) {
String domainName = lk.getAttributes().get("domain_name");
......
......@@ -16,12 +16,10 @@
package nl.uva.sne.drip.api.rest;
import nl.uva.sne.drip.commons.types.ToscaRepresentation;
import nl.uva.sne.drip.api.rpc.PlannerCaller;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeoutException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.security.RolesAllowed;
......@@ -37,6 +35,7 @@ import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.bind.annotation.PathVariable;
import nl.uva.sne.drip.api.dao.ToscaDao;
import nl.uva.sne.drip.api.exception.BadRequestException;
import nl.uva.sne.drip.api.service.UserService;
/**
......@@ -48,8 +47,6 @@ import nl.uva.sne.drip.api.service.UserService;
@Component
public class ToscaController {
// @Value("${message.broker.host}")
// private String messageBrokerHost;
@Autowired
private ToscaDao dao;
......@@ -58,10 +55,10 @@ public class ToscaController {
@RolesAllowed({UserService.USER, UserService.ADMIN})
public @ResponseBody
String toscaUpload(@RequestParam("file") MultipartFile file) {
PlannerCaller planner = null;
if (!file.isEmpty()) {
if (file.isEmpty()) {
throw new BadRequestException("Must uplaod a file");
}
try {
String originalFileName = file.getOriginalFilename();
String name = System.currentTimeMillis() + "_" + originalFileName;
byte[] bytes = file.getBytes();
......@@ -73,20 +70,11 @@ public class ToscaController {
t.setName(name);
t.setKvMap(map);
dao.save(t);
return t.getId();
} catch (IOException | IllegalStateException ex) {
Logger.getLogger(ToscaController.class.getName()).log(Level.SEVERE, null, ex);
} finally {
if (planner != null) {
try {
planner.close();
} catch (IOException | TimeoutException ex) {
Logger.getLogger(ToscaController.class.getName()).log(Level.WARNING, null, ex);
}
}
}
}
return null;
}
......@@ -116,16 +104,6 @@ public class ToscaController {
return null;
}
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@RolesAllowed({UserService.USER, UserService.ADMIN})
public @ResponseBody
ToscaRepresentation getToscaRepresentation(@PathVariable("id") String id) {
ToscaRepresentation tosca = dao.findOne(id);
return tosca;
}
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
@RolesAllowed({UserService.USER, UserService.ADMIN})
public @ResponseBody
......
......@@ -47,6 +47,16 @@ public class UserController {
@Autowired
private UserService service;
/**
* Register new user. A normal user cannot create accounts, only the user
* with the 'ADMIN' role can do that.
*
* @param user
* @return Response on success: The ID of the newly register user. Response
* on fail: If the user name already exists, or the user name is 'null' or
* the password is 'null' there will be a 'BadRequestException'
*
*/
@RequestMapping(value = "/register", method = RequestMethod.POST)
@RolesAllowed({UserService.ADMIN})
public @ResponseBody
......@@ -74,8 +84,7 @@ public class UserController {
if (registeredUser == null) {
throw new NotFoundException("User " + user.getUsername() + " not found");
}
service.getDao().save(user);
return user.getId();
return this.register(user);
}
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
......
message.broker.host=172.17.0.2
message.broker.host=172.17.0.3
db.name=drip
db.username=drip-user
db.password=drip-pass
......@@ -31,9 +31,11 @@ public class CloudCredentials {
private String key;
private String keyIdAlias;
private List<LoginKey> logineKys;
private List<LoginKey> loginKeys;
private String cloudProviderName;
......@@ -74,17 +76,17 @@ public class CloudCredentials {
}
/**
* @return the logineKys
* @return the loginKeys
*/
public List<LoginKey> getLogineKys() {
return logineKys;
public List<LoginKey> getLoginKeys() {
return loginKeys;
}
/**
* @param logineKys the logineKys to set
* @param loginKeys the loginKeys to set
*/
public void setLogineKys(List<LoginKey> logineKys) {
this.logineKys = logineKys;
public void setLogineKeys(List<LoginKey> loginKeys) {
this.loginKeys = loginKeys;
}
/**
......
......@@ -15,6 +15,7 @@
*/
package nl.uva.sne.drip.commons.types;
import java.util.List;
import java.util.Map;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
......@@ -29,10 +30,14 @@ public class ToscaRepresentation {
@Id
private String id;
private List<String> lowerLevelIDs;
private String name;
private Map<String, Object> kvMap;
private Integer level;
public final String getId() {
return id;
}
......@@ -69,4 +74,32 @@ public class ToscaRepresentation {
this.name = name;
}
/**
* @return the level
*/
public Integer getLevel() {
return level;
}
/**
* @param level the level to set
*/
public void setLevel(Integer level) {
this.level = level;
}
/**
* @return the lowerLevelIDs
*/
public List<String> getLowerLevelIDs() {
return lowerLevelIDs;
}
/**
* @param lowerLevelIDs the lowerLevelIDs to set
*/
public void setLowerLevelIDs(List<String> lowerLevelIDs) {
this.lowerLevelIDs = lowerLevelIDs;
}
}
......@@ -31,7 +31,7 @@ import java.util.logging.Logger;
public class RPCServer {
private static final String RPC_QUEUE_NAME = "planner_queue";
private static final String HOST = "172.17.0.2";
private static final String HOST = "172.17.0.3";
public static void main(String[] argv) {
start();
......
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