Skip to content

Commit

Permalink
Merge pull request #30 from indigo-dc/develop
Browse files Browse the repository at this point in the history
Update IM client dependency
  • Loading branch information
bassimatteo committed Apr 29, 2016
2 parents 2c71f3d + f09bac6 commit 0da0bd2
Show file tree
Hide file tree
Showing 24 changed files with 703 additions and 427 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<jackson.version>2.6.4</jackson.version>
<hibernate.version>4.3.11.Final</hibernate.version>

<im-java-api.version>0.3.4</im-java-api.version>
<im-java-api.version>0.4.2</im-java-api.version>


<mockito.version>1.10.19</mockito.version>
Expand Down
70 changes: 37 additions & 33 deletions restdocs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ <h4 id="_example_response"><a class="link" href="#_example_response">Example res
<div class="content">
<pre class="highlight"><code class="language-http" data-lang="http">HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 943
Content-Length: 1597

{
"links" : [ {
Expand All @@ -902,7 +902,7 @@ <h4 id="_example_response"><a class="link" href="#_example_response">Example res
"server_ip" : "10.0.0.1"
},
"task" : "NONE",
"callback" : "http://test.test",
"callback" : "http://test-server.com",
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/deployments/mmd34483-d937-4578-bfdb-ebe196bf82dd"
Expand All @@ -913,10 +913,27 @@ <h4 id="_example_response"><a class="link" href="#_example_response">Example res
"rel" : "template",
"href" : "http://localhost:8080/deployments/mmd34483-d937-4578-bfdb-ebe196bf82dd/template"
} ]
}, {
"uuid" : "mmd34483-d937-4578-bfdb-ebe196bf82de",
"creationTime" : "2015-12-11T16:14+0000",
"updateTime" : "2015-12-11T10:11+0000",
"status" : "DELETE_IN_PROGRESS",
"outputs" : { },
"task" : "NONE",
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/deployments/mmd34483-d937-4578-bfdb-ebe196bf82de"
}, {
"rel" : "resources",
"href" : "http://localhost:8080/deployments/mmd34483-d937-4578-bfdb-ebe196bf82de/resources"
}, {
"rel" : "template",
"href" : "http://localhost:8080/deployments/mmd34483-d937-4578-bfdb-ebe196bf82de/template"
} ]
} ],
"page" : {
"size" : 10,
"totalElements" : 1,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
Expand Down Expand Up @@ -1047,21 +1064,21 @@ <h4 id="_example_response_2"><a class="link" href="#_example_response_2">Example
Content-Length: 619

{
"uuid" : "53557dd2-55fd-4d44-88d0-d348a673a325",
"creationTime" : "2016-04-01T10:54+0000",
"uuid" : "cbba86fa-dcaa-43db-8063-2bee4c765d92",
"creationTime" : "2016-04-27T13:04+0000",
"status" : "CREATE_IN_PROGRESS",
"outputs" : { },
"task" : "NONE",
"callback" : "http://localhost:8080/callback",
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/deployments/53557dd2-55fd-4d44-88d0-d348a673a325"
"href" : "http://localhost:8080/deployments/cbba86fa-dcaa-43db-8063-2bee4c765d92"
}, {
"rel" : "resources",
"href" : "http://localhost:8080/deployments/53557dd2-55fd-4d44-88d0-d348a673a325/resources"
"href" : "http://localhost:8080/deployments/cbba86fa-dcaa-43db-8063-2bee4c765d92/resources"
}, {
"rel" : "template",
"href" : "http://localhost:8080/deployments/53557dd2-55fd-4d44-88d0-d348a673a325/template"
"href" : "http://localhost:8080/deployments/cbba86fa-dcaa-43db-8063-2bee4c765d92/template"
} ]
}</code></pre>
</div>
Expand Down Expand Up @@ -1147,7 +1164,7 @@ <h4 id="_example_response_3"><a class="link" href="#_example_response_3">Example
<div class="content">
<pre class="highlight"><code class="language-http" data-lang="http">HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 678
Content-Length: 684

