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
40851014
Commit
40851014
authored
Dec 11, 2019
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed user schema
parent
c354a862
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
105 deletions
+24
-105
UserApi.java
drip-manager/src/main/java/nl/uva/sne/drip/api/UserApi.java
+0
-1
UserApiController.java
.../src/main/java/nl/uva/sne/drip/api/UserApiController.java
+1
-1
CloudStormService.java
...n/java/nl/uva/sne/drip/provisioner/CloudStormService.java
+1
-1
Consumer.java
...r/src/main/java/nl/uva/sne/drip/provisioner/Consumer.java
+3
-3
CloudStormServiceTest.java
...va/nl/uva/sne/drip/provisioner/CloudStormServiceTest.java
+0
-80
User.yml
openAPI/schema/User.yml
+19
-19
No files found.
drip-manager/src/main/java/nl/uva/sne/drip/api/UserApi.java
View file @
40851014
...
...
@@ -5,7 +5,6 @@
*/
package
nl
.
uva
.
sne
.
drip
.
api
;
import
nl.uva.sne.drip.model.User
;
import
io.swagger.annotations.*
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.validation.annotation.Validated
;
...
...
drip-manager/src/main/java/nl/uva/sne/drip/api/UserApiController.java
View file @
40851014
package
nl
.
uva
.
sne
.
drip
.
api
;
import
nl.uva.sne.drip.model.
User
;
import
nl.uva.sne.drip.model.
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
io.swagger.annotations.*
;
import
org.slf4j.Logger
;
...
...
drip-provisioner/src/main/java/nl/uva/sne/drip/provisioner/CloudStormService.java
View file @
40851014
...
...
@@ -15,12 +15,12 @@ import java.io.IOException;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
nl.uva.sne.drip.commons.sure_tosca.client.ApiException
;
import
nl.uva.sne.drip.commons.utils.ToscaHelper
;
import
nl.uva.sne.drip.model.CloudsStormSubTopology
;
import
nl.uva.sne.drip.model.CloudsStormTopTopology
;
import
nl.uva.sne.drip.model.NodeTemplate
;
import
nl.uva.sne.drip.model.ToscaTemplate
;
import
nl.uva.sne.drip.sure_tosca.client.ApiException
;
import
org.apache.commons.io.FilenameUtils
;
/**
...
...
drip-provisioner/src/main/java/nl/uva/sne/drip/provisioner/Consumer.java
View file @
40851014
...
...
@@ -29,9 +29,9 @@ import java.io.IOException;
import
java.util.concurrent.TimeoutException
;
import
java.util.logging.Level
;
import
java.util.logging.Logger
;
import
nl.uva.sne.drip.commons.sure_tosca.client.ApiException
;
import
nl.uva.sne.drip.model.Message
;
import
nl.uva.sne.drip.model.ToscaTemplate
;
import
nl.uva.sne.drip.sure_tosca.client.ApiException
;
/**
*
...
...
@@ -47,7 +47,7 @@ public class Consumer extends DefaultConsumer {
private
final
ObjectMapper
objectMapper
;
private
final
String
sureToscaBasePath
;
public
Consumer
(
Channel
channel
,
String
sureToscaBasePath
)
throws
IOException
,
TimeoutException
{
public
Consumer
(
Channel
channel
,
String
sureToscaBasePath
)
throws
IOException
,
TimeoutException
{
super
(
channel
);
this
.
sureToscaBasePath
=
sureToscaBasePath
;
this
.
channel
=
channel
;
...
...
@@ -73,7 +73,7 @@ public class Consumer extends DefaultConsumer {
throw
new
FileNotFoundException
(
"Could not create input directory: "
+
tempInputDir
.
getAbsolutePath
());
}
CloudStormService
service
=
new
CloudStormService
(
sureToscaBasePath
,
message
.
getToscaTemplate
());
CloudStormService
service
=
new
CloudStormService
(
sureToscaBasePath
,
message
.
getToscaTemplate
());
ToscaTemplate
toscaTemplate
=
service
.
execute
();
Message
responceMessage
=
new
Message
();
...
...
drip-provisioner/src/test/java/nl/uva/sne/drip/provisioner/CloudStormServiceTest.java
deleted
100644 → 0
View file @
c354a862
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package
nl
.
uva
.
sne
.
drip
.
provisioner
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.dataformat.yaml.YAMLFactory
;
import
com.fasterxml.jackson.dataformat.yaml.YAMLGenerator
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileNotFoundException
;
import
java.io.IOException
;
import
java.nio.file.Files
;
import
java.nio.file.Paths
;
import
java.util.Properties
;
import
nl.uva.sne.drip.commons.sure_tosca.client.ApiException
;
import
nl.uva.sne.drip.commons.utils.ToscaHelper
;
import
nl.uva.sne.drip.model.ToscaTemplate
;
import
org.junit.After
;
import
org.junit.AfterClass
;
import
org.junit.Before
;
import
org.junit.BeforeClass
;
import
org.junit.Test
;
import
static
org
.
junit
.
Assert
.*;
/**
*
* @author alogo
*/
public
class
CloudStormServiceTest
{
private
static
ObjectMapper
objectMapper
;
private
static
final
String
testUpdatedApplicationExampleToscaFilePath
=
".."
+
File
.
separator
+
"TOSCA"
+
File
.
separator
+
"application_example_2_topologies.yaml"
;
private
static
CloudStormService
instance
;
private
static
ToscaTemplate
toscaTemplate
;
public
CloudStormServiceTest
()
{
}
@BeforeClass
public
static
void
setUpClass
()
throws
FileNotFoundException
,
IOException
,
JsonProcessingException
,
ApiException
{
Properties
prop
=
new
Properties
();
String
resourceName
=
"src/test/resources/application.properies"
;
prop
.
load
(
new
FileInputStream
(
resourceName
));
byte
[]
bytes
=
Files
.
readAllBytes
(
Paths
.
get
(
testUpdatedApplicationExampleToscaFilePath
));
String
ymlStr
=
new
String
(
bytes
,
"UTF-8"
);
objectMapper
=
new
ObjectMapper
(
new
YAMLFactory
().
disable
(
YAMLGenerator
.
Feature
.
WRITE_DOC_START_MARKER
));
toscaTemplate
=
objectMapper
.
readValue
(
ymlStr
,
ToscaTemplate
.
class
);
instance
=
new
CloudStormService
(
prop
.
getProperty
(
"sure-tosca.base.path"
),
toscaTemplate
);
}
@AfterClass
public
static
void
tearDownClass
()
{
}
@Before
public
void
setUp
()
{
}
@After
public
void
tearDown
()
{
}
/**
* Test of execute method, of class CloudStormService.
*/
@Test
public
void
testExecute
()
throws
Exception
{
System
.
out
.
println
(
"execute"
);
ToscaTemplate
expResult
=
null
;
ToscaTemplate
result
=
instance
.
execute
();
}
}
openAPI/schema/User.yml
View file @
40851014
User
:
type
:
"
object"
properties
:
id
:
type
:
"
string"
username
:
type
:
"
string"
firstName
:
type
:
"
string"
lastName
:
type
:
"
string"
email
:
type
:
"
string"
password
:
type
:
"
string"
userStatus
:
type
:
"
integer"
format
:
"
int32"
description
:
"
User
Status"
User
:
type
:
"
object"
properties
:
id
:
type
:
"
string"
username
:
type
:
"
string"
firstName
:
type
:
"
string"
lastName
:
type
:
"
string"
email
:
type
:
"
string"
password
:
type
:
"
string"
userStatus
:
type
:
"
integer"
format
:
"
int32"
description
:
"
User
Status"
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