Commit a812ba2c authored by Spiros Koulouzis's avatar Spiros Koulouzis

changed to timestamp

parent b59b6e78
...@@ -232,7 +232,7 @@ public class DeployService { ...@@ -232,7 +232,7 @@ public class DeployService {
private DeployResponse handleResponse(List<MessageParameter> params, DeployRequest deployInfo) throws KeyException, IOException { private DeployResponse handleResponse(List<MessageParameter> params, DeployRequest deployInfo) throws KeyException, IOException {
DeployResponse deployResponse = new DeployResponse(); DeployResponse deployResponse = new DeployResponse();
deployResponse.setCreationDate(System.currentTimeMillis()); deployResponse.setTimestamp(System.currentTimeMillis());
for (MessageParameter p : params) { for (MessageParameter p : params) {
String name = p.getName(); String name = p.getName();
...@@ -243,7 +243,7 @@ public class DeployService { ...@@ -243,7 +243,7 @@ public class DeployService {
k.setKey(value); k.setKey(value);
k.setType(Key.KeyType.PRIVATE); k.setType(Key.KeyType.PRIVATE);
KeyPair pair = new KeyPair(); KeyPair pair = new KeyPair();
pair.setCreationDate(System.currentTimeMillis()); pair.setTimestamp(System.currentTimeMillis());
pair.setPrivateKey(k); pair.setPrivateKey(k);
deployResponse.setKey(pair); deployResponse.setKey(pair);
save(deployResponse); save(deployResponse);
......
...@@ -86,7 +86,7 @@ public class PlannerService { ...@@ -86,7 +86,7 @@ public class PlannerService {
SimplePlanContainer simplePlan = P2PConverter.convert(jsonArrayString.toString(), "vm_user", "Ubuntu 16.04", "swarm"); SimplePlanContainer simplePlan = P2PConverter.convert(jsonArrayString.toString(), "vm_user", "Ubuntu 16.04", "swarm");
PlanResponse topLevel = new PlanResponse(); PlanResponse topLevel = new PlanResponse();
topLevel.setCreationDate(System.currentTimeMillis()); topLevel.setTimestamp(System.currentTimeMillis());
topLevel.setLevel(0); topLevel.setLevel(0);
topLevel.setToscaID(toscaId); topLevel.setToscaID(toscaId);
topLevel.setName("planner_output_all.yml"); topLevel.setName("planner_output_all.yml");
...@@ -95,7 +95,7 @@ public class PlannerService { ...@@ -95,7 +95,7 @@ public class PlannerService {
Set<String> loweLevelPlansIDs = new HashSet<>(); Set<String> loweLevelPlansIDs = new HashSet<>();
for (String lowLevelNames : map.keySet()) { for (String lowLevelNames : map.keySet()) {
PlanResponse lowLevelPlan = new PlanResponse(); PlanResponse lowLevelPlan = new PlanResponse();
lowLevelPlan.setCreationDate(System.currentTimeMillis()); lowLevelPlan.setTimestamp(System.currentTimeMillis());
lowLevelPlan.setLevel(1); lowLevelPlan.setLevel(1);
lowLevelPlan.setToscaID(toscaId); lowLevelPlan.setToscaID(toscaId);
lowLevelPlan.setName(lowLevelNames); lowLevelPlan.setName(lowLevelNames);
......
...@@ -128,7 +128,7 @@ public class ProvisionService { ...@@ -128,7 +128,7 @@ public class ProvisionService {
// + File.separator + "ec2_provisioner_provisoned3.json"); // + File.separator + "ec2_provisioner_provisoned3.json");
List<MessageParameter> params = response.getParameters(); List<MessageParameter> params = response.getParameters();
ProvisionResponse provisionResponse = new ProvisionResponse(); ProvisionResponse provisionResponse = new ProvisionResponse();
provisionResponse.setCreationDate(System.currentTimeMillis()); provisionResponse.setTimestamp(System.currentTimeMillis());
for (MessageParameter p : params) { for (MessageParameter p : params) {
String name = p.getName(); String name = p.getName();
if (name.toLowerCase().contains("exception")) { if (name.toLowerCase().contains("exception")) {
......
...@@ -64,7 +64,7 @@ public class SimplePlannerService { ...@@ -64,7 +64,7 @@ public class SimplePlannerService {
Message plannerReturnedMessage = (planner.call(plannerInvokationMessage)); Message plannerReturnedMessage = (planner.call(plannerInvokationMessage));
List<MessageParameter> planFiles = plannerReturnedMessage.getParameters(); List<MessageParameter> planFiles = plannerReturnedMessage.getParameters();
topLevel = new PlanResponse(); topLevel = new PlanResponse();
topLevel.setCreationDate(System.currentTimeMillis()); topLevel.setTimestamp(System.currentTimeMillis());
Set<String> ids = topLevel.getLoweLevelPlanIDs(); Set<String> ids = topLevel.getLoweLevelPlanIDs();
if (ids == null) { if (ids == null) {
ids = new HashSet<>(); ids = new HashSet<>();
...@@ -84,7 +84,7 @@ public class SimplePlannerService { ...@@ -84,7 +84,7 @@ public class SimplePlannerService {
topLevel.setKvMap(Converter.ymlString2Map(p.getValue())); topLevel.setKvMap(Converter.ymlString2Map(p.getValue()));
} else { } else {
lowerLevelPlan = new PlanResponse(); lowerLevelPlan = new PlanResponse();
lowerLevelPlan.setCreationDate(System.currentTimeMillis()); lowerLevelPlan.setTimestamp(System.currentTimeMillis());
lowerLevelPlan.setName(name); lowerLevelPlan.setName(name);
lowerLevelPlan.setKvMap(Converter.ymlString2Map(p.getValue())); lowerLevelPlan.setKvMap(Converter.ymlString2Map(p.getValue()));
lowerLevelPlan.setLevel(1); lowerLevelPlan.setLevel(1);
......
...@@ -70,7 +70,7 @@ public class CloudConfigurationController0 { ...@@ -70,7 +70,7 @@ public class CloudConfigurationController0 {
throw new NullKeyIDException(); throw new NullKeyIDException();
} }
CloudCredentials cloudCredentials = new CloudCredentials(); CloudCredentials cloudCredentials = new CloudCredentials();
cloudCredentials.setCreationDate(System.currentTimeMillis()); cloudCredentials.setTimestamp(System.currentTimeMillis());
cloudCredentials.setAccessKeyId(configure.keyid); cloudCredentials.setAccessKeyId(configure.keyid);
cloudCredentials.setSecretKey(configure.key); cloudCredentials.setSecretKey(configure.key);
...@@ -80,7 +80,7 @@ public class CloudConfigurationController0 { ...@@ -80,7 +80,7 @@ public class CloudConfigurationController0 {
try { try {
nl.uva.sne.drip.data.v1.external.Key key1 = new nl.uva.sne.drip.data.v1.external.Key(); nl.uva.sne.drip.data.v1.external.Key key1 = new nl.uva.sne.drip.data.v1.external.Key();
KeyPair pair = new KeyPair(); KeyPair pair = new KeyPair();
pair.setCreationDate(System.currentTimeMillis()); pair.setTimestamp(System.currentTimeMillis());
key1.setKey(key0.content); key1.setKey(key0.content);
Map<String, String> attributes = new HashMap<>(); Map<String, String> attributes = new HashMap<>();
attributes.put("domain_name", key0.domain_name); attributes.put("domain_name", key0.domain_name);
...@@ -110,7 +110,7 @@ public class CloudConfigurationController0 { ...@@ -110,7 +110,7 @@ public class CloudConfigurationController0 {
throw new NullKeyIDException(); throw new NullKeyIDException();
} }
CloudCredentials cloudCredentials = new CloudCredentials(); CloudCredentials cloudCredentials = new CloudCredentials();
cloudCredentials.setCreationDate(System.currentTimeMillis()); cloudCredentials.setTimestamp(System.currentTimeMillis());
// cloudCredentials.setKeyIdAlias(configure.geniKeyAlias); // cloudCredentials.setKeyIdAlias(configure.geniKeyAlias);
cloudCredentials.setAccessKeyId(configure.geniKey); cloudCredentials.setAccessKeyId(configure.geniKey);
cloudCredentials.setSecretKey(configure.geniKeyPass); cloudCredentials.setSecretKey(configure.geniKeyPass);
...@@ -123,7 +123,7 @@ public class CloudConfigurationController0 { ...@@ -123,7 +123,7 @@ public class CloudConfigurationController0 {
key1.setKey(key0.content); key1.setKey(key0.content);
key1.setType(Key.KeyType.PUBLIC); key1.setType(Key.KeyType.PUBLIC);
KeyPair pair = new KeyPair(); KeyPair pair = new KeyPair();
pair.setCreationDate(System.currentTimeMillis()); pair.setTimestamp(System.currentTimeMillis());
pair.setPublicKey(key1); pair.setPublicKey(key1);
pair = keyService.save(pair); pair = keyService.save(pair);
loginKeyIDs.add(pair.getId()); loginKeyIDs.add(pair.getId());
...@@ -138,7 +138,7 @@ public class CloudConfigurationController0 { ...@@ -138,7 +138,7 @@ public class CloudConfigurationController0 {
key1.setKey(key0.content); key1.setKey(key0.content);
key1.setType(Key.KeyType.PRIVATE); key1.setType(Key.KeyType.PRIVATE);
KeyPair pair = new KeyPair(); KeyPair pair = new KeyPair();
pair.setCreationDate(System.currentTimeMillis()); pair.setTimestamp(System.currentTimeMillis());
pair.setPrivateKey(key1); pair.setPrivateKey(key1);
pair = keyService.save(pair); pair = keyService.save(pair);
loginKeyIDs.add(pair.getId()); loginKeyIDs.add(pair.getId());
......
...@@ -84,7 +84,7 @@ public class ProvisionController0 { ...@@ -84,7 +84,7 @@ public class ProvisionController0 {
String provision(@RequestBody Upload upload) { String provision(@RequestBody Upload upload) {
ProvisionResponse resp = new ProvisionResponse(); ProvisionResponse resp = new ProvisionResponse();
resp.setCreationDate(System.currentTimeMillis()); resp.setTimestamp(System.currentTimeMillis());
CloudCredentials cloudCred = cloudCredentialsService.findAll().get(0); CloudCredentials cloudCred = cloudCredentialsService.findAll().get(0);
String cloudCredID = cloudCred.getId(); String cloudCredID = cloudCred.getId();
List<String> idList = new ArrayList<>(); List<String> idList = new ArrayList<>();
......
...@@ -132,7 +132,7 @@ public class CloudCredentialsController { ...@@ -132,7 +132,7 @@ public class CloudCredentialsController {
attributes.put("domain_name", FilenameUtils.removeExtension(originalFileName)); attributes.put("domain_name", FilenameUtils.removeExtension(originalFileName));
key.setAttributes(attributes); key.setAttributes(attributes);
KeyPair pair = new KeyPair(); KeyPair pair = new KeyPair();
pair.setCreationDate(System.currentTimeMillis()); pair.setTimestamp(System.currentTimeMillis());
pair.setPrivateKey(key); pair.setPrivateKey(key);
pair = keyService.save(pair); pair = keyService.save(pair);
loginKeyIDs.add(pair.getId()); loginKeyIDs.add(pair.getId());
...@@ -208,7 +208,7 @@ public class CloudCredentialsController { ...@@ -208,7 +208,7 @@ public class CloudCredentialsController {
public @ResponseBody public @ResponseBody
CloudCredentials geta() { CloudCredentials geta() {
CloudCredentials cloudCredentials = new CloudCredentials(); CloudCredentials cloudCredentials = new CloudCredentials();
cloudCredentials.setCreationDate(System.currentTimeMillis()); cloudCredentials.setTimestamp(System.currentTimeMillis());
cloudCredentials.setAccessKeyId("AKIAITY3KHZUQ6M7YBSQ"); cloudCredentials.setAccessKeyId("AKIAITY3KHZUQ6M7YBSQ");
cloudCredentials.setCloudProviderName("ec2"); cloudCredentials.setCloudProviderName("ec2");
cloudCredentials.setSecretKey("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"); cloudCredentials.setSecretKey("6J7uo99ifrff45sa6Gsy5vgb3bmrtwY6hBxtYt9y");
......
...@@ -139,7 +139,7 @@ public class KeyPairController { ...@@ -139,7 +139,7 @@ public class KeyPairController {
KeyPair geta() { KeyPair geta() {
try { try {
KeyPair pair = new KeyPair(); KeyPair pair = new KeyPair();
pair.setCreationDate(System.currentTimeMillis()); pair.setTimestamp(System.currentTimeMillis());
Key pk = new Key(); Key pk = new Key();
Map<String, String> attributes = new HashMap<>(); Map<String, String> attributes = new HashMap<>();
attributes.put("domain_name", "Virginia"); attributes.put("domain_name", "Virginia");
......
...@@ -200,7 +200,7 @@ public class Converter { ...@@ -200,7 +200,7 @@ public class Converter {
public static PlanResponse File2Plan1(Attribute p0) { public static PlanResponse File2Plan1(Attribute p0) {
PlanResponse p1 = new PlanResponse(); PlanResponse p1 = new PlanResponse();
p1.setCreationDate(System.currentTimeMillis()); p1.setTimestamp(System.currentTimeMillis());
p1.setLevel(Integer.valueOf(p0.level)); p1.setLevel(Integer.valueOf(p0.level));
p1.setName(p0.name); p1.setName(p0.name);
String yaml = p0.content.replaceAll("\\\\n", "\n"); String yaml = p0.content.replaceAll("\\\\n", "\n");
......
...@@ -32,7 +32,7 @@ public class OwnedObject { ...@@ -32,7 +32,7 @@ public class OwnedObject {
@Id @Id
private String id; private String id;
private Long creationDate; private Long timestamp;
@NotNull @NotNull
private String owner; private String owner;
...@@ -67,17 +67,15 @@ public class OwnedObject { ...@@ -67,17 +67,15 @@ public class OwnedObject {
} }
/** /**
* @return the creationDate * @return the timestamp
*/ */
public Long getCreationDate() { public Long getTimestamp() {
return creationDate; return timestamp;
} }
/**
* @param creationDate the creationDate to set public void setTimestamp(Long timestamp) {
*/ this.timestamp = timestamp;
public void setCreationDate(Long creationDate) {
this.creationDate = creationDate;
} }
} }
/* /*
* Copyright 2017 S. Koulouzis, Wang Junchao, Huan Zhou, Yang Hu * Copyright 2017 S. Koulouzis, Wang Junchao, Huan Zhou, Yang Hu
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
......
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