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
CHOReVOLUTION
choreospec
Commits
7f110ee6
Commit
7f110ee6
authored
Jun 07, 2017
by
Alessio Carenini
Browse files
Added DeploymentPolicy in Choreography
Added the possibility to omit ServiceGroup in Choreography
parent
552e83fa
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/eu/chorevolution/datamodel/Choreography.java
View file @
7f110ee6
...
...
@@ -31,6 +31,7 @@ import javax.xml.stream.XMLOutputFactory;
import
javax.xml.stream.XMLStreamException
;
import
eu.chorevolution.datamodel.deployment.DeploymentLocation
;
import
eu.chorevolution.datamodel.deployment.DeploymentPolicy
;
@XmlRootElement
public
class
Choreography
{
...
...
@@ -54,10 +55,13 @@ public class Choreography {
private
String
tenant
;
private
List
<
ServiceGroup
>
serviceGroups
;
private
List
<
ChoreographyService
>
services
;
private
StatusType
status
;
private
DeploymentLocation
location
;
private
DeploymentPolicy
policy
;
private
String
logServerUrl
;
...
...
@@ -130,4 +134,20 @@ public class Choreography {
this
.
logServerUrl
=
logServerUrl
;
}
public
List
<
ChoreographyService
>
getServices
()
{
return
services
;
}
public
void
setServices
(
List
<
ChoreographyService
>
services
)
{
this
.
services
=
services
;
}
public
DeploymentPolicy
getPolicy
()
{
return
policy
;
}
public
void
setPolicy
(
DeploymentPolicy
policy
)
{
this
.
policy
=
policy
;
}
}
src/main/java/eu/chorevolution/datamodel/deployment/DeploymentPolicy.java
0 → 100644
View file @
7f110ee6
/*
* Copyright 2016 The CHOReVOLUTION project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
eu.chorevolution.datamodel.deployment
;
public
class
DeploymentPolicy
{
private
boolean
ha
=
false
;
private
int
min_vm
=
1
;
private
int
max_vm
=
1
;
private
PolicyType
policy
=
PolicyType
.
ALL_IN_ONE_VM
;
public
boolean
isHa
()
{
return
ha
;
}
public
void
setHa
(
boolean
ha
)
{
this
.
ha
=
ha
;
}
public
int
getMin_vm
()
{
return
min_vm
;
}
public
void
setMin_vm
(
int
min_vm
)
{
this
.
min_vm
=
min_vm
;
}
public
int
getMax_vm
()
{
return
max_vm
;
}
public
void
setMax_vm
(
int
max_vm
)
{
this
.
max_vm
=
max_vm
;
}
public
PolicyType
getPolicy
()
{
return
policy
;
}
public
void
setPolicy
(
PolicyType
policy
)
{
this
.
policy
=
policy
;
}
}
src/main/java/eu/chorevolution/datamodel/deployment/PolicyType.java
0 → 100644
View file @
7f110ee6
/*
* Copyright 2016 The CHOReVOLUTION project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
eu.chorevolution.datamodel.deployment
;
import
javax.xml.bind.annotation.XmlEnum
;
@XmlEnum
(
String
.
class
)
public
enum
PolicyType
{
ONE_VM_PER_SERVICE
,
ALL_IN_ONE_VM
,
GROUP_CLUSTER
}
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