Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CONF
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UvA
CONF
Commits
e38a692c
Commit
e38a692c
authored
Jan 09, 2019
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace data model
parent
18fb961e
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
270 additions
and
10 deletions
+270
-10
CloudStormService.java
.../main/java/nl/uva/sne/drip/service/CloudStormService.java
+7
-4
pom.xml
drip-commons/pom.xml
+17
-0
InfrastructureDescription.java
...ne/drip/drip/commons/model/InfrastructureDescription.java
+8
-2
Message.java
...main/java/nl/uva/sne/drip/drip/commons/model/Message.java
+1
-1
MessageParameter.java
.../nl/uva/sne/drip/drip/commons/model/MessageParameter.java
+1
-1
OwnedDocument.java
...ava/nl/uva/sne/drip/drip/commons/model/OwnedDocument.java
+123
-0
Status.java
.../main/java/nl/uva/sne/drip/drip/commons/model/Status.java
+2
-2
VM.java
.../src/main/java/nl/uva/sne/drip/drip/commons/model/VM.java
+111
-0
No files found.
drip-api/src/main/java/nl/uva/sne/drip/service/CloudStormService.java
View file @
e38a692c
...
...
@@ -15,10 +15,13 @@
*/
package
nl
.
uva
.
sne
.
drip
.
service
;
import
nl.uva.sne.drip.drip.commons.data.InfrastructureDescription
;
import
lambdaInfrs.engine.TEngine.TEngine
;
import
nl.uva.sne.drip.drip.commons.model.InfrastructureDescription
;
import
org.springframework.amqp.rabbit.connection.CachingConnectionFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
topology.analysis.TopologyAnalysisMain
;
/**
*
...
...
@@ -27,10 +30,10 @@ import org.springframework.stereotype.Service;
@Service
public
class
CloudStormService
{
@
Autowired
CachingConnectionFactory
connectionFactory
;
@
Value
(
"${provisioner.queue.prefix}"
)
private
String
provisionerQueuePrefix
;
public
InfrastructureDescription
provision
()
{
public
InfrastructureDescription
provision
(
InfrastructureDescription
description
)
{
return
null
;
}
...
...
drip-commons/pom.xml
View file @
e38a692c
...
...
@@ -9,6 +9,23 @@
<artifactId>
drip-commons
</artifactId>
<packaging>
jar
</packaging>
<dependencies>
<dependency>
<groupId>
org.springframework.data
</groupId>
<artifactId>
spring-data-jpa
</artifactId>
<type>
jar
</type>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.12
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.hamcrest
</groupId>
<artifactId>
hamcrest-core
</artifactId>
<version>
1.3
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
javax
</groupId>
<artifactId>
javaee-web-api
</artifactId>
...
...
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/
data
/InfrastructureDescription.java
→
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/
model
/InfrastructureDescription.java
View file @
e38a692c
...
...
@@ -13,12 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
data
;
package
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
;
import
java.util.List
;
/**
* Description of the infrastructure including network VMs etc.
*
* @author S. Koulouzis
*/
public
class
InfrastructureDescription
extends
Description
{
private
List
<
VM
>
VMs
;
}
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/
data
/Message.java
→
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/
model
/Message.java
View file @
e38a692c
...
...
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
data
;
package
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
;
import
java.io.Serializable
;
import
java.util.List
;
...
...
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/
data
/MessageParameter.java
→
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/
model
/MessageParameter.java
View file @
e38a692c
...
...
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
data
;
package
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
;
import
java.io.Serializable
;
import
java.util.Map
;
...
...
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/model/OwnedDocument.java
0 → 100644
View file @
e38a692c
/*
* Copyright 2019 S. Koulouzis, Huan Zhou, Yang Hu
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.webcohesion.enunciate.metadata.DocumentationExample
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
javax.persistence.EntityListeners
;
import
javax.persistence.Id
;
import
javax.persistence.MappedSuperclass
;
import
javax.persistence.PrePersist
;
import
javax.persistence.Temporal
;
import
javax.persistence.TemporalType
;
import
static
javax
.
persistence
.
TemporalType
.
TIMESTAMP
;
import
javax.validation.constraints.NotNull
;
import
org.springframework.data.annotation.CreatedBy
;
import
org.springframework.data.annotation.CreatedDate
;
import
org.springframework.data.annotation.LastModifiedBy
;
import
org.springframework.data.annotation.LastModifiedDate
;
import
org.springframework.data.jpa.domain.support.AuditingEntityListener
;
import
org.springframework.security.core.userdetails.User
;
/**
* This is the base class for users to own resources. Many classes extend this
* class
*
* @author S. Koulouzis
*/
@MappedSuperclass
@EntityListeners
(
AuditingEntityListener
.
class
)
abstract
class
OwnedDocument
{
@Id
private
String
id
;
@CreatedBy
protected
User
owner
;
@CreatedDate
@Temporal
(
TIMESTAMP
)
private
Date
creationDate
;
@LastModifiedBy
private
User
modifier
;
@LastModifiedDate
@Temporal
(
TIMESTAMP
)
protected
Date
modificationdDate
;
/**
* The owner (username) for the particular object. This value is set when
* the DAO saves the object based on the principal who made the call. It is
* created automatically. No need to set during a POST
*
* @return the owner
*/
@DocumentationExample
(
"user1"
)
public
User
getOwner
()
{
return
owner
;
}
/**
* @param owner the ownerID to set
*/
public
void
setOwner
(
User
owner
)
{
this
.
owner
=
owner
;
}
/**
* The UID of this object. This value is auto generated by the DAO when the
* object is saved.
*
* @return the id
*/
@DocumentationExample
(
"58e3946e0fb4f562d84ba1ad"
)
public
String
getId
()
{
return
id
;
}
/**
* @return the modifier
*/
@DocumentationExample
(
"user1"
)
public
User
getModifieder
()
{
return
modifier
;
}
/**
* @param modifieder the modifier to set
*/
public
void
setModifieder
(
User
modifieder
)
{
this
.
modifier
=
modifieder
;
}
/**
* @return the creationDate
*/
public
Date
getCreationDate
()
{
return
creationDate
;
}
/**
* @param creationDate the creationDate to set
*/
public
void
setCreationDate
(
Date
creationDate
)
{
this
.
creationDate
=
creationDate
;
}
}
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/
data
/Status.java
→
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/
model
/Status.java
View file @
e38a692c
...
...
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
data
;
package
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
;
/**
*
* @author S. Koulouzis
*/
abstract
class
Description
{
abstract
class
Description
extends
OwnedDocument
{
}
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/model/VM.java
0 → 100644
View file @
e38a692c
/*
* Copyright 2019 S. Koulouzis, Huan Zhou, Yang Hu
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
;
import
com.webcohesion.enunciate.metadata.DocumentationExample
;
/**
* The lowest level is the VM level. It describes the types of VMs required,
* mainly referring to the computing capacities, CPU, memory, etc
*
* @author S. Koulouzis
*/
public
class
VM
{
/**
* This field can be omitted. After provisioning, you can check the actual
* public address of this VM from this field.
* @return the publicAddress
*/
@DocumentationExample
(
"145.18.150.10"
)
public
String
getPublicAddress
()
{
return
publicAddress
;
}
/**
* @param publicAddress the publicAddress to set
*/
public
void
setPublicAddress
(
String
publicAddress
)
{
this
.
publicAddress
=
publicAddress
;
}
/**
* It indicates the specific operating system required by the application.
* The value of above two fields should be supported by the Cloud database
* information.
*
* @return the osType
*/
@DocumentationExample
(
"Ubuntu 14.04"
)
public
String
getOsType
()
{
return
osType
;
}
/**
* @param osType the osType to set
*/
public
void
setOsType
(
String
osType
)
{
this
.
osType
=
osType
;
}
/**
* It indicates the computing capacity of the VM, such as t2.small or
* t2.medium for Cloud EC2.
*
* @return the nodeType
*/
@DocumentationExample
(
"t2.small"
)
public
String
getNodeType
()
{
return
nodeType
;
}
/**
* @param nodeType the nodeType to set
*/
public
void
setNodeType
(
String
nodeType
)
{
this
.
nodeType
=
nodeType
;
}
/**
* A user-defined node name of this VM. It should be unique in the entire
* infrastructure, e.g., node1. This will also be the hostname of this VM.
* And this VM can be accessed from other connected VMs with this hostname,
* e.g., ping node1.
*
* @return the name
*/
@DocumentationExample
(
"node1"
)
public
String
getName
()
{
return
name
;
}
/**
* @param name the name to set
*/
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
private
String
name
;
private
String
nodeType
;
private
String
osType
;
private
String
publicAddress
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment