Frank Kobzik has uploaded a new change for review. Change subject: core: GraphicsInfo db persistence part ......................................................................
core: GraphicsInfo db persistence part todo - ip - varchar 255 instead of 32 - db migration script (create device according to gtype) - remove old columns (probably separate patch) - get rid of line breaks Change-Id: I5a129454fc64aa34493b0495fb76f22f3d667e14 Signed-off-by: Frantisek Kobzik <[email protected]> Bug-Url: https://bugzilla.redhat.com/1033547 --- 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/VmDynamicDAODbFacadeImpl.java M packaging/dbscripts/create_tables.sql M packaging/dbscripts/create_views.sql A packaging/dbscripts/upgrade/03_05_0490_add_graphics_info_columns.sql M packaging/dbscripts/vms_sp.sql 6 files changed, 128 insertions(+), 43 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/70/28570/1 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 6bb0198..e54e0ae 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 @@ -11,6 +11,7 @@ import org.ovirt.engine.core.common.businessentities.ArchitectureType; import org.ovirt.engine.core.common.businessentities.BootSequence; import org.ovirt.engine.core.common.businessentities.DisplayType; +import org.ovirt.engine.core.common.businessentities.GraphicsType; import org.ovirt.engine.core.common.businessentities.MigrationSupport; import org.ovirt.engine.core.common.businessentities.NumaTuneMode; import org.ovirt.engine.core.common.businessentities.OriginType; @@ -349,7 +350,6 @@ entity.setRunOnVds(getGuid(rs, "run_on_vds")); entity.setMigratingToVds(getGuid(rs, "migrating_to_vds")); entity.setAppList(rs.getString("app_list")); - entity.setDisplay((Integer) rs.getObject("display")); entity.setVmPoolName(rs.getString("vm_pool_name")); entity.setVmPoolId(getGuid(rs, "vm_pool_id")); entity.setNumOfMonitors(rs.getInt("num_of_monitors")); @@ -361,13 +361,11 @@ entity.setUsbPolicy(UsbPolicy.forValue(rs.getInt("usb_policy"))); entity.setAcpiEnable((Boolean) rs.getObject("acpi_enable")); entity.setSession(SessionState.forValue(rs.getInt("session"))); - entity.setDisplayIp(rs.getString("display_ip")); entity.setDisplayType(DisplayType.forValue(rs.getInt("display_type"))); entity.setKvmEnable((Boolean) rs.getObject("kvm_enable")); entity.setBootSequence(BootSequence.forValue(rs.getInt("boot_sequence"))); entity.setRunOnVdsName(rs.getString("run_on_vds_name")); entity.setTimeZone(rs.getString("time_zone")); - entity.setDisplaySecurePort((Integer) rs.getObject("display_secure_port")); entity.setUtcDiff((Integer) rs.getObject("utc_diff")); entity.setAutoStartup(rs.getBoolean("auto_startup")); entity.setStateless(rs.getBoolean("is_stateless")); @@ -439,10 +437,23 @@ entity.setGuestCpuCount(rs.getInt("guest_cpu_count")); entity.setNextRunConfigurationExists(rs.getBoolean("next_run_config_exists")); entity.setNumaTuneMode(NumaTuneMode.forValue(rs.getString("numatune_mode"))); + entity.getGraphicsInfos().get(GraphicsType.SPICE).setIp(rs.getString("spice_ip")); + entity.getGraphicsInfos().get(GraphicsType.SPICE).setPort(getInteger(rs, "spice_port")); + entity.getGraphicsInfos().get(GraphicsType.SPICE).setTlsPort(getInteger(rs, "spice_tls_port")); + entity.getGraphicsInfos().get(GraphicsType.VNC).setIp(rs.getString("vnc_ip")); + entity.getGraphicsInfos().get(GraphicsType.VNC).setPort(getInteger(rs, "vnc_port")); return entity; } } + private static Integer getInteger(ResultSet rs, String columnName) throws SQLException { + int result = rs.getInt(columnName); + if (rs.wasNull()) { + return null; + } + return result; + } + private static final class VMWithPlugInfoRowMapper implements RowMapper<Pair<VM, VmDevice>> { public static final VMWithPlugInfoRowMapper instance = new VMWithPlugInfoRowMapper(); diff --git a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDynamicDAODbFacadeImpl.java b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDynamicDAODbFacadeImpl.java index 49e3667..b987ce3 100644 --- a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDynamicDAODbFacadeImpl.java +++ b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDynamicDAODbFacadeImpl.java @@ -4,10 +4,10 @@ import java.sql.SQLException; import java.util.List; import java.util.Map; - import org.apache.commons.lang.NotImplementedException; import org.ovirt.engine.core.common.businessentities.BootSequence; import org.ovirt.engine.core.common.businessentities.DisplayType; +import org.ovirt.engine.core.common.businessentities.GraphicsType; import org.ovirt.engine.core.common.businessentities.SessionState; import org.ovirt.engine.core.common.businessentities.VMStatus; import org.ovirt.engine.core.common.businessentities.VmDynamic; @@ -100,14 +100,11 @@ .addValue("last_start_time", vm.getLastStartTime()) .addValue("last_stop_time", vm.getLastStopTime()) .addValue("vm_pid", vm.getVmPid()) - .addValue("display", vm.getDisplay()) .addValue("acpi_enable", vm.getAcpiEnable()) .addValue("session", vm.getSession()) - .addValue("display_ip", vm.getDisplayIp()) .addValue("display_type", vm.getDisplayType()) .addValue("kvm_enable", vm.getKvmEnable()) .addValue("boot_sequence", vm.getBootSequence()) - .addValue("display_secure_port", vm.getDisplaySecurePort()) .addValue("utc_diff", vm.getUtcDiff()) .addValue("last_vds_run_on", vm.getLastVdsRunOn()) .addValue("client_ip", vm.getClientIp()) @@ -127,7 +124,12 @@ .addValue("current_cd", vm.getCurrentCd()) .addValue("reason", vm.getStopReason()) .addValue("exit_reason", vm.getExitReason().getValue()) - .addValue("guest_cpu_count", vm.getGuestCpuCount()); + .addValue("guest_cpu_count", vm.getGuestCpuCount()) + .addValue("spice_port", vm.getGraphicsInfos().get(GraphicsType.SPICE).getPort()) + .addValue("spice_tls_port", vm.getGraphicsInfos().get(GraphicsType.SPICE).getTlsPort()) + .addValue("spice_ip", vm.getGraphicsInfos().get(GraphicsType.SPICE).getIp()) + .addValue("vnc_port", vm.getGraphicsInfos().get(GraphicsType.VNC).getPort()) + .addValue("vnc_ip", vm.getGraphicsInfos().get(GraphicsType.VNC).getIp()); } @Override @@ -160,17 +162,13 @@ entity.setLastStopTime(DbFacadeUtils.fromDate(rs .getTimestamp("last_stop_time"))); entity.setVmPid((Integer) rs.getObject("vm_pid")); - entity.setDisplay((Integer) rs.getObject("display")); entity.setAcpiEnable((Boolean) rs.getObject("acpi_enable")); entity.setSession(SessionState.forValue(rs.getInt("session"))); - entity.setDisplayIp(rs.getString("display_ip")); entity.setDisplayType(DisplayType.forValue(rs .getInt("display_type"))); entity.setKvmEnable((Boolean) rs.getObject("kvm_enable")); entity.setBootSequence(BootSequence.forValue(rs .getInt("boot_sequence"))); - entity.setDisplaySecurePort((Integer) rs - .getObject("display_secure_port")); entity.setUtcDiff((Integer) rs.getObject("utc_diff")); entity.setLastVdsRunOn(getGuid(rs, "last_vds_run_on")); entity.setClientIp(rs.getString("client_ip")); @@ -196,9 +194,22 @@ VmExitReason exitReason = VmExitReason.forValue(rs.getInt("exit_reason")); entity.setExitReason(exitReason); entity.setGuestCpuCount(rs.getInt("guest_cpu_count")); + entity.getGraphicsInfos().get(GraphicsType.SPICE).setIp(rs.getString("spice_ip")); + entity.getGraphicsInfos().get(GraphicsType.SPICE).setPort(getInteger(rs, "spice_port")); + entity.getGraphicsInfos().get(GraphicsType.SPICE).setTlsPort(getInteger(rs, "spice_tls_port")); + entity.getGraphicsInfos().get(GraphicsType.VNC).setIp(rs.getString("vnc_ip")); + entity.getGraphicsInfos().get(GraphicsType.VNC).setPort(getInteger(rs, "vnc_port")); return entity; } }; + } + + private static Integer getInteger(ResultSet rs, String columnName) throws SQLException { + int result = rs.getInt(columnName); + if (rs.wasNull()) { + return null; + } + return result; } @Override @@ -224,14 +235,11 @@ .addValue("vm_pid", entity.getVmPid()) .addValue("vm_fqdn", entity.getVmFQDN()) .addValue("app_list", entity.getAppList()) - .addValue("display", entity.getDisplay()) .addValue("acpi_enable", entity.getAcpiEnable()) .addValue("session", entity.getSession()) - .addValue("display_ip", entity.getDisplayIp()) .addValue("display_type", entity.getDisplayType()) .addValue("kvm_enable", entity.getKvmEnable()) .addValue("boot_sequence", entity.getBootSequence()) - .addValue("display_secure_port", entity.getDisplaySecurePort()) .addValue("utc_diff", entity.getUtcDiff()) .addValue("last_vds_run_on", entity.getLastVdsRunOn()) .addValue("client_ip", entity.getClientIp()) @@ -249,7 +257,12 @@ .addValue("current_cd", entity.getCurrentCd()) .addValue("reason", entity.getStopReason()) .addValue("exit_reason", entity.getExitReason()) - .addValue("guest_cpu_count", entity.getGuestCpuCount()); + .addValue("guest_cpu_count", entity.getGuestCpuCount()) + .addValue("spice_port", entity.getGraphicsInfos().get(GraphicsType.SPICE).getPort()) + .addValue("spice_tls_port", entity.getGraphicsInfos().get(GraphicsType.SPICE).getTlsPort()) + .addValue("spice_ip", entity.getGraphicsInfos().get(GraphicsType.SPICE).getIp()) + .addValue("vnc_port", entity.getGraphicsInfos().get(GraphicsType.VNC).getPort()) + .addValue("vnc_ip", entity.getGraphicsInfos().get(GraphicsType.VNC).getIp()); return paramValue; } diff --git a/packaging/dbscripts/create_tables.sql b/packaging/dbscripts/create_tables.sql index e525e62..ddf1d3e 100644 --- a/packaging/dbscripts/create_tables.sql +++ b/packaging/dbscripts/create_tables.sql @@ -1065,13 +1065,10 @@ run_on_vds uuid, migrating_to_vds uuid, app_list text, - display integer, acpi_enable boolean, session integer, - display_ip character varying(255), display_type integer, kvm_enable boolean, - display_secure_port integer, utc_diff integer, last_vds_run_on uuid, client_ip character varying(255), diff --git a/packaging/dbscripts/create_views.sql b/packaging/dbscripts/create_views.sql index fa4c34e..01a3701 100644 --- a/packaging/dbscripts/create_views.sql +++ b/packaging/dbscripts/create_views.sql @@ -609,17 +609,29 @@ vm_dynamic.vm_pid as vm_pid, vm_dynamic.last_start_time as last_start_time, vm_dynamic.guest_cur_user_name as guest_cur_user_name, vm_dynamic.console_cur_user_name as console_cur_user_name, vm_dynamic.guest_last_login_time as guest_last_login_time, vm_dynamic.guest_last_logout_time as guest_last_logout_time, vm_dynamic.guest_os as guest_os, vm_dynamic.console_user_id as console_user_id, vm_dynamic.guest_agent_nics_hash as guest_agent_nics_hash, - vm_dynamic.run_on_vds as run_on_vds, vm_dynamic.migrating_to_vds as migrating_to_vds, vm_dynamic.app_list as app_list, vm_dynamic.display as display, vm_dynamic.hibernation_vol_handle as hibernation_vol_handle, + vm_dynamic.run_on_vds as run_on_vds, vm_dynamic.migrating_to_vds as migrating_to_vds, vm_dynamic.app_list as app_list, + --vm_dynamic.display as display, + vm_dynamic.spice_port as spice_port, + vm_dynamic.spice_tls_port as spice_tls_port, + vm_dynamic.spice_ip as spice_ip, + vm_dynamic.vnc_port as vnc_port, + vm_dynamic.vnc_ip as vnc_ip, + -- + vm_dynamic.hibernation_vol_handle as hibernation_vol_handle, vm_pool_map_view.vm_pool_name as vm_pool_name, vm_pool_map_view.vm_pool_id as vm_pool_id, vm_static.vm_guid as vm_guid, vm_static.num_of_monitors as num_of_monitors, vm_static.single_qxl_pci as single_qxl_pci, vm_static.allow_console_reconnect as allow_console_reconnect, vm_static.is_initialized as is_initialized, vm_static.num_of_sockets as num_of_sockets, vm_static.cpu_per_socket as cpu_per_socket, vm_static.usb_policy as usb_policy, vm_dynamic.acpi_enable as acpi_enable, vm_dynamic.session as session, vm_static.num_of_sockets*vm_static.cpu_per_socket as num_of_cpus, vm_static.quota_id as quota_id, quota.quota_name as quota_name, storage_pool.quota_enforcement_type as quota_enforcement_type, - vm_dynamic.display_ip as display_ip, vm_dynamic.display_type as display_type, vm_dynamic.kvm_enable as kvm_enable, vm_dynamic.boot_sequence as boot_sequence, - vm_dynamic.display_secure_port as display_secure_port, vm_dynamic.utc_diff as utc_diff, vm_dynamic.last_vds_run_on as last_vds_run_on, + -- vm_dynamic.display_ip as display_ip, + vm_dynamic.display_type as display_type, + vm_dynamic.kvm_enable as kvm_enable, vm_dynamic.boot_sequence as boot_sequence, + -- vm_dynamic.display_secure_port as display_secure_port, + vm_dynamic.utc_diff as utc_diff, vm_dynamic.last_vds_run_on as last_vds_run_on, vm_dynamic.client_ip as client_ip,vm_dynamic.guest_requested_memory as guest_requested_memory, vm_static.time_zone as time_zone, vm_statistics.cpu_user as cpu_user, vm_statistics.cpu_sys as cpu_sys, vm_statistics.elapsed_time as elapsed_time, vm_statistics.usage_network_percent as usage_network_percent, vm_statistics.usage_mem_percent as usage_mem_percent, vm_statistics.migration_progress_percent as migration_progress_percent, vm_statistics.usage_cpu_percent as usage_cpu_percent, vds_static.vds_name as run_on_vds_name, vds_groups.cpu_name as vds_group_cpu_name, - vm_static.default_display_type as default_display_type, vm_static.priority as priority,vm_static.iso_path as iso_path, vm_static.origin as origin, vds_groups.compatibility_version as vds_group_compatibility_version, + vm_static.default_display_type as default_display_type, + vm_static.priority as priority,vm_static.iso_path as iso_path, vm_static.origin as origin, vds_groups.compatibility_version as vds_group_compatibility_version, vm_static.initrd_url as initrd_url, vm_static.kernel_url as kernel_url, vm_static.kernel_params as kernel_params, vm_dynamic.pause_status as pause_status, vm_dynamic.exit_message as exit_message, vm_dynamic.exit_status as exit_status,vm_static.migration_support as migration_support,vm_static.predefined_properties as predefined_properties,vm_static.userdefined_properties as userdefined_properties,vm_static.min_allocated_mem as min_allocated_mem, vm_dynamic.hash as hash, vm_static.cpu_pinning as cpu_pinning, vm_static.db_generation as db_generation, vm_static.host_cpu_flags as host_cpu_flags, vm_static.tunnel_migration as tunnel_migration, vm_static.vnc_keyboard_layout as vnc_keyboard_layout, vm_static.is_run_and_pause as is_run_and_pause, vm_static.created_by_user_id as created_by_user_id, vm_dynamic.last_watchdog_event as last_watchdog_event, vm_dynamic.last_watchdog_action as last_watchdog_action, vm_dynamic.is_run_once as is_run_once, vm_dynamic.vm_fqdn as vm_fqdn, vm_dynamic.cpu_name as cpu_name, vm_dynamic.current_cd as current_cd, vm_dynamic.reason as reason, vm_dynamic.exit_reason as exit_reason, @@ -654,15 +666,28 @@ vms.vmt_child_count, vms.vmt_num_of_sockets, vms.vmt_cpu_per_socket, vms.vmt_description, vms.status, vms.vm_ip, vms.vm_host, vms.vmt_num_of_sockets * vms.vmt_cpu_per_socket AS vmt_num_of_cpus, vms.vm_pid, vms.last_start_time, vms.last_stop_time, vms.guest_cur_user_name, vms.console_cur_user_name, vms.guest_last_login_time, vms.console_user_id, - vms.guest_last_logout_time, vms.guest_os, vms.run_on_vds, vms.migrating_to_vds, vms.app_list, vms.display, + vms.guest_last_logout_time, vms.guest_os, vms.run_on_vds, vms.migrating_to_vds, vms.app_list, + -- vms.display, + vms.spice_port as spice_port, + vms.spice_tls_port as spice_tls_port, + vms.spice_ip as spice_ip, + vms.vnc_port as vnc_port, + vms.vnc_ip as vnc_ip, + -- vms.hibernation_vol_handle, vms.vm_pool_name, vms.vm_pool_id, vms.vm_guid, vms.num_of_monitors, vms.single_qxl_pci, vms.allow_console_reconnect, vms.is_initialized, vms.num_of_sockets, vms.cpu_per_socket, vms.usb_policy, vms.acpi_enable, - vms.session, vms.num_of_sockets * vms.cpu_per_socket AS num_of_cpus, vms.display_ip, vms.display_type, - vms.kvm_enable, vms.boot_sequence, vms.display_secure_port, vms.utc_diff, vms.last_vds_run_on, vms.client_ip, + vms.session, vms.num_of_sockets * vms.cpu_per_socket AS num_of_cpus, + -- vms.display_ip, + vms.display_type, + vms.kvm_enable, vms.boot_sequence, + -- vms.display_secure_port, + vms.utc_diff, vms.last_vds_run_on, vms.client_ip, vms.guest_requested_memory, vms.time_zone, vms.cpu_user, vms.cpu_sys, vms.elapsed_time, vms.usage_network_percent, vms.usage_mem_percent, vms.migration_progress_percent, vms.usage_cpu_percent, vms.run_on_vds_name, - vms.vds_group_cpu_name, tags_vm_map_view.tag_name, tags_vm_map_view.tag_id, vms.default_display_type, vms.priority, + vms.vds_group_cpu_name, tags_vm_map_view.tag_name, tags_vm_map_view.tag_id, + vms.default_display_type, + vms.priority, vms.vds_group_compatibility_version, vms.initrd_url, vms.kernel_url, vms.kernel_params, vms.pause_status, vms.exit_status, vms.exit_message, vms.min_allocated_mem, storage_domain_static.id AS storage_id, vms.quota_id as quota_id, vms.quota_name as quota_name, vms.tunnel_migration as tunnel_migration, diff --git a/packaging/dbscripts/upgrade/03_05_0490_add_graphics_info_columns.sql b/packaging/dbscripts/upgrade/03_05_0490_add_graphics_info_columns.sql new file mode 100644 index 0000000..08b4328 --- /dev/null +++ b/packaging/dbscripts/upgrade/03_05_0490_add_graphics_info_columns.sql @@ -0,0 +1,19 @@ +-- add graphics info columns +select fn_db_add_column('vm_dynamic', 'spice_port', 'integer default NULL'); +select fn_db_add_column('vm_dynamic', 'spice_tls_port', 'integer default NULL'); +select fn_db_add_column('vm_dynamic', 'spice_ip', 'varchar(32) default NULL'); +select fn_db_add_column('vm_dynamic', 'vnc_port', 'integer default NULL'); +select fn_db_add_column('vm_dynamic', 'vnc_ip', 'varchar(32) default NULL'); + +-- update added colums +update vm_dynamic set spice_port = display where display_type = 0; +update vm_dynamic set spice_tls_port = display_secure_port where display_type = 0; +update vm_dynamic set spice_ip = display_ip where display_type = 0; +update vm_dynamic set vnc_port = display where display_type = 1; +update vm_dynamic set vnc_ip = display_ip where display_type = 1; + +-- drop old ones +select fn_db_drop_column('vm_dynamic', 'display'); +select fn_db_drop_column('vm_dynamic', 'display_secure_port'); +select fn_db_drop_column('vm_dynamic', 'display_ip'); + diff --git a/packaging/dbscripts/vms_sp.sql b/packaging/dbscripts/vms_sp.sql index 272c5bf..8c17dd0 100644 --- a/packaging/dbscripts/vms_sp.sql +++ b/packaging/dbscripts/vms_sp.sql @@ -243,14 +243,11 @@ v_last_start_time TIMESTAMP WITH TIME ZONE , v_last_stop_time TIMESTAMP WITH TIME ZONE , v_vm_pid INTEGER , - v_display INTEGER , v_acpi_enable BOOLEAN , v_session INTEGER , - v_display_ip VARCHAR(255) , v_display_type INTEGER , v_kvm_enable BOOLEAN , v_boot_sequence INTEGER , - v_display_secure_port INTEGER , v_utc_diff INTEGER , v_last_vds_run_on UUID , v_client_ip VARCHAR(255), @@ -266,13 +263,30 @@ v_cpu_name VARCHAR(255), v_current_cd VARCHAR(4000), v_exit_reason INTEGER, - v_guest_cpu_count INTEGER) + v_guest_cpu_count INTEGER, + v_spice_port INTEGER, + v_spice_tls_port INTEGER, + v_spice_ip varchar(32), + v_vnc_port INTEGER, + v_vnc_ip varchar(32)) RETURNS VOID AS $procedure$ BEGIN -INSERT INTO vm_dynamic(app_list, guest_cur_user_name, console_cur_user_name, guest_last_login_time, guest_last_logout_time, console_user_id, guest_os, migrating_to_vds, RUN_ON_VDS, status, vm_guid, vm_host, vm_ip, last_start_time, last_stop_time, vm_pid, display, acpi_enable, session, display_ip, display_type, kvm_enable, boot_sequence, display_secure_port, utc_diff, last_vds_run_on, client_ip, guest_requested_memory, hibernation_vol_handle,exit_status,pause_status,exit_message, guest_agent_nics_hash, last_watchdog_event, last_watchdog_action, is_run_once, vm_fqdn, cpu_name, current_cd, exit_reason, guest_cpu_count) - VALUES(v_app_list, v_guest_cur_user_name, v_console_cur_user_name, v_guest_last_login_time, v_guest_last_logout_time, v_console_user_id, v_guest_os, v_migrating_to_vds, v_run_on_vds, v_status, v_vm_guid, v_vm_host, v_vm_ip, v_last_start_time, v_last_stop_time, v_vm_pid, v_display, v_acpi_enable, v_session, v_display_ip, v_display_type, v_kvm_enable, v_boot_sequence, v_display_secure_port, v_utc_diff, v_last_vds_run_on, v_client_ip, v_guest_requested_memory, v_hibernation_vol_handle, v_exit_status, v_pause_status, v_exit_message, v_guest_agent_nics_hash, v_last_watchdog_event, v_last_watchdog_action, v_is_run_once, v_vm_fqdn, v_cpu_name, v_current_cd, v_exit_reason, - v_guest_cpu_count); +INSERT INTO vm_dynamic(app_list, guest_cur_user_name, console_cur_user_name, guest_last_login_time, guest_last_logout_time, console_user_id, guest_os, migrating_to_vds, RUN_ON_VDS, status, vm_guid, vm_host, vm_ip, last_start_time, last_stop_time, vm_pid, acpi_enable, session, display_type, kvm_enable, boot_sequence, utc_diff, last_vds_run_on, client_ip, guest_requested_memory, hibernation_vol_handle,exit_status,pause_status,exit_message, guest_agent_nics_hash, last_watchdog_event, last_watchdog_action, is_run_once, vm_fqdn, cpu_name, current_cd, exit_reason, guest_cpu_count, +spice_port, +spice_tls_port, +spice_ip, +vnc_port, +vnc_ip +) + VALUES(v_app_list, v_guest_cur_user_name, v_console_cur_user_name, v_guest_last_login_time, v_guest_last_logout_time, v_console_user_id, v_guest_os, v_migrating_to_vds, v_run_on_vds, v_status, v_vm_guid, v_vm_host, v_vm_ip, v_last_start_time, v_last_stop_time, v_vm_pid, v_acpi_enable, v_session, v_display_type, v_kvm_enable, v_boot_sequence, v_utc_diff, v_last_vds_run_on, v_client_ip, v_guest_requested_memory, v_hibernation_vol_handle, v_exit_status, v_pause_status, v_exit_message, v_guest_agent_nics_hash, v_last_watchdog_event, v_last_watchdog_action, v_is_run_once, v_vm_fqdn, v_cpu_name, v_current_cd, v_exit_reason, + v_guest_cpu_count, +v_spice_port, +v_spice_tls_port, +v_spice_ip, +v_vnc_port, +v_vnc_ip + ); END; $procedure$ LANGUAGE plpgsql; @@ -295,14 +309,11 @@ v_last_start_time TIMESTAMP WITH TIME ZONE , v_last_stop_time TIMESTAMP WITH TIME ZONE , v_vm_pid INTEGER , - v_display INTEGER , v_acpi_enable BOOLEAN , v_session INTEGER , - v_display_ip VARCHAR(255) , - v_display_type INTEGER , + v_display_type INTEGER , v_kvm_enable BOOLEAN , v_boot_sequence INTEGER , - v_display_secure_port INTEGER , v_utc_diff INTEGER , v_last_vds_run_on UUID , v_client_ip VARCHAR(255) , @@ -320,7 +331,12 @@ v_current_cd VARCHAR(4000), v_reason VARCHAR(4000), v_exit_reason INTEGER, - v_guest_cpu_count INTEGER) + v_guest_cpu_count INTEGER, + v_spice_port INTEGER, + v_spice_tls_port INTEGER, + v_spice_ip varchar(32), + v_vnc_port INTEGER, + v_vnc_ip varchar(32)) RETURNS VOID --The [vm_dynamic] table doesn't have a timestamp column. Optimistic concurrency logic cannot be generated @@ -336,10 +352,9 @@ status = v_status,vm_host = v_vm_host,vm_ip = v_vm_ip,vm_fqdn = v_vm_fqdn, last_start_time = v_last_start_time, last_stop_time = v_last_stop_time, - vm_pid = v_vm_pid,display = v_display,acpi_enable = v_acpi_enable, - session = v_session,display_ip = v_display_ip, + vm_pid = v_vm_pid,acpi_enable = v_acpi_enable, + session = v_session, display_type = v_display_type,kvm_enable = v_kvm_enable,boot_sequence = v_boot_sequence, - display_secure_port = v_display_secure_port, utc_diff = v_utc_diff,last_vds_run_on = v_last_vds_run_on,client_ip = v_client_ip, guest_requested_memory = v_guest_requested_memory, hibernation_vol_handle = v_hibernation_vol_handle,exit_status = v_exit_status, @@ -348,7 +363,12 @@ current_cd = v_current_cd, reason = v_reason, exit_reason = v_exit_reason, - guest_cpu_count = v_guest_cpu_count + guest_cpu_count = v_guest_cpu_count, + spice_port = v_spice_port, + spice_tls_port = v_spice_tls_port, + spice_ip = v_spice_ip, + vnc_port = v_vnc_port, + vnc_ip = v_vnc_ip WHERE vm_guid = v_vm_guid; END; $procedure$ LANGUAGE plpgsql; -- To view, visit http://gerrit.ovirt.org/28570 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a129454fc64aa34493b0495fb76f22f3d667e14 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
