Change in ovirt-engine[master]: restapi: Introducing Scheduling Policy API
gchaplik at redhat.com
gchaplik at redhat.com
Wed Jun 11 13:21:37 UTC 2014
Gilad Chaplik has submitted this change and it was merged.
Change subject: restapi: Introducing Scheduling Policy API
......................................................................
restapi: Introducing Scheduling Policy API
Closing the gap from oVirt 3.3.
* Methods:
api/schedulingpolicies; add; POST; type: SchedulingPolicy; response: SchedulingPolicy
api/schedulingpolicies; get; GET; response: SchedulingPolicies
api/schedulingpolicies/{schedulingpolicie:id}; get; GET; response: SchedulingPolicy
api/schedulingpolicies/{schedulingpolicie:id}: update: PUT; type: SchedulingPolicy; response: SchedulingPolicy
api/schedulingpolicies/{schedulingpolicie:id}/balances: add: POST; type: BaseResource; response: BaseResource
api/schedulingpolicies/{schedulingpolicie:id}/balances: get: GET; response: Balances
api/schedulingpolicies/{schedulingpolicie:id}/balances/{balance:id}: delete: DELETE
api/schedulingpolicies/{schedulingpolicie:id}/balances/{balance:id}: get: GET; response: Balance
api/schedulingpolicies/{schedulingpolicie:id}/filters: add: POST; type: BaseResource; response: BaseResource
api/schedulingpolicies/{schedulingpolicie:id}/filters: get: GET; response: Filters
api/schedulingpolicies/{schedulingpolicie:id}/filters/{filter:id}: delete: DELETE
api/schedulingpolicies/{schedulingpolicie:id}/filters/{filter:id}: get: GET; response: Filter
api/schedulingpolicies/{schedulingpolicie:id}/weights: add: POST; type: BaseResource; response: BaseResource
api/schedulingpolicies/{schedulingpolicie:id}/weights: get: GET; response: Weights
api/schedulingpolicies/{schedulingpolicie:id}/weights/{weight:id}: delete: DELETE
api/schedulingpolicies/{schedulingpolicie:id}/weights/{weight:id}: get: GET; response: Weight
api/schedulingpolicyunits: get: GET; response: SchedulingPolicyUnits
api/schedulingpolicyunits/{schedulingpolicyunit:id}: delete: DELETE
api/schedulingpolicyunits/{schedulingpolicyunit:id}: get: GET; response: SchedulingPolicyUnit
* Elements (samples):
<scheduling_policy_unit type="load_balancing" href="/ovirt-engine/api/schedulingpolicyunits/d58c8e32-44e1-418f-9222-52cd887bf9e0" id="d58c8e32-44e1-418f-9222-52cd887bf9e0">
<name>OptimalForEvenGuestDistribution</name>
<description>Even VM count distribution policy</description>
<internal>true</internal>
<enabled>true</enabled>
<properties>
<property>
<name>HighVmCount</name>
<value>^([0-9]|[1-9][0-9]+)$</value>
</property>
<property>
<name>MigrationThreshold</name>
<value>^([2-9]|[1-9][0-9]+)$</value>
</property>
<property>
<name>SpmVmGrace</name>
<value>^([0-9]|[1-9][0-9]+)$</value>
</property>
</properties>
</scheduling_policy_unit>
<scheduling_policy href="/ovirt-engine/api/schedulingpolicies/8d5d7bec-68de-4a67-b53e-0ac54686d579" id="8d5d7bec-68de-4a67-b53e-0ac54686d579">
<name>vm_evenly_distributed</name>
<description/>
<link href="/ovirt-engine/api/schedulingpolicies/8d5d7bec-68de-4a67-b53e-0ac54686d579/filters" rel="filters"/>
<link href="/ovirt-engine/api/schedulingpolicies/8d5d7bec-68de-4a67-b53e-0ac54686d579/weights" rel="weights"/>
<link href="/ovirt-engine/api/schedulingpolicies/8d5d7bec-68de-4a67-b53e-0ac54686d579/balances" rel="balances"/>
<link href="/ovirt-engine/api/schedulingpolicies/8d5d7bec-68de-4a67-b53e-0ac54686d579/clusters" rel="clusters"/>
<locked>true</locked>
<default_policy>false</default_policy>
<properties>
<property>
<name>HighVmCount</name>
<value>10</value>
</property>
<property>
<name>MigrationThreshold</name>
<value>5</value>
</property>
<property>
<name>SpmVmGrace</name>
<value>5</value>
</property>
</properties>
</scheduling_policy>
<filters>
<filter id="84e6ddee-ab0d-42dd-82f0-c297779db566">
<scheduling_policy_unit href="/ovirt-engine/api/schedulingpolicyunits/84e6ddee-ab0d-42dd-82f0-c297779db566" id="84e6ddee-ab0d-42dd-82f0-c297779db566"/>
<position>0</position>
</filter>
...
</filters>
<cluster href="/ovirt-engine/api/clusters/00000001-0001-0001-0001-000000000086" id="00000001-0001-0001-0001-000000000086">
...
<scheduling_policy href="/ovirt-engine/api/schedulingpolicies/20d25257-b4bd-4589-92a6-c4c5c5d3fd1a" id="20d25257-b4bd-4589-92a6-c4c5c5d3fd1a">
<name>evenly_distributed</name>
<policy>evenly_distributed</policy>
<thresholds high="80" duration="120"/>
<properties>
<property>
<name>CpuOverCommitDurationMinutes</name>
<value>2</value>
</property>
<property>
<name>HighUtilization</name>
<value>80</value>
</property>
</properties>
</scheduling_policy>
...
</cluster>
Change-Id: I6c419f953a533e94d8be17cd9ba915ccd5a617a6
Bug-Url: https://bugzilla.redhat.com/1076705
Bug-Url: https://bugzilla.redhat.com/1071872
Signed-off-by: Gilad Chaplik <gchaplik at redhat.com>
---
A backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/model/PolicyUnitType.java
A backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/BalanceResource.java
A backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/BalancesResource.java
A backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/FilterResource.java
A backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/FiltersResource.java
A backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/PolicyUnitResource.java
A backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/PolicyUnitsResource.java
A backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/SchedulingPoliciesResource.java
A backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/SchedulingPolicyResource.java
A backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/SchedulingPolicyUnitResource.java
A backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/SchedulingPolicyUnitsResource.java
A backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/WeightResource.java
A backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/WeightsResource.java
M backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/utils/ApiRootLinksCreator.java
M backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/utils/LinkHelper.java
M backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/BackendApplication.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendBalanceResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendBalancesResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendCapabilitiesResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendFilterResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendFiltersResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendPolicyUnitResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendPolicyUnitsResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendSchedulingPoliciesResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendSchedulingPolicyResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendSchedulingPolicyUnitResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendSchedulingPolicyUnitsResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendWeightResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendWeightsResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/utils/FeaturesHelper.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendApiResourceTest.java
M backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/ClusterMapper.java
A backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/PolicyUnitMapper.java
A backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/SchedulingPolicyMapper.java
M backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/AbstractInvertibleMappingTest.java
M backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/ClusterMapperTest.java
A backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/PolicyUnitMapperTest.java
A backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/SchedulingBalanceMapperTest.java
A backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/SchedulingFilterMapperTest.java
A backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/SchedulingPolicyMapperTest.java
A backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/SchedulingWeightMapperTest.java
42 files changed, 1,543 insertions(+), 21 deletions(-)
Approvals:
Gilad Chaplik: Verified; Looks good to me, approved
--
To view, visit http://gerrit.ovirt.org/28093
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6c419f953a533e94d8be17cd9ba915ccd5a617a6
Gerrit-PatchSet: 9
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Gilad Chaplik <gchaplik at redhat.com>
Gerrit-Reviewer: Artyom Lukianov <alukiano at redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck at redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchaplik at redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Ori Liel <oliel at redhat.com>
Gerrit-Reviewer: Ravi Nori <rnori at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the Engine-commits
mailing list