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
Melodic
melodic-upperware
Commits
2f5885b5
Commit
2f5885b5
authored
Feb 21, 2022
by
Marta Różańska
Browse files
Merge branch 'automate-byon' into 'morphemic-rc2.0'
automate byon See merge request
!128
parents
ee321959
0ec28dd0
Pipeline
#19849
passed with stages
in 91 minutes and 35 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
gui-backend/pom.xml
View file @
2f5885b5
...
...
@@ -117,7 +117,7 @@
<dependency>
<groupId>
cloud.morphemic.connectors
</groupId>
<artifactId>
proactive_client
</artifactId>
<version>
2.
0
-SNAPSHOT
</version>
<version>
2.
3
-SNAPSHOT
</version>
</dependency>
</dependencies>
...
...
gui-backend/src/main/java/eu/melodic/upperware/guibackend/communication/proactive/ProactiveClientServiceGUI.java
View file @
2f5885b5
...
...
@@ -17,7 +17,7 @@ public interface ProactiveClientServiceGUI extends IProactiveClientServiceConnec
List
<
Location
>
getAllLocation
();
ByonNode
registerNewByonNode
(
ByonDefinition
byonNodeDefinition
,
String
jobId
);
ByonNode
registerNewByonNode
(
ByonDefinition
byonNodeDefinition
,
String
jobId
,
boolean
automate
);
List
<
ByonNode
>
getByonNodeList
(
String
jobId
);
...
...
gui-backend/src/main/java/eu/melodic/upperware/guibackend/communication/proactive/ProactiveClientServiceGUIImpl.java
View file @
2f5885b5
...
...
@@ -41,8 +41,8 @@ public class ProactiveClientServiceGUIImpl extends ProactiveClientServiceConnect
}
@Override
public
ByonNode
registerNewByonNode
(
ByonDefinition
byonNodeDefinition
,
String
jobId
)
{
return
getPAGateway
().
map
(
paGateway
->
paGateway
.
registerNewByonNode
(
byonNodeDefinition
,
jobId
)).
orElse
(
null
);
public
ByonNode
registerNewByonNode
(
ByonDefinition
byonNodeDefinition
,
String
jobId
,
boolean
automate
)
{
return
getPAGateway
().
map
(
paGateway
->
paGateway
.
registerNewByonNode
(
byonNodeDefinition
,
jobId
,
automate
)).
orElse
(
null
);
}
@Override
...
...
gui-backend/src/main/java/eu/melodic/upperware/guibackend/controller/byon/ByonController.java
View file @
2f5885b5
...
...
@@ -66,9 +66,10 @@ public class ByonController {
@PostMapping
(
"/proactive/{byonDefinitionId}"
)
@ResponseStatus
(
HttpStatus
.
CREATED
)
public
eu
.
passage
.
upperware
.
commons
.
model
.
byon
.
ByonNode
createByonNode
(
@PathVariable
(
value
=
"byonDefinitionId"
)
int
byonDefinitionId
,
@RequestParam
(
value
=
"applicationId"
)
String
applicationId
)
{
public
eu
.
passage
.
upperware
.
commons
.
model
.
byon
.
ByonNode
createByonNode
(
@PathVariable
(
value
=
"byonDefinitionId"
)
int
byonDefinitionId
,
@RequestParam
(
value
=
"applicationId"
)
String
applicationId
,
@RequestParam
(
value
=
"automate"
)
boolean
automate
)
{
log
.
info
(
"POST request for creating new byon node from byon definition with id {} and for application id {}"
,
byonDefinitionId
,
applicationId
);
final
eu
.
passage
.
upperware
.
commons
.
model
.
byon
.
ByonNode
byonNode
=
byonService
.
createByonNode
(
byonDefinitionId
,
applicationId
);
final
eu
.
passage
.
upperware
.
commons
.
model
.
byon
.
ByonNode
byonNode
=
byonService
.
createByonNode
(
byonDefinitionId
,
applicationId
,
automate
);
log
.
info
(
"Byon node with id {} successfully added to Proactive"
,
byonNode
.
getId
());
return
byonNode
;
}
...
...
gui-backend/src/main/java/eu/melodic/upperware/guibackend/service/byon/ByonService.java
View file @
2f5885b5
...
...
@@ -129,7 +129,7 @@ public class ByonService {
}
}
public
ByonNode
createByonNode
(
int
byonDefinitionId
,
String
applicationId
)
{
public
ByonNode
createByonNode
(
int
byonDefinitionId
,
String
applicationId
,
boolean
automate
)
{
ByonDefinition
byonDefinitionForNode
=
getByonDefList
(
true
).
orElseGet
(
ArrayList:
:
new
)
.
stream
()
.
filter
(
byonDefinition
->
byonDefinition
.
getId
()
==
byonDefinitionId
)
...
...
@@ -137,7 +137,7 @@ public class ByonService {
.
orElseThrow
(()
->
new
ByonDefinitionNotFoundException
(
byonDefinitionId
));
final
org
.
activeeon
.
morphemic
.
model
.
ByonDefinition
byonDefinitionProactive
=
byonMapper
.
mapByonDefinitionToProactive
(
byonDefinitionForNode
);
log
.
info
(
"LSZ DEV[ByonService]: createByonNode: byonDefinitionProactive={}"
,
byonDefinitionProactive
);
final
Optional
<
org
.
activeeon
.
morphemic
.
model
.
ByonNode
>
byonNodeProactive
=
Optional
.
ofNullable
(
proactiveClientServiceGUI
.
registerNewByonNode
(
byonDefinitionProactive
,
applicationId
));
final
Optional
<
org
.
activeeon
.
morphemic
.
model
.
ByonNode
>
byonNodeProactive
=
Optional
.
ofNullable
(
proactiveClientServiceGUI
.
registerNewByonNode
(
byonDefinitionProactive
,
applicationId
,
automate
));
log
.
info
(
"LSZ DEV[ByonService]: createByonNode: byonNodeProactive={}"
,
byonNodeProactive
);
ByonNode
byonNode
=
null
;
if
(
byonNodeProactive
.
isPresent
())
{
...
...
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