Frank Kobzik has uploaded a new change for review. Change subject: core: Allow enabling/disabling SSO ......................................................................
core: Allow enabling/disabling SSO This small feature allows controlling SSO per VM. Changes: - new attribute of VM/Template/Pool SsoMethod - SsoMethod is an enum that describes which sso method will be used (for now only two options are possible [disable sso/use guest agent]). In future this can be extended. Default sso method is to use guest agent. Change-Id: I175ecd61c35b8354706d6dedda1e211bf2400c54 Signed-off-by: Frantisek Kobzik <[email protected]> Bug-Url: https://bugzilla.redhat.com/758946 --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmTemplateHandler.java A backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/SsoMethod.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmBase.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/AbstractVmRowMapper.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAODbFacadeImpl.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmStaticDAODbFacadeImpl.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAODbFacadeImpl.java M backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java M backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfWriter.java M packaging/dbscripts/create_views.sql A packaging/dbscripts/upgrade/03_04_0010_add_sso_method_to_vm_static.sql M packaging/dbscripts/vm_templates_sp.sql M packaging/dbscripts/vms_sp.sql 17 files changed, 90 insertions(+), 11 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/19/19619/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java index 3ed7e4f..00dcc22 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java @@ -408,6 +408,7 @@ getParameters().getMasterVm().getVmType(), getParameters().getMasterVm().isSmartcardEnabled(), getParameters().getMasterVm().isDeleteProtected(), + getParameters().getMasterVm().getSsoMethod(), getParameters().getMasterVm().getTunnelMigration(), getParameters().getMasterVm().getVncKeyboardLayout(), getParameters().getMasterVm().getMinAllocatedMem(), diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmTemplateHandler.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmTemplateHandler.java index 6e35ff8..9de98ef 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmTemplateHandler.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmTemplateHandler.java @@ -36,7 +36,7 @@ "isoPath", "diskImageMap", "defaultDisplayType", "priority", "autoStartup", "stateless", "initrdUrl", "kernelUrl", "kernelParams", "images", "interfaces", "quotaId", "quotaName", "quotaEnforcementType", "migrationSupport", "dedicatedVmForVds", "smartcardEnabled","dbGeneration", "deleteProtected", - "quotaDefault", "tunnelMigration", "vncKeyboardLayout", "runAndPause", "singleQxlPci", "cpuShares", "vmType" + "quotaDefault", "tunnelMigration", "vncKeyboardLayout", "runAndPause", "singleQxlPci", "cpuShares", "vmType", "ssoMethod" }); } diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/SsoMethod.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/SsoMethod.java new file mode 100644 index 0000000..1e520f8 --- /dev/null +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/SsoMethod.java @@ -0,0 +1,27 @@ +package org.ovirt.engine.core.common.businessentities; + +public enum SsoMethod { + NONE("none"), + GUEST_AGENT("guest_agent"); + + private final String value; + + SsoMethod(String value) { + this.value = value; + } + + public static SsoMethod fromString(String val) { + for (SsoMethod ssoMethod : SsoMethod.values()) { + if (ssoMethod.value.equals(val)) { + return ssoMethod; + } + } + + return null; + } + + @Override + public String toString() { + return value; + } +} diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java index e96c672..80abd82 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java @@ -335,6 +335,14 @@ return vmStatic.isDeleteProtected(); } + public void setSsoMethod(SsoMethod ssoMethod) { + vmStatic.setSsoMethod(ssoMethod); + } + + public SsoMethod getSsoMethod() { + return vmStatic.getSsoMethod(); + } + public String getVncKeyboardLayout() { return vmStatic.getVncKeyboardLayout(); } diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmBase.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmBase.java index b96f0d6..f5cc153 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmBase.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmBase.java @@ -115,6 +115,9 @@ @EditableField private boolean deleteProtected; + @EditableOnVmStatusField + private SsoMethod ssoMethod; + @EditableField private long dbGeneration; @@ -255,6 +258,7 @@ Guid quotaId, boolean smartcardEnabled, boolean deleteProtected, + SsoMethod ssoMethod, Boolean tunnelMigration, String vncKeyboardLayout, int minAllocatedMem, @@ -290,6 +294,7 @@ this.initrdUrl = initrdUrl; this.smartcardEnabled = smartcardEnabled; this.deleteProtected = deleteProtected; + this.ssoMethod = ssoMethod; this.tunnelMigration = tunnelMigration; this.vncKeyboardLayout = vncKeyboardLayout; this.minAllocatedMem = minAllocatedMem; @@ -798,4 +803,12 @@ public void setCpuShares(int cpuShares) { this.cpuShares = cpuShares; } + + public SsoMethod getSsoMethod() { + return ssoMethod; + } + + public void setSsoMethod(SsoMethod ssoMethod) { + this.ssoMethod = ssoMethod; + } } diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java index da8e1f5..6aef00f 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java @@ -86,6 +86,7 @@ vmStatic.getQuotaId(), vmStatic.isSmartcardEnabled(), vmStatic.isDeleteProtected(), + vmStatic.getSsoMethod(), vmStatic.getTunnelMigration(), vmStatic.getVncKeyboardLayout(), vmStatic.getMinAllocatedMem(), diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java index da366ab..0cd28da 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java @@ -62,8 +62,9 @@ int numOfSockets, int cpuPerSocket, int osId, Guid vdsGroupId, Guid vmtGuid, String domain, int numOfMonitors, boolean singleQxlPci, int status, int usbPolicy, String timeZone, int niceLevel, int cpuShares, boolean failBack, BootSequence defaultBootSequence, VmType vmType, - boolean smartcardEnabled, boolean deleteProtected, Boolean tunnelMigration, String vncKeyboardLayout, - int minAllocatedMem, boolean stateless, boolean runAndPause, Guid createdByUserId) { + boolean smartcardEnabled, boolean deleteProtected, SsoMethod ssoMethod, Boolean tunnelMigration, + String vncKeyboardLayout, int minAllocatedMem, boolean stateless, boolean runAndPause, + Guid createdByUserId) { super( vmtGuid, vdsGroupId, @@ -95,6 +96,7 @@ null, smartcardEnabled, deleteProtected, + ssoMethod, tunnelMigration, vncKeyboardLayout, minAllocatedMem, diff --git a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/AbstractVmRowMapper.java b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/AbstractVmRowMapper.java index a394c8d..bf110a6 100644 --- a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/AbstractVmRowMapper.java +++ b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/AbstractVmRowMapper.java @@ -5,6 +5,7 @@ import org.ovirt.engine.core.common.businessentities.BootSequence; import org.ovirt.engine.core.common.businessentities.OriginType; +import org.ovirt.engine.core.common.businessentities.SsoMethod; import org.ovirt.engine.core.common.businessentities.UsbPolicy; import org.ovirt.engine.core.common.businessentities.VmBase; import org.ovirt.engine.core.common.businessentities.VmType; @@ -42,6 +43,7 @@ entity.setInitrdUrl(rs.getString("initrd_url")); entity.setSmartcardEnabled(rs.getBoolean("is_smartcard_enabled")); entity.setDeleteProtected(rs.getBoolean("is_delete_protected")); + entity.setSsoMethod(SsoMethod.fromString(rs.getString("sso_method"))); entity.setTunnelMigration((Boolean) rs.getObject("tunnel_migration")); entity.setVncKeyboardLayout(rs.getString("vnc_keyboard_layout")); entity.setRunAndPause(rs.getBoolean("is_run_and_pause")); diff --git a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAODbFacadeImpl.java b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAODbFacadeImpl.java index 23928db..6393564 100644 --- a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAODbFacadeImpl.java +++ b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAODbFacadeImpl.java @@ -14,6 +14,7 @@ import org.ovirt.engine.core.common.businessentities.OriginType; import org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum; import org.ovirt.engine.core.common.businessentities.SessionState; +import org.ovirt.engine.core.common.businessentities.SsoMethod; import org.ovirt.engine.core.common.businessentities.UsbPolicy; import org.ovirt.engine.core.common.businessentities.VM; import org.ovirt.engine.core.common.businessentities.VMStatus; @@ -320,6 +321,7 @@ entity.setStateless(rs.getBoolean("is_stateless")); entity.setSmartcardEnabled(rs.getBoolean("is_smartcard_enabled")); entity.setDeleteProtected(rs.getBoolean("is_delete_protected")); + entity.setSsoMethod(SsoMethod.fromString(rs.getString("sso_method"))); entity.setDedicatedVmForVds(getGuid(rs, "dedicated_vm_for_vds")); entity.setFailBack(rs.getBoolean("fail_back")); entity.setLastVdsRunOn(getGuid(rs, "last_vds_run_on")); diff --git a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmStaticDAODbFacadeImpl.java b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmStaticDAODbFacadeImpl.java index 021e4a8..51c8610 100644 --- a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmStaticDAODbFacadeImpl.java +++ b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmStaticDAODbFacadeImpl.java @@ -62,6 +62,7 @@ .addValue("is_stateless", vm.isStateless()) .addValue("is_smartcard_enabled", vm.isSmartcardEnabled()) .addValue("is_delete_protected", vm.isDeleteProtected()) + .addValue("sso_method", vm.getSsoMethod().toString()) .addValue("dedicated_vm_for_vds", vm.getDedicatedVmForVds()) .addValue("fail_back", vm.isFailBack()) .addValue("vm_type", vm.getVmType()) diff --git a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAODbFacadeImpl.java b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAODbFacadeImpl.java index 2ab8415..accff66 100644 --- a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAODbFacadeImpl.java +++ b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAODbFacadeImpl.java @@ -155,6 +155,7 @@ .addValue("is_stateless", template.isStateless()) .addValue("is_smartcard_enabled", template.isSmartcardEnabled()) .addValue("is_delete_protected", template.isDeleteProtected()) + .addValue("sso_method", template.getSsoMethod().toString()) .addValue("iso_path", template.getIsoPath()) .addValue("origin", template.getOrigin()) .addValue("initrd_url", template.getInitrdUrl()) diff --git a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java index 67292a7..3ed875e 100644 --- a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java +++ b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java @@ -14,6 +14,7 @@ import org.ovirt.engine.core.common.businessentities.DisplayType; import org.ovirt.engine.core.common.businessentities.ImageStatus; import org.ovirt.engine.core.common.businessentities.OriginType; +import org.ovirt.engine.core.common.businessentities.SsoMethod; import org.ovirt.engine.core.common.businessentities.VmBase; import org.ovirt.engine.core.common.businessentities.VmDevice; import org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType; @@ -434,6 +435,13 @@ } } + node = content.SelectSingleNode("SsoMethod"); + if (node != null) { + if (!StringUtils.isEmpty(node.InnerText)) { + vmBase.setSsoMethod(SsoMethod.fromString(node.InnerText)); + } + } + node = content.SelectSingleNode("TunnelMigration"); if (node != null) { if (!StringUtils.isEmpty(node.InnerText)) { diff --git a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfWriter.java b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfWriter.java index 31f124d..74adca7 100644 --- a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfWriter.java +++ b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfWriter.java @@ -210,6 +210,10 @@ _writer.WriteRaw(String.valueOf(vmBase.isDeleteProtected())); _writer.WriteEndElement(); + _writer.WriteStartElement("SsoMethod"); + _writer.WriteRaw(vmBase.getSsoMethod().toString()); + _writer.WriteEndElement(); + _writer.WriteStartElement("IsSmartcardEnabled"); _writer.WriteRaw(String.valueOf(vmBase.isSmartcardEnabled())); _writer.WriteEndElement(); diff --git a/packaging/dbscripts/create_views.sql b/packaging/dbscripts/create_views.sql index ddc1331..b7aa468 100644 --- a/packaging/dbscripts/create_views.sql +++ b/packaging/dbscripts/create_views.sql @@ -375,6 +375,7 @@ vm_templates.is_stateless as is_stateless, vm_templates.is_smartcard_enabled as is_smartcard_enabled, vm_templates.is_delete_protected as is_delete_protected, + vm_templates.sso_method as sso_method, vm_templates.iso_path as iso_path, vm_templates.origin as origin, vm_templates.initrd_url as initrd_url, @@ -540,10 +541,11 @@ AS SELECT vm_static.vm_name as vm_name, vm_static.mem_size_mb as vm_mem_size_mb, vm_static.nice_level as nice_level, vm_static.cpu_shares as cpu_shares, vm_static.vmt_guid as vmt_guid, vm_static.os as vm_os, vm_static.description as vm_description, vm_static.free_text_comment as vm_comment, vm_static.vds_group_id as vds_group_id, - vm_static.domain as vm_domain, vm_static.creation_date as vm_creation_date, vm_static.auto_startup as auto_startup, vm_static.is_stateless as is_stateless, vm_static.is_smartcard_enabled as is_smartcard_enabled, vm_static.is_delete_protected as is_delete_protected, vm_static.dedicated_vm_for_vds as dedicated_vm_for_vds, + vm_static.domain as vm_domain, vm_static.creation_date as vm_creation_date, vm_static.auto_startup as auto_startup, vm_static.is_stateless as is_stateless, + vm_static.is_smartcard_enabled as is_smartcard_enabled, vm_static.is_delete_protected as is_delete_protected, vm_static.sso_method as sso_method, vm_static.dedicated_vm_for_vds as dedicated_vm_for_vds, vm_static.fail_back as fail_back, vm_static.default_boot_sequence as default_boot_sequence, vm_static.vm_type as vm_type, - vds_groups.name as vds_group_name, vds_groups.transparent_hugepages as transparent_hugepages, vds_groups.trusted_service as trusted_service, - storage_pool.id as storage_pool_id, storage_pool.name as storage_pool_name, + vds_groups.name as vds_group_name, vds_groups.transparent_hugepages as transparent_hugepages, vds_groups.trusted_service as trusted_service, + storage_pool.id as storage_pool_id, storage_pool.name as storage_pool_name, vds_groups.description as vds_group_description, vm_templates.vm_name as vmt_name, vm_templates.mem_size_mb as vmt_mem_size_mb, vm_templates.os as vmt_os, vm_templates.creation_date as vmt_creation_date, vm_templates.child_count as vmt_child_count, vm_templates.num_of_sockets as vmt_num_of_sockets, @@ -584,7 +586,7 @@ AS SELECT vms.vm_name, vms.vm_mem_size_mb, vms.nice_level, vms.cpu_shares, vms.vmt_guid, vms.vm_os, vms.vm_description, vms.vm_comment, vms.vds_group_id, vms.vm_domain, vms.vm_creation_date, vms.auto_startup, vms.is_stateless, vms.is_smartcard_enabled, vms.is_delete_protected, - vms.dedicated_vm_for_vds, vms.fail_back, vms.default_boot_sequence, vms.vm_type, + vms.sso_method, vms.dedicated_vm_for_vds, vms.fail_back, vms.default_boot_sequence, vms.vm_type, vms.vds_group_name, vms.storage_pool_id, vms.storage_pool_name, vms.vds_group_description, vms.vmt_name, vms.vmt_mem_size_mb, vms.vmt_os, vms.vmt_creation_date, vms.vmt_child_count, vms.vmt_num_of_sockets, vms.vmt_cpu_per_socket, vms.vmt_description, vms.status, vms.vm_ip, diff --git a/packaging/dbscripts/upgrade/03_04_0010_add_sso_method_to_vm_static.sql b/packaging/dbscripts/upgrade/03_04_0010_add_sso_method_to_vm_static.sql new file mode 100644 index 0000000..26c5a90 --- /dev/null +++ b/packaging/dbscripts/upgrade/03_04_0010_add_sso_method_to_vm_static.sql @@ -0,0 +1 @@ +select fn_db_add_column('vm_static', 'sso_method', 'VARCHAR(32) NOT NULL DEFAULT ''guest_agent'''); diff --git a/packaging/dbscripts/vm_templates_sp.sql b/packaging/dbscripts/vm_templates_sp.sql index b55a658..bbd3f64 100644 --- a/packaging/dbscripts/vm_templates_sp.sql +++ b/packaging/dbscripts/vm_templates_sp.sql @@ -36,6 +36,7 @@ v_is_stateless BOOLEAN, v_is_smartcard_enabled BOOLEAN, v_is_delete_protected BOOLEAN, + v_sso_method VARCHAR(32), v_is_disabled BOOLEAN, v_iso_path VARCHAR(4000) , v_origin INTEGER , @@ -96,6 +97,7 @@ dedicated_vm_for_vds, is_smartcard_enabled, is_delete_protected, + sso_method, tunnel_migration, vnc_keyboard_layout, min_allocated_mem, @@ -144,6 +146,7 @@ v_dedicated_vm_for_vds, v_is_smartcard_enabled, v_is_delete_protected, + v_sso_method, v_tunnel_migration, v_vnc_keyboard_layout, v_min_allocated_mem, @@ -191,6 +194,7 @@ v_is_stateless BOOLEAN, v_is_smartcard_enabled BOOLEAN, v_is_delete_protected BOOLEAN, + v_sso_method VARCHAR(32), v_is_disabled BOOLEAN, v_iso_path VARCHAR(4000) , v_origin INTEGER , @@ -226,7 +230,7 @@ iso_path = v_iso_path,origin = v_origin,initrd_url = v_initrd_url, kernel_url = v_kernel_url,kernel_params = v_kernel_params, _update_date = CURRENT_TIMESTAMP, quota_id = v_quota_id, migration_support = v_migration_support, dedicated_vm_for_vds = v_dedicated_vm_for_vds, is_smartcard_enabled = v_is_smartcard_enabled, - is_delete_protected = v_is_delete_protected, is_disabled = v_is_disabled, tunnel_migration = v_tunnel_migration, + is_delete_protected = v_is_delete_protected, sso_method = v_sso_method, is_disabled = v_is_disabled, tunnel_migration = v_tunnel_migration, vnc_keyboard_layout = v_vnc_keyboard_layout, min_allocated_mem = v_min_allocated_mem, is_run_and_pause = v_is_run_and_pause, created_by_user_id = v_created_by_user_id WHERE vm_guid = v_vmt_guid AND entity_type = 'TEMPLATE'; diff --git a/packaging/dbscripts/vms_sp.sql b/packaging/dbscripts/vms_sp.sql index c97f60e..35f86db 100644 --- a/packaging/dbscripts/vms_sp.sql +++ b/packaging/dbscripts/vms_sp.sql @@ -416,6 +416,7 @@ v_is_stateless BOOLEAN, v_is_smartcard_enabled BOOLEAN, v_is_delete_protected BOOLEAN, + v_sso_method VARCHAR(32), v_dedicated_vm_for_vds UUID , v_fail_back BOOLEAN , v_vm_type INTEGER , @@ -443,8 +444,8 @@ RETURNS VOID AS $procedure$ BEGIN -INSERT INTO vm_static(description, free_text_comment, mem_size_mb, os, vds_group_id, vm_guid, VM_NAME, vmt_guid,domain,creation_date,num_of_monitors, single_qxl_pci, allow_console_reconnect,is_initialized,num_of_sockets,cpu_per_socket,usb_policy, time_zone,auto_startup,is_stateless,dedicated_vm_for_vds, fail_back, default_boot_sequence, vm_type, nice_level, cpu_shares, default_display_type, priority,iso_path,origin,initrd_url,kernel_url,kernel_params,migration_support,predefined_properties,userdefined_properties,min_allocated_mem, entity_type, quota_id, cpu_pinning, is_smartcard_enabled,is_delete_protected,host_cpu_flags, tunnel_migration, vnc_keyboard_layout, is_run_and_pause, created_by_user_id) - VALUES(v_description, v_free_text_comment, v_mem_size_mb, v_os, v_vds_group_id, v_vm_guid, v_vm_name, v_vmt_guid, v_domain, v_creation_date, v_num_of_monitors,v_single_qxl_pci, v_allow_console_reconnect, v_is_initialized, v_num_of_sockets, v_cpu_per_socket, v_usb_policy, v_time_zone, v_auto_startup,v_is_stateless,v_dedicated_vm_for_vds,v_fail_back, v_default_boot_sequence, v_vm_type, v_nice_level, v_cpu_shares, v_default_display_type, v_priority,v_iso_path,v_origin,v_initrd_url,v_kernel_url,v_kernel_params,v_migration_support,v_predefined_properties,v_userdefined_properties,v_min_allocated_mem, 'VM', v_quota_id, v_cpu_pinning, v_is_smartcard_enabled,v_is_delete_protected,v_host_cpu_flags, v_tunnel_migration, v_vnc_keyboard_layout, v_is_run_and_pause, v_created_by_user_id); +INSERT INTO vm_static(description, free_text_comment, mem_size_mb, os, vds_group_id, vm_guid, VM_NAME, vmt_guid,domain,creation_date,num_of_monitors, single_qxl_pci, allow_console_reconnect,is_initialized,num_of_sockets,cpu_per_socket,usb_policy, time_zone,auto_startup,is_stateless,dedicated_vm_for_vds, fail_back, default_boot_sequence, vm_type, nice_level, cpu_shares, default_display_type, priority,iso_path,origin,initrd_url,kernel_url,kernel_params,migration_support,predefined_properties,userdefined_properties,min_allocated_mem, entity_type, quota_id, cpu_pinning, is_smartcard_enabled,is_delete_protected, sso_method, host_cpu_flags, tunnel_migration, vnc_keyboard_layout, is_run_and_pause, created_by_user_id) + VALUES(v_description, v_free_text_comment, v_mem_size_mb, v_os, v_vds_group_id, v_vm_guid, v_vm_name, v_vmt_guid, v_domain, v_creation_date, v_num_of_monitors,v_single_qxl_pci, v_allow_console_reconnect, v_is_initialized, v_num_of_sockets, v_cpu_per_socket, v_usb_policy, v_time_zone, v_auto_startup,v_is_stateless,v_dedicated_vm_for_vds,v_fail_back, v_default_boot_sequence, v_vm_type, v_nice_level, v_cpu_shares, v_default_display_type, v_priority,v_iso_path,v_origin,v_initrd_url,v_kernel_url,v_kernel_params,v_migration_support,v_predefined_properties,v_userdefined_properties,v_min_allocated_mem, 'VM', v_quota_id, v_cpu_pinning, v_is_smartcard_enabled, v_is_delete_protected, v_sso_method,v_host_cpu_flags, v_tunnel_migration, v_vnc_keyboard_layout, v_is_run_and_pause, v_created_by_user_id); -- perform deletion from vm_ovf_generations to ensure that no record exists when performing insert to avoid PK violation. DELETE FROM vm_ovf_generations gen WHERE gen.vm_guid = v_vm_guid; INSERT INTO vm_ovf_generations(vm_guid, storage_pool_id) VALUES (v_vm_guid, (SELECT storage_pool_id FROM vds_groups vg WHERE vg.vds_group_id = v_vds_group_id)); @@ -535,6 +536,7 @@ v_is_stateless BOOLEAN, v_is_smartcard_enabled BOOLEAN, v_is_delete_protected BOOLEAN, + v_sso_method VARCHAR(32), v_dedicated_vm_for_vds UUID , v_fail_back BOOLEAN , v_vm_type INTEGER , @@ -583,7 +585,7 @@ kernel_params = v_kernel_params,migration_support = v_migration_support, predefined_properties = v_predefined_properties,userdefined_properties = v_userdefined_properties, min_allocated_mem = v_min_allocated_mem, quota_id = v_quota_id, cpu_pinning = v_cpu_pinning, is_smartcard_enabled = v_is_smartcard_enabled, - is_delete_protected = v_is_delete_protected, host_cpu_flags = v_host_cpu_flags, tunnel_migration = v_tunnel_migration, + is_delete_protected = v_is_delete_protected, sso_method = v_sso_method, host_cpu_flags = v_host_cpu_flags, tunnel_migration = v_tunnel_migration, vnc_keyboard_layout = v_vnc_keyboard_layout, is_run_and_pause = v_is_run_and_pause, created_by_user_id = v_created_by_user_id WHERE vm_guid = v_vm_guid AND entity_type = 'VM'; -- To view, visit http://gerrit.ovirt.org/19619 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I175ecd61c35b8354706d6dedda1e211bf2400c54 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Frank Kobzik <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
