Add new config option to set [spice].agent_enabled
This new config called spice-agent-enabled is added to inform the spice agent is not installed in the guest instance, which in conjunction with an image property hw_pointer_model=usbtablet allows accurate position of the mouse in Windows guests. This option is not rendered in the nova.conf local to nova-cloud-controller units, instead it's passed to related nova-compute units. Change-Id: Id64699b6d04aa05935b31d55532df45c6d973fa7 Depends-On: https://review.opendev.org/699461 Closes-Bug: #1856602
This commit is contained in:
parent
4303190153
commit
62262f845a
12
config.yaml
12
config.yaml
|
@ -605,3 +605,15 @@ options:
|
|||
.
|
||||
Possible Values are positive integers. Any value less than 1 will be
|
||||
treated as 1.
|
||||
spice-agent-enabled: # LP: #1856602
|
||||
type: boolean
|
||||
default: True # OpenStack's default value.
|
||||
description: |
|
||||
Enable the SPICE guest agent support on the instances.
|
||||
.
|
||||
The Spice agent works with the Spice protocol to offer a better guest
|
||||
console experience. However, the Spice console can still be used without
|
||||
the Spice Agent.
|
||||
.
|
||||
For Windows guests is recommended to set this to configuration option to
|
||||
False and for those images set the property hw_pointer_model=usbtablet
|
||||
|
|
|
@ -572,6 +572,7 @@ def console_settings():
|
|||
protocols = ['novnc', 'xvpvnc']
|
||||
else:
|
||||
protocols = [proto]
|
||||
|
||||
for _proto in protocols:
|
||||
rel_settings['console_proxy_{}_address'.format(_proto)] = \
|
||||
"{}:{}{}".format(
|
||||
|
@ -583,6 +584,8 @@ def console_settings():
|
|||
rel_settings['console_proxy_%s_port' % (_proto)] = \
|
||||
common.console_attributes('proxy-port', proto=_proto)
|
||||
|
||||
rel_settings['spice_agent_enabled'] = hookenv.config('spice-agent-enabled')
|
||||
|
||||
return rel_settings
|
||||
|
||||
|
||||
|
|
|
@ -952,7 +952,8 @@ class NovaCCHooksTests(CharmTestCase):
|
|||
'console_proxy_xvpvnc_host': _cc_host,
|
||||
'console_proxy_xvpvnc_address': 'http://%s:6081/console' %
|
||||
(_cc_host),
|
||||
'console_keymap': 'en-us'
|
||||
'console_keymap': 'en-us',
|
||||
'spice_agent_enabled': True,
|
||||
}
|
||||
self.assertEqual(_con_sets, console_settings)
|
||||
|
||||
|
@ -969,6 +970,7 @@ class NovaCCHooksTests(CharmTestCase):
|
|||
'console_proxy_xvpvnc_host': _cc_host,
|
||||
'console_proxy_xvpvnc_address': 'http://%s:6081/console' %
|
||||
(_cc_host),
|
||||
'spice_agent_enabled': True,
|
||||
}
|
||||
self.assertEqual(_con_sets, console_settings)
|
||||
|
||||
|
@ -984,7 +986,8 @@ class NovaCCHooksTests(CharmTestCase):
|
|||
'console_proxy_novnc_port': 6080,
|
||||
'console_access_protocol': 'novnc',
|
||||
'console_proxy_novnc_host': _cc_host,
|
||||
'console_keymap': 'en-us'
|
||||
'console_keymap': 'en-us',
|
||||
'spice_agent_enabled': True,
|
||||
}
|
||||
self.assertEqual(_con_sets, console_settings)
|
||||
|
||||
|
@ -1000,7 +1003,8 @@ class NovaCCHooksTests(CharmTestCase):
|
|||
'console_proxy_spice_host': _cc_host,
|
||||
'console_proxy_spice_port': 6082,
|
||||
'console_access_protocol': 'spice',
|
||||
'console_keymap': 'en-us'
|
||||
'console_keymap': 'en-us',
|
||||
'spice_agent_enabled': True,
|
||||
}
|
||||
self.assertEqual(_con_sets, console_settings)
|
||||
|
||||
|
@ -1023,7 +1027,8 @@ class NovaCCHooksTests(CharmTestCase):
|
|||
'console_proxy_spice_host': _cc_public_host,
|
||||
'console_proxy_spice_port': 6082,
|
||||
'console_access_protocol': 'spice',
|
||||
'console_keymap': 'en-us'
|
||||
'console_keymap': 'en-us',
|
||||
'spice_agent_enabled': True,
|
||||
}
|
||||
self.assertEqual(_con_sets, console_settings)
|
||||
|
||||
|
@ -1040,7 +1045,8 @@ class NovaCCHooksTests(CharmTestCase):
|
|||
'console_proxy_spice_host': _cc_public_host,
|
||||
'console_proxy_spice_port': 6082,
|
||||
'console_access_protocol': 'spice',
|
||||
'console_keymap': 'en-us'
|
||||
'console_keymap': 'en-us',
|
||||
'spice_agent_enabled': True,
|
||||
}
|
||||
self.assertEqual(_con_sets, console_settings)
|
||||
|
||||
|
|
Loading…
Reference in New Issue