Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Andreas Tsagkaropoulos
morphemic-preprocessor
Commits
aa827953
Commit
aa827953
authored
Apr 07, 2021
by
Mohamed Khalil Labidi
Browse files
Fix TargetType and removeClouds
parent
afef04cb
Changes
2
Show whitespace changes
Inline
Side-by-side
scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/PAGateway.java
View file @
aa827953
...
...
@@ -471,6 +471,7 @@ public class PAGateway {
* @param preempt If true undeploy node source immediately without waiting for nodes to be freed
*/
public
void
removeClouds
(
List
<
String
>
cloudIDs
,
Boolean
preempt
)
{
EntityManagerHelper
.
begin
();
cloudIDs
.
forEach
(
cloudID
->
{
PACloud
cloud
=
EntityManagerHelper
.
find
(
PACloud
.
class
,
cloudID
);
for
(
Map
.
Entry
<
String
,
String
>
entry
:
cloud
.
getDeployedRegions
().
entrySet
())
{
...
...
@@ -480,7 +481,9 @@ public class PAGateway {
LOGGER
.
error
(
e
.
getStackTrace
());
}
}
EntityManagerHelper
.
remove
(
cloud
);
});
EntityManagerHelper
.
commit
();
}
/**
...
...
scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/EmsDeploymentRequest.java
View file @
aa827953
...
...
@@ -25,6 +25,15 @@ public class EmsDeploymentRequest implements Serializable {
String
adapterVal
;
public
static
TargetType
fromValue
(
String
text
)
{
for
(
TargetType
b
:
TargetType
.
values
())
{
if
(
String
.
valueOf
(
b
.
adapterVal
).
equals
(
text
.
toUpperCase
(
Locale
.
ROOT
)))
{
return
b
;
}
}
return
null
;
}
}
public
enum
TargetProvider
{
...
...
@@ -115,7 +124,7 @@ public class EmsDeploymentRequest implements Serializable {
this
.
baguetteIp
=
baguetteIp
;
this
.
baguette_port
=
baguette_port
;
this
.
targetOs
=
targetOs
;
this
.
targetType
=
TargetType
.
v
alue
Of
(
targetType
);
this
.
targetType
=
TargetType
.
fromV
alue
(
targetType
);
this
.
targetName
=
targetName
;
this
.
targetProvider
=
targetProvider
;
this
.
location
=
location
;
...
...
Write
Preview
Supports
Markdown
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