Noam Slomianko has uploaded a new change for review.
Change subject: engine: add comment field to Cluster [2]
......................................................................
engine: add comment field to Cluster [2]
As part of the Free Text RFE
Added to the entities flow in the system
DB <-> DAO <-> Entity <-> Model <-> UI
DB <-> DAO <-> Entity <-> REST
Change-Id: Id3c150cdd66662147070791c85a3c9df59548253
Signed-off-by: Noam Slomianko <[email protected]>
---
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDSGroup.java
M
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsGroupDAODbFacadeImpl.java
M
backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml
M
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/ClusterMapper.java
M
backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/ClusterMapperTest.java
M
backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/ClusterConditionFieldAutoCompleter.java
M
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Cloner.java
M
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterListModel.java
M
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterModel.java
M
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterGuideModel.java
M
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java
M
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.java
M
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.ui.xml
M
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabClusterView.java
M
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabDataCenterView.java
M packaging/dbscripts/create_views.sql
A packaging/dbscripts/upgrade/03_03_0400_add_comment_vds_groups.sql
M packaging/dbscripts/vds_groups_sp.sql
18 files changed, 59 insertions(+), 11 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/09/16609/1
diff --git
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDSGroup.java
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDSGroup.java
index ff302f6..5cd50c1 100644
---
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDSGroup.java
+++
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDSGroup.java
@@ -14,7 +14,8 @@
import org.ovirt.engine.core.compat.Version;
@ValidVdsGroup(groups = { CreateEntity.class })
-public class VDSGroup extends IVdcQueryable implements Serializable,
BusinessEntity<Guid>, HasStoragePool<Guid>, Nameable {
+
+public class VDSGroup extends IVdcQueryable implements Serializable,
BusinessEntity<Guid>, HasStoragePool<Guid>, Nameable, Commented {
private static final long serialVersionUID = 5659359762655478095L;
@@ -31,6 +32,8 @@
@Size(max = BusinessEntitiesDefinitions.GENERAL_MAX_SIZE)
private String description;
+
+ private String comment;
@Size(max = BusinessEntitiesDefinitions.CLUSTER_CPU_NAME_SIZE)
private String cpu_name;
@@ -118,6 +121,14 @@
description = value;
}
+ public String getComment() {
+ return comment;
+ }
+
+ public void setComment(String value) {
+ comment = value;
+ }
+
public String getcpu_name() {
return this.cpu_name;
}
diff --git
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsGroupDAODbFacadeImpl.java
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsGroupDAODbFacadeImpl.java
index c7b27bf..3aa558f 100644
---
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsGroupDAODbFacadeImpl.java
+++
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsGroupDAODbFacadeImpl.java
@@ -146,6 +146,7 @@
MapSqlParameterSource parameterSource =
getCustomMapSqlParameterSource()
.addValue("description", group.getdescription())
.addValue("name", group.getName())
+ .addValue("free_text_comment", group.getComment())
.addValue("vds_group_id", group.getId())
.addValue("cpu_name", group.getcpu_name())
.addValue("selection_algorithm",
group.getselection_algorithm())
@@ -181,6 +182,7 @@
entity.setdescription(rs.getString("description"));
entity.setName(rs.getString("name"));
entity.setId(getGuidDefaultEmpty(rs, "vds_group_id"));
+ entity.setComment(rs.getString("free_text_comment"));
entity.setcpu_name(rs.getString("cpu_name"));
entity.setselection_algorithm(VdsSelectionAlgorithm.forValue(rs
.getInt("selection_algorithm")));
diff --git
a/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml
b/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml
index dbb0ad2..167e2d6 100644
---
a/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml
+++
b/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml
@@ -1073,7 +1073,7 @@
parameterType: Cluster
signatures:
- mandatoryArguments: {}
- optionalArguments: {cluster.name: 'xs:string', cluster.description:
'xs:string', cluster.data_center.id: 'xs:string', cluster.cpu.id: 'xs:string',
cluster.version.major: 'xs:int', cluster.version.minor: 'xs:int',
+ optionalArguments: {cluster.name: 'xs:string', cluster.description:
'xs:string', cluster.comment: 'xs:string', cluster.data_center.id: 'xs:string',
cluster.cpu.id: 'xs:string', cluster.version.major: 'xs:int',
cluster.version.minor: 'xs:int',
cluster.memory_policy.overcommit.percent: 'xs:double',
cluster.memory_policy.transparent_hugepages.enabled: 'xs:boolean',
cluster.scheduling_policy.policy: 'xs:string',
cluster.scheduling_policy.thresholds.low: 'xs:int',
cluster.scheduling_policy.thresholds.high: 'xs:int',
cluster.scheduling_policy.thresholds.duration: 'xs:int',
cluster.error_handling.on_error: 'xs:string', cluster.virt_service:
'xs:boolean', cluster.gluster_service: 'xs:boolean', cluster.threads_as_cores:
'xs:boolean', cluster.tunnel_migration: 'xs:boolean'}
@@ -1087,7 +1087,7 @@
parameterType: Cluster
signatures:
- mandatoryArguments: {cluster.data_center.id|name: 'xs:string',
cluster.name: 'xs:string', cluster.version.major: 'xs:int',
cluster.version.minor: 'xs:int', cluster.cpu.id: 'xs:string'}
- optionalArguments: {cluster.description: 'xs:string',
cluster.memory_policy.overcommit.percent: 'xs:double',
cluster.memory_policy.transparent_hugepages.enabled: 'xs:boolean',
+ optionalArguments: {cluster.description: 'xs:string', cluster.comment:
'xs:string', cluster.memory_policy.overcommit.percent: 'xs:double',
cluster.memory_policy.transparent_hugepages.enabled: 'xs:boolean',
cluster.scheduling_policy.policy: 'xs:string',
cluster.scheduling_policy.thresholds.low: 'xs:int',
cluster.scheduling_policy.thresholds.high: 'xs:int',
cluster.scheduling_policy.thresholds.duration: 'xs:int',
cluster.error_handling.on_error: 'xs:string', cluster.virt_service:
'xs:boolean', cluster.gluster_service: 'xs:boolean', cluster.threads_as_cores:
'xs:boolean',
cluster.tunnel_migration: 'xs:boolean', cluster.trusted_service:
'xs:boolean'}
diff --git
a/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/ClusterMapper.java
b/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/ClusterMapper.java
index dd1b521..18ea6d7 100644
---
a/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/ClusterMapper.java
+++
b/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/ClusterMapper.java
@@ -36,6 +36,9 @@
if (model.isSetDescription()) {
entity.setdescription(model.getDescription());
}
+ if (model.isSetComment()) {
+ entity.setComment(model.getComment());
+ }
if (model.isSetCpu() && model.getCpu().isSetId()) {
entity.setcpu_name(model.getCpu().getId());
}
@@ -81,6 +84,7 @@
model.setId(entity.getId().toString());
model.setName(entity.getName());
model.setDescription(entity.getdescription());
+ model.setComment(entity.getComment());
if (entity.getcpu_name() != null) {
CPU cpu = new CPU();
cpu.setId(entity.getcpu_name());
diff --git
a/backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/ClusterMapperTest.java
b/backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/ClusterMapperTest.java
index d130487..2ea1a4a 100644
---
a/backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/ClusterMapperTest.java
+++
b/backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/ClusterMapperTest.java
@@ -34,6 +34,7 @@
assertEquals(model.getName(), transform.getName());
assertEquals(model.getId(), transform.getId());
assertEquals(model.getDescription(), transform.getDescription());
+ assertEquals(model.getComment(), transform.getComment());
assertNotNull(transform.getCpu());
assertEquals(model.getCpu().getId(), transform.getCpu().getId());
assertNotNull(transform.getDataCenter());
diff --git
a/backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/ClusterConditionFieldAutoCompleter.java
b/backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/ClusterConditionFieldAutoCompleter.java
index cf3d180..99bac0e 100644
---
a/backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/ClusterConditionFieldAutoCompleter.java
+++
b/backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/ClusterConditionFieldAutoCompleter.java
@@ -6,6 +6,7 @@
// Building the basic vervs Dict
mVerbs.add("NAME");
mVerbs.add("DESCRIPTION");
+ mVerbs.add("COMMENT");
mVerbs.add("INITIALIZED");
// Building the autoCompletion Dict
@@ -13,11 +14,13 @@
// Building the types dict
getTypeDictionary().put("NAME", String.class);
getTypeDictionary().put("DESCRIPTION", String.class);
+ getTypeDictionary().put("COMMENT", String.class);
getTypeDictionary().put("INITIALIZED", Boolean.class);
// building the ColumnName Dict
columnNameDict.put("NAME", "name");
columnNameDict.put("DESCRIPTION", "description");
+ columnNameDict.put("COMMENT", "free_text_comment");
// mColumnNameDict.put("INITIALIZED", "is_initialized");
// Building the validation dict
diff --git
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Cloner.java
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Cloner.java
index c7b4f13..c9f3015 100644
---
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Cloner.java
+++
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Cloner.java
@@ -260,6 +260,7 @@
obj.setId(instance.getId());
obj.setName(instance.getName());
obj.setdescription(instance.getdescription());
+ obj.setComment(instance.getComment());
obj.setcpu_name(instance.getcpu_name());
obj.setselection_algorithm(instance.getselection_algorithm());
diff --git
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterListModel.java
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterListModel.java
index d49afd5..aa429a6 100644
---
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterListModel.java
+++
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterListModel.java
@@ -630,6 +630,7 @@
cluster.setName((String) model.getName().getEntity());
cluster.setdescription((String) model.getDescription().getEntity());
+ cluster.setComment((String) model.getComment().getEntity());
cluster.setStoragePoolId(((StoragePool)
model.getDataCenter().getSelectedItem()).getId());
if (model.getCPU().getSelectedItem() != null)
{
diff --git
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterModel.java
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterModel.java
index 70919ed..5bea985 100644
---
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterModel.java
+++
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterModel.java
@@ -154,6 +154,18 @@
privateDescription = value;
}
+ private EntityModel privateComment;
+
+ public EntityModel getComment()
+ {
+ return privateComment;
+ }
+
+ public void setComment(EntityModel value)
+ {
+ privateComment = value;
+ }
+
private ListModel privateDataCenter;
public ListModel getDataCenter()
@@ -589,6 +601,7 @@
setIsEdit(isEdit);
setName(new EntityModel());
setDescription(new EntityModel());
+ setComment(new EntityModel());
setClusterPolicyModel(new ClusterPolicyModel());
setAllowClusterWithVirtGlusterEnabled(true);
AsyncDataProvider.getAllowClusterWithVirtGlusterEnabled(new
AsyncQuery(this, new INewAsyncCallback() {
@@ -894,6 +907,7 @@
private void postInit()
{
getDescription().setEntity(getEntity().getdescription());
+ getComment().setEntity(getEntity().getComment());
setMemoryOverCommit(getEntity().getmax_vds_memory_over_commit());
getCountThreadsAsCores().setEntity(getEntity().getCountThreadsAsCores());
diff --git
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterGuideModel.java
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterGuideModel.java
index 1c430bb..a75144e 100644
---
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterGuideModel.java
+++
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterGuideModel.java
@@ -1377,6 +1377,7 @@
cluster.setName((String) model.getName().getEntity());
cluster.setdescription((String) model.getDescription().getEntity());
+ cluster.setComment((String) model.getComment().getEntity());
cluster.setStoragePoolId(((StoragePool)
model.getDataCenter().getSelectedItem()).getId());
if (model.getCPU().getSelectedItem() != null)
{
diff --git
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java
index 3a0bf3c..b2b0d25 100644
---
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java
+++
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java
@@ -987,9 +987,6 @@
@DefaultStringValue("Description")
String descriptionDc();
- @DefaultStringValue("Comment")
- String commentDc();
-
// Storage DC
@DefaultStringValue("Domain Status in Data-Center")
String domainStatusInDcStorageDc();
diff --git
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.java
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.java
index 90e9eb0..880c1d9 100644
---
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.java
+++
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.java
@@ -98,6 +98,11 @@
@WithElementId
EntityModelTextBoxEditor descriptionEditor;
+ @UiField
+ @Path(value = "comment.entity")
+ @WithElementId
+ EntityModelTextBoxEditor commentEditor;
+
@UiField(provided = true)
@Path(value = "cPU.selectedItem")
@WithElementId
@@ -346,6 +351,7 @@
dataCenterEditor.setLabel(constants.clusterPopupDataCenterLabel());
nameEditor.setLabel(constants.clusterPopupNameLabel());
descriptionEditor.setLabel(constants.clusterPopupDescriptionLabel());
+ commentEditor.setLabel(constants.commentLabel());
cPUEditor.setLabel(constants.clusterPopupCPULabel());
versionEditor.setLabel(constants.clusterPopupVersionLabel());
enableOvirtServiceEditor.setLabel(constants.clusterEnableOvirtServiceLabel());
diff --git
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.ui.xml
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.ui.xml
index 399955b..4917373 100644
---
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.ui.xml
+++
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterPopupView.ui.xml
@@ -143,6 +143,7 @@
</g:FlowPanel>
<e:EntityModelTextBoxEditor ui:field="nameEditor" />
<e:EntityModelTextBoxEditor ui:field="descriptionEditor" />
+
<e:EntityModelTextBoxEditor ui:field="commentEditor" />
<e:ListModelListBoxEditor ui:field="cPUEditor" />
<e:ListModelListBoxEditor ui:field="versionEditor" />
<g:VerticalPanel ui:field="servicesCheckboxPanel">
diff --git
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabClusterView.java
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabClusterView.java
index ba56dba..886274c 100644
---
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabClusterView.java
+++
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabClusterView.java
@@ -20,6 +20,7 @@
import org.ovirt.engine.ui.webadmin.widget.action.WebAdminButtonDefinition;
import
org.ovirt.engine.ui.webadmin.widget.action.WebAdminImageButtonDefinition;
import
org.ovirt.engine.ui.webadmin.widget.action.WebAdminMenuBarButtonDefinition;
+import org.ovirt.engine.ui.webadmin.widget.table.column.CommentColumn;
import com.google.gwt.core.client.GWT;
import com.google.inject.Inject;
@@ -86,6 +87,8 @@
getTable().addColumn(cpuNameColumn, constants.cpuNameCluster(),
"150px"); //$NON-NLS-1$
}
+ getTable().addColumn(new CommentColumn<VDSGroup>(),
constants.commentLabel(), "100px"); //$NON-NLS-1$
+
getTable().addActionButton(new
WebAdminButtonDefinition<VDSGroup>(constants.newCluster()) {
@Override
protected UICommand resolveCommand() {
diff --git
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabDataCenterView.java
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabDataCenterView.java
index 509fa0f..0f07b4e 100644
---
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabDataCenterView.java
+++
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabDataCenterView.java
@@ -88,7 +88,7 @@
};
getTable().addColumn(descColumn, constants.descriptionDc(), "300px");
//$NON-NLS-1$
- getTable().addColumn(new CommentColumn<StoragePool>(),
constants.commentDc(), "80px"); //$NON-NLS-1$
+ getTable().addColumn(new CommentColumn<StoragePool>(),
constants.commentLabel(), "100px"); //$NON-NLS-1$
getTable().addActionButton(new
WebAdminButtonDefinition<StoragePool>(constants.newDC()) {
@Override
diff --git a/packaging/dbscripts/create_views.sql
b/packaging/dbscripts/create_views.sql
index 587d90e..a1293fe 100644
--- a/packaging/dbscripts/create_views.sql
+++ b/packaging/dbscripts/create_views.sql
@@ -907,7 +907,7 @@
CREATE OR REPLACE VIEW vds_groups_storage_domain
AS
-SELECT vds_groups.vds_group_id, vds_groups.name, vds_groups.description,
vds_groups.cpu_name, vds_groups._create_date,
+SELECT vds_groups.vds_group_id, vds_groups.name, vds_groups.description,
vds_groups.free_text_comment, vds_groups.cpu_name, vds_groups._create_date,
vds_groups._update_date, vds_groups.selection_algorithm,
vds_groups.high_utilization, vds_groups.low_utilization,
vds_groups.cpu_over_commit_duration_minutes,
vds_groups.storage_pool_id,
vds_groups.max_vds_memory_over_commit,
vds_groups.count_threads_as_cores, vds_groups.compatibility_version,
diff --git a/packaging/dbscripts/upgrade/03_03_0400_add_comment_vds_groups.sql
b/packaging/dbscripts/upgrade/03_03_0400_add_comment_vds_groups.sql
new file mode 100644
index 0000000..4418f19
--- /dev/null
+++ b/packaging/dbscripts/upgrade/03_03_0400_add_comment_vds_groups.sql
@@ -0,0 +1 @@
+select fn_db_add_column('vds_groups', 'free_text_comment', 'text');
diff --git a/packaging/dbscripts/vds_groups_sp.sql
b/packaging/dbscripts/vds_groups_sp.sql
index abf45ae..4876d92 100644
--- a/packaging/dbscripts/vds_groups_sp.sql
+++ b/packaging/dbscripts/vds_groups_sp.sql
@@ -10,6 +10,7 @@
Create or replace FUNCTION InsertVdsGroups(
v_vds_group_id UUID,
v_description VARCHAR(4000),
+ v_free_text_comment text,
v_name VARCHAR(40),
v_cpu_name VARCHAR(255),
v_selection_algorithm INTEGER,
@@ -30,10 +31,10 @@
RETURNS VOID
AS $procedure$
BEGIN
- INSERT INTO vds_groups(vds_group_id,description, name, cpu_name,
selection_algorithm, high_utilization, low_utilization,
+ INSERT INTO vds_groups(vds_group_id,description, name,
free_text_comment, cpu_name, selection_algorithm, high_utilization,
low_utilization,
cpu_over_commit_duration_minutes, storage_pool_id,
max_vds_memory_over_commit, count_threads_as_cores, compatibility_version,
transparent_hugepages, migrate_on_error, virt_service, gluster_service,
tunnel_migration, emulated_machine, trusted_service)
- VALUES(v_vds_group_id,v_description, v_name, v_cpu_name,
v_selection_algorithm, v_high_utilization, v_low_utilization,
+ VALUES(v_vds_group_id,v_description, v_name, v_free_text_comment,
v_cpu_name, v_selection_algorithm, v_high_utilization, v_low_utilization,
v_cpu_over_commit_duration_minutes, v_storage_pool_id,
v_max_vds_memory_over_commit, v_count_threads_as_cores, v_compatibility_version,
v_transparent_hugepages, v_migrate_on_error, v_virt_service,
v_gluster_service, v_tunnel_migration, v_emulated_machine, v_trusted_service);
END; $procedure$
@@ -44,6 +45,7 @@
Create or replace FUNCTION UpdateVdsGroup(v_description VARCHAR(4000) ,
+ v_free_text_comment text,
v_name VARCHAR(40),
v_vds_group_id UUID,
v_cpu_name VARCHAR(255) ,
@@ -68,7 +70,7 @@
AS $procedure$
BEGIN
UPDATE vds_groups
- SET description = v_description,name = v_name,cpu_name =
v_cpu_name,selection_algorithm = v_selection_algorithm,
+ SET description = v_description, free_text_comment =
v_free_text_comment, name = v_name,cpu_name = v_cpu_name,selection_algorithm =
v_selection_algorithm,
high_utilization = v_high_utilization,
low_utilization = v_low_utilization,cpu_over_commit_duration_minutes =
v_cpu_over_commit_duration_minutes,
storage_pool_id = v_storage_pool_id,_update_date = LOCALTIMESTAMP,
--
To view, visit http://gerrit.ovirt.org/16609
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id3c150cdd66662147070791c85a3c9df59548253
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Noam Slomianko <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches