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
b3212717
Commit
b3212717
authored
Mar 18, 2020
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try to implement delete
parent
98461ebf
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
15 deletions
+18
-15
nodes.yaml
TOSCA/types/nodes.yaml
+1
-1
DRIPService.java
...er/src/main/java/nl/uva/sne/drip/service/DRIPService.java
+16
-13
CloudStormService.java
...n/java/nl/uva/sne/drip/provisioner/CloudStormService.java
+1
-1
No files found.
TOSCA/types/nodes.yaml
View file @
b3212717
...
@@ -204,7 +204,7 @@ node_types:
...
@@ -204,7 +204,7 @@ node_types:
disk_size
:
disk_size
:
type
:
scalar-unit.size
type
:
scalar-unit.size
required
:
true
required
:
true
default
:
2
0000 MB
default
:
1
0000 MB
constraints
:
constraints
:
-
greater_or_equal
:
15000 MB
-
greater_or_equal
:
15000 MB
mem_size
:
mem_size
:
...
...
manager/src/main/java/nl/uva/sne/drip/service/DRIPService.java
View file @
b3212717
...
@@ -19,6 +19,7 @@ import nl.uva.sne.drip.model.Exceptions.MissingVMTopologyException;
...
@@ -19,6 +19,7 @@ import nl.uva.sne.drip.model.Exceptions.MissingVMTopologyException;
import
nl.uva.sne.drip.model.Exceptions.TypeExeption
;
import
nl.uva.sne.drip.model.Exceptions.TypeExeption
;
import
nl.uva.sne.drip.model.Message
;
import
nl.uva.sne.drip.model.Message
;
import
nl.uva.sne.drip.model.NodeTemplateMap
;
import
nl.uva.sne.drip.model.NodeTemplateMap
;
import
nl.uva.sne.drip.model.cloud.storm.CloudsStormSubTopology
;
import
nl.uva.sne.drip.model.tosca.Credential
;
import
nl.uva.sne.drip.model.tosca.Credential
;
import
nl.uva.sne.drip.model.tosca.ToscaTemplate
;
import
nl.uva.sne.drip.model.tosca.ToscaTemplate
;
import
nl.uva.sne.drip.rpc.DRIPCaller
;
import
nl.uva.sne.drip.rpc.DRIPCaller
;
...
@@ -154,19 +155,21 @@ public class DRIPService {
...
@@ -154,19 +155,21 @@ public class DRIPService {
}
}
public
String
delete
(
String
id
,
List
<
String
>
nodeNames
)
throws
NotFoundException
,
IOException
,
JsonProcessingException
,
ApiException
,
TypeExeption
,
TimeoutException
,
InterruptedException
{
public
String
delete
(
String
id
,
List
<
String
>
nodeNames
)
throws
NotFoundException
,
IOException
,
JsonProcessingException
,
ApiException
,
TypeExeption
,
TimeoutException
,
InterruptedException
{
// ToscaTemplate toscaTemplate = initExecution(id);
ToscaTemplate
toscaTemplate
=
initExecution
(
id
);
// if (nodeNames == null || nodeNames.isEmpty()) {
//If no nodes are specified delete all the infrastructure
// List<NodeTemplateMap> vmTopologies = helper.getVMTopologyTemplates();
if
(
nodeNames
==
null
||
nodeNames
.
isEmpty
())
{
// if (vmTopologies != null) {
List
<
NodeTemplateMap
>
vmTopologies
=
helper
.
getVMTopologyTemplates
();
// for (NodeTemplateMap vmTopology : vmTopologies) {
for
(
NodeTemplateMap
vmTopology
:
vmTopologies
)
{
// CloudsStormSubTopology.StatusEnum status = helper.getVMTopologyTemplateStatus(vmTopology);
CloudsStormSubTopology
.
StatusEnum
status
=
helper
.
getVMTopologyTemplateStatus
(
vmTopology
);
// if (!status.equals(CloudsStormSubTopology.StatusEnum.DELETED)) {
if
(!
status
.
equals
(
CloudsStormSubTopology
.
StatusEnum
.
DELETED
))
{
// toscaTemplate = setDesieredSate(toscaTemplate, vmTopologies, NODE_STATES.DELETE);
toscaTemplate
=
setDesieredSate
(
toscaTemplate
,
vmTopologies
,
NODE_STATES
.
DELETE
);
// }
}
// }
}
// return execute(toscaTemplate, provisionerQueueName);
return
execute
(
toscaTemplate
,
provisionerQueueName
);
// }
}
else
{
// }
}
return
null
;
return
null
;
}
}
...
...
provisioner/src/main/java/nl/uva/sne/drip/provisioner/CloudStormService.java
View file @
b3212717
...
@@ -165,7 +165,7 @@ class CloudStormService {
...
@@ -165,7 +165,7 @@ class CloudStormService {
Set
<
PosixFilePermission
>
perms
=
new
HashSet
<>();
Set
<
PosixFilePermission
>
perms
=
new
HashSet
<>();
perms
.
add
(
PosixFilePermission
.
OWNER_READ
);
perms
.
add
(
PosixFilePermission
.
OWNER_READ
);
Files
.
setPosixFilePermissions
(
Paths
.
get
(
tempInputDirPath
+
File
.
separator
+
userPrivateName
),
perms
);
Files
.
setPosixFilePermissions
(
Paths
.
get
(
tempInputDirPath
+
File
.
separator
+
userPrivateName
),
perms
);
Logger
.
getLogger
(
CloudStormService
.
class
.
getName
()).
log
(
Level
.
INFO
,
"Wrote ssh keys in:
"
+
tempInputDirPath
+
File
.
separator
+
userPrivateName
);
Logger
.
getLogger
(
CloudStormService
.
class
.
getName
()).
log
(
Level
.
INFO
,
"Wrote ssh keys in:
{0}{1}{2}"
,
new
Object
[]{
tempInputDirPath
,
File
.
separator
,
userPrivateName
}
);
return
publicKeyPath
;
return
publicKeyPath
;
}
}
...
...
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