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
68602594
Commit
68602594
authored
May 19, 2022
by
Jan Marchel
Browse files
adding Node Candidate type Edge and all things related to it
parent
1d234989
Pipeline
#21183
passed with stages
in 12 minutes and 15 seconds
Changes
4
Pipelines
4
Hide whitespace changes
Inline
Side-by-side
cp_generator/src/main/java/eu/paasage/upperware/profiler/generator/communication/impl/NodeCandidatesFetchingServiceImpl.java
View file @
68602594
...
...
@@ -123,7 +123,7 @@ public class NodeCandidatesFetchingServiceImpl implements NodeCandidatesFetching
if
(
nodeType
.
isPresent
())
{
result
.
add
(
createNodeTypeRequirement
(
Collections
.
singletonList
(
NodeType
.
valueOf
(
getValueAsString
(
nodeType
.
get
().
getValue
()))),
resourceName
));
}
else
{
result
.
add
(
createNodeTypeRequirement
(
Arrays
.
asList
(
NodeType
.
IAAS
,
NodeType
.
BYON
),
resourceName
));
result
.
add
(
createNodeTypeRequirement
(
Arrays
.
asList
(
NodeType
.
IAAS
,
NodeType
.
BYON
,
NodeType
.
EDGE
),
resourceName
));
}
getAttribute
(
requirementsMap
,
"totalMemoryHasMin"
).
ifPresent
(
attribute
->
result
.
add
(
createRequirement
(
HARDWARE_CLASS
,
"ram"
,
RequirementOperator
.
GEQ
,
getValueAsString
(
attribute
.
getValue
()))));
...
...
cp_generator/src/main/java/eu/paasage/upperware/profiler/generator/communication/impl/NodeType.java
View file @
68602594
...
...
@@ -2,6 +2,6 @@ package eu.paasage.upperware.profiler.generator.communication.impl;
public
enum
NodeType
{
IAAS
,
PAAS
,
FAAS
,
BYON
IAAS
,
PAAS
,
FAAS
,
BYON
,
EDGE
}
melodic-commons/src/main/java/eu/passage/upperware/commons/model/edge/EdgeNode.java
View file @
68602594
package
eu.passage.upperware.commons.model.edge
;
import
com.fasterxml.jackson.annotation.JsonAnyGetter
;
import
com.fasterxml.jackson.annotation.JsonAnySetter
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
eu.passage.upperware.commons.model.internal.IpAddress
;
import
eu.passage.upperware.commons.model.internal.LoginCredential
;
...
...
@@ -11,14 +8,9 @@ import lombok.Data;
import
lombok.NoArgsConstructor
;
import
lombok.ToString
;
import
lombok.experimental.SuperBuilder
;
import
org.activeeon.morphemic.model.NodeCandidate
;
import
org.hibernate.annotations.GenericGenerator
;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Data
@NoArgsConstructor
...
...
@@ -36,7 +28,7 @@ public class EdgeNode implements Serializable {
@JsonProperty
(
"loginCredential"
)
private
LoginCredential
loginCredential
;
@JsonProperty
(
"ipAddresses"
)
private
List
<
IpAddress
>
ipAddresses
;
private
List
<
IpAddress
>
ipAddresses
=
null
;
@JsonProperty
(
"nodeProperties"
)
private
NodeProperties
nodeProperties
;
@JsonProperty
(
"reason"
)
...
...
utility-generator/src/main/java/eu/melodic/upperware/utilitygenerator/node_candidates/NodeCandidatesConverter.java
View file @
68602594
...
...
@@ -102,7 +102,8 @@ public class NodeCandidatesConverter implements ArgumentConverter {
if
(
NodeCandidate
.
NodeCandidateTypeEnum
.
FAAS
.
equals
(
nodeCandidate
.
getNodeCandidateType
()))
{
return
nodeCandidate
.
getPricePerInvocation
();
}
else
if
(
NodeCandidate
.
NodeCandidateTypeEnum
.
IAAS
.
equals
(
nodeCandidate
.
getNodeCandidateType
())
||
NodeCandidate
.
NodeCandidateTypeEnum
.
BYON
.
equals
(
nodeCandidate
.
getNodeCandidateType
()))
{
NodeCandidate
.
NodeCandidateTypeEnum
.
BYON
.
equals
(
nodeCandidate
.
getNodeCandidateType
())
||
NodeCandidate
.
NodeCandidateTypeEnum
.
EDGE
.
equals
(
nodeCandidate
.
getNodeCandidateType
()))
{
return
nodeCandidate
.
getPrice
();
}
else
{
throw
new
IllegalStateException
(
"Type of Node Candidate: "
+
nodeCandidate
.
getNodeCandidateType
()
+
"is not supported"
);
...
...
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