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
afef04cb
Commit
afef04cb
authored
Apr 06, 2021
by
Mohamed Khalil Labidi
Browse files
Fix TargetProvider creation in EMS Deployment request creation
parent
45d73b04
Changes
2
Hide whitespace changes
Inline
Side-by-side
scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/PAGateway.java
View file @
afef04cb
...
...
@@ -385,7 +385,7 @@ public class PAGateway {
nodeNames
.
forEach
(
node
->
{
Deployment
deployment
=
EntityManagerHelper
.
find
(
Deployment
.
class
,
node
);
PACloud
cloud
=
deployment
.
getPaCloud
();
EmsDeploymentRequest
req
=
new
EmsDeploymentRequest
(
authorizationBearer
,
baguetteIp
,
baguettePort
,
OperatingSystemFamily
.
fromValue
(
operatingSystem
),
targetType
,
deployment
.
getNodeName
(),
EmsDeploymentRequest
.
TargetProvider
.
v
alue
Of
(
cloud
.
getCloudProviderName
()),
deployment
.
getLocationName
(),
isUsingHttps
,
deployment
.
getNodeName
());
EmsDeploymentRequest
req
=
new
EmsDeploymentRequest
(
authorizationBearer
,
baguetteIp
,
baguettePort
,
OperatingSystemFamily
.
fromValue
(
operatingSystem
),
targetType
,
deployment
.
getNodeName
(),
EmsDeploymentRequest
.
TargetProvider
.
fromV
alue
(
cloud
.
getCloudProviderName
()),
deployment
.
getLocationName
(),
isUsingHttps
,
deployment
.
getNodeName
());
deployment
.
setEmsDeployment
(
req
);
EntityManagerHelper
.
persist
(
deployment
);
});
...
...
scheduling-abstraction-layer/src/main/java/org/activeeon/morphemic/model/EmsDeploymentRequest.java
View file @
afef04cb
...
...
@@ -5,6 +5,7 @@ import org.ow2.proactive.scheduler.common.task.TaskVariable;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.util.HashMap
;
import
java.util.Locale
;
import
java.util.Map
;
@Entity
...
...
@@ -43,6 +44,15 @@ public class EmsDeploymentRequest implements Serializable {
}
String
upperwareValue
;
public
static
TargetProvider
fromValue
(
String
text
)
{
for
(
TargetProvider
b
:
TargetProvider
.
values
())
{
if
(
String
.
valueOf
(
b
.
upperwareValue
).
equals
(
text
.
toUpperCase
(
Locale
.
ROOT
)))
{
return
b
;
}
}
return
null
;
}
}
@Id
...
...
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