{
"uuid" : "mmd34483-d937-4578-bfdb-ebe196bf82dd",
Expand All @@ -1158,7 +1175,7 @@ <h4 id="_example_response_3"><a class="link" href="#_example_response_3">Example
"server_ip" : "10.0.0.1"
},
"task" : "NONE",
"callback" : "http://test.test",
"callback" : "http://test-server.com",
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/deployments/mmd34483-d937-4578-bfdb-ebe196bf82dd"
Expand Down Expand Up @@ -1387,14 +1404,9 @@ <h4 id="_response_structure_4"><a class="link" href="#_response_structure_4">Res
<td class="tableblock halign-left valign-top"><p class="tableblock">Creation date-time (<a href="http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14" class="bare">http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14</a>)</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">content[].status</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">String</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The status of the deployment. (<a href="http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/Status.html" class="bare">http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/Status.html</a>)</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">content[].statusReason</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">content[].state</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">String</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The description of the state</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The status of the resource. (<a href="http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/NodeStates.html" class="bare">http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/NodeStates.html</a>)</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">content[].toscaNodeType</p></td>
Expand All @@ -1415,7 +1427,7 @@ <h4 id="_example_response_7"><a class="link" href="#_example_response_7">Example
<div class="content">
<pre class="highlight"><code class="language-http" data-lang="http">HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1401
Content-Length: 1313

{
"links" : [ {
Expand All @@ -1425,8 +1437,7 @@ <h4 id="_example_response_7"><a class="link" href="#_example_response_7">Example
"content" : [ {
"uuid" : "mmd34483-d937-4578-bfdb-ebe196bf82dd",
"creationTime" : "2015-12-11T16:14+0000",
"status" : "CREATE_COMPLETE",
"statusReason" : "Deployed",
"state" : "STARTED",
"toscaNodeType" : "tosca.nodes.Compute",
"requiredBy" : [ ],
"links" : [ {
Expand All @@ -1439,8 +1450,7 @@ <h4 id="_example_response_7"><a class="link" href="#_example_response_7">Example
}, {
"uuid" : "bbd34483-d937-4578-bfdb-ebe196bf82dd",
"creationTime" : "2015-12-11T16:14+0000",
"status" : "CREATE_IN_PROGRESS",
"statusReason" : "Deployed",
"state" : "CREATING",
"toscaNodeType" : "tosca.nodes.Compute",
"requiredBy" : [ ],
"links" : [ {
Expand Down Expand Up @@ -1508,14 +1518,9 @@ <h4 id="_response_structure_5"><a class="link" href="#_response_structure_5">Res
<td class="tableblock halign-left valign-top"><p class="tableblock">Creation date-time (<a href="http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14" class="bare">http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14</a>)</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">status</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">String</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The status of the deployment. (<a href="http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/Status.html" class="bare">http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/Status.html</a>)</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">statusReason</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">state</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">String</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The description of the state</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The status of the resource. (<a href="http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/NodeStates.html" class="bare">http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/NodeStates.html</a>)</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">toscaNodeType</p></td>
Expand All @@ -1536,13 +1541,12 @@ <h4 id="_example_response_8"><a class="link" href="#_example_response_8">Example
<div class="content">
<pre class="highlight"><code class="language-http" data-lang="http">HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 534
Content-Length: 493

{
"uuid" : "mmd34483-d937-4578-bfdb-ebe196bf82dd",
"creationTime" : "2015-12-11T16:14+0000",
"status" : "CREATE_COMPLETE",
"statusReason" : "Deployed",
"state" : "STARTED",
"toscaNodeType" : "tosca.nodes.Compute",
"requiredBy" : [ ],
"links" : [ {
Expand All @@ -1562,7 +1566,7 @@ <h4 id="_example_response_8"><a class="link" href="#_example_response_8">Example
</div>
<div id="footer">
<div id="footer-text">
Last updated 2016-04-01 11:54:48 +02:00
Last updated 2016-04-26 14:19:49 +02:00
</div>
</div>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ public abstract class AbstractResourceEntity implements Identifiable<String>, Se
@Column(name = "uuid", unique = true)
private String id;

@Enumerated(EnumType.STRING)
@Column(name = "status", length = 500)
private Status status;

@Column(name = "statusReason", columnDefinition = "LONGTEXT")
private String statusReason;

private Date created;
private Date updated;

Expand All @@ -55,22 +48,6 @@ public void setId(String id) {
this.id = id;
}

public Status getStatus() {
return status;
}

public void setStatus(Status status) {
this.status = status;
}

public String getStatusReason() {
return statusReason;
}

public void setStatusReason(String statusReason) {
this.statusReason = statusReason;
}

public void setCreated(Date created) {
this.created = created;
}
Expand Down Expand Up @@ -107,8 +84,8 @@ protected void onUpdate() {

@Override
public String toString() {
return "AbstractResourceEntity [id=" + id + ", status=" + status + ", created=" + created
+ ", updated=" + updated + "]";
return "AbstractResourceEntity [id=" + id + ", created=" + created + ", updated=" + updated
+ "]";
}

}
26 changes: 25 additions & 1 deletion src/main/java/it/reply/orchestrator/dal/entity/Deployment.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package it.reply.orchestrator.dal.entity;

import it.reply.orchestrator.enums.DeploymentProvider;
import it.reply.orchestrator.enums.Status;
import it.reply.orchestrator.enums.Task;

import java.util.ArrayList;
Expand All @@ -25,6 +26,13 @@ public class Deployment extends AbstractResourceEntity {

private static final long serialVersionUID = 3866893436735377053L;

@Enumerated(EnumType.STRING)
@Column(name = "status", length = 500)
private Status status;

@Column(name = "statusReason", columnDefinition = "LONGTEXT")
private String statusReason;

@Enumerated(EnumType.STRING)
@Column(name = "task")
private Task task;
Expand Down Expand Up @@ -52,7 +60,7 @@ public class Deployment extends AbstractResourceEntity {
@Column(name = "value")
Map<String, String> outputs = new HashMap<String, String>();

@OneToMany(cascade = CascadeType.ALL, mappedBy = "deployment")
@OneToMany(cascade = CascadeType.ALL, mappedBy = "deployment", orphanRemoval = true)
List<Resource> resources = new ArrayList<>();

@OneToMany(cascade = CascadeType.ALL, mappedBy = "deployment", orphanRemoval = true)
Expand All @@ -62,6 +70,22 @@ public Deployment() {
super();
}

public Status getStatus() {
return status;
}

public void setStatus(Status status) {
this.status = status;
}

public String getStatusReason() {
return statusReason;
}

public void setStatusReason(String statusReason) {
this.statusReason = statusReason;
}

public Task getTask() {
return task;
}
Expand Down
16 changes: 16 additions & 0 deletions src/main/java/it/reply/orchestrator/dal/entity/Resource.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
package it.reply.orchestrator.dal.entity;

import it.reply.orchestrator.enums.NodeStates;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

Expand All @@ -14,6 +18,10 @@ public class Resource extends AbstractResourceEntity {

private static final long serialVersionUID = -4916577635363604624L;

@Enumerated(EnumType.STRING)
@Column(name = "state", length = 500)
private NodeStates state;

@Column(name = "iaasId", length = 500)
private String iaasId;

Expand All @@ -36,6 +44,14 @@ public Resource() {
super();
}

public NodeStates getState() {
return state;
}

public void setState(NodeStates state) {
this.state = state;
}

public String getIaasId() {
return iaasId;
}
Expand Down

This file was deleted.

Loading

0 comments on commit 0da0bd2

Please sign in to comment.