diff --git a/etc/nova/nova.conf.sample b/etc/nova/nova.conf.sample index 4c464ed42300..a92f33fc14e4 100644 --- a/etc/nova/nova.conf.sample +++ b/etc/nova/nova.conf.sample @@ -3293,12 +3293,6 @@ # Total number of VNC ports (integer value) #vnc_port_total=10000 -# DEPRECATED. VNC password. The password-based access to VNC -# consoles will be removed in the next release. The default -# value will disable password protection on the VNC console. -# (string value) -#vnc_password= - # Whether to use linked clone (boolean value) #use_linked_clone=true diff --git a/nova/tests/virt/vmwareapi/test_vmwareapi.py b/nova/tests/virt/vmwareapi/test_vmwareapi.py index 8c980426049f..91f8c4afe356 100644 --- a/nova/tests/virt/vmwareapi/test_vmwareapi.py +++ b/nova/tests/virt/vmwareapi/test_vmwareapi.py @@ -768,10 +768,6 @@ class VMwareAPIVMTestCase(test.NoDBTestCase): def test_get_vnc_console(self): self._test_get_vnc_console() - def test_get_vnc_console_with_password(self): - self.flags(vnc_password='vmware', group='vmware') - self._test_get_vnc_console() - def test_host_ip_addr(self): self.assertEqual(self.conn.get_host_ip_addr(), "test_url") diff --git a/nova/tests/virt/vmwareapi/test_vmwareapi_vm_util.py b/nova/tests/virt/vmwareapi/test_vmwareapi_vm_util.py index bda48b5b71bb..ae5d905993fa 100644 --- a/nova/tests/virt/vmwareapi/test_vmwareapi_vm_util.py +++ b/nova/tests/virt/vmwareapi/test_vmwareapi_vm_util.py @@ -298,14 +298,14 @@ class VMwareVMUtilTestCase(test.NoDBTestCase): vmdk_adapter_type = vm_util.get_vmdk_adapter_type("dummyAdapter") self.assertEqual("dummyAdapter", vmdk_adapter_type) - def _test_get_vnc_config_spec(self, port, password): + def _test_get_vnc_config_spec(self, port): result = vm_util.get_vnc_config_spec(fake.FakeFactory(), - port, password) + port) return result def test_get_vnc_config_spec(self): - result = self._test_get_vnc_config_spec(7, None) + result = self._test_get_vnc_config_spec(7) expected = """{'extraConfig': [ {'value': 'true', 'key': 'RemoteDisplay.vnc.enabled', @@ -318,23 +318,6 @@ class VMwareVMUtilTestCase(test.NoDBTestCase): result = re.sub(r'\s+', '', repr(result)) self.assertEqual(expected, result) - def test_get_vnc_config_spec_password(self): - result = self._test_get_vnc_config_spec(7, 'password') - expected = """{'extraConfig': [ - {'value': 'true', - 'key': 'RemoteDisplay.vnc.enabled', - 'obj_name': 'ns0:OptionValue'}, - {'value': 7, - 'key': 'RemoteDisplay.vnc.port', - 'obj_name': 'ns0:OptionValue'}, - {'value':'password', - 'key':'RemoteDisplay.vnc.password', - 'obj_name':'ns0:OptionValue'}], - 'obj_name': 'ns0:VirtualMachineConfigSpec'}""" - expected = re.sub(r'\s+', '', expected) - result = re.sub(r'\s+', '', repr(result)) - self.assertEqual(expected, result) - def test_get_all_cluster_refs_by_name_none(self): fake_objects = fake.FakeRetrieveResult() refs = vm_util.get_all_cluster_refs_by_name(fake_session(fake_objects), diff --git a/nova/virt/vmwareapi/driver.py b/nova/virt/vmwareapi/driver.py index 2a5cb559ee55..f145704df8a9 100644 --- a/nova/virt/vmwareapi/driver.py +++ b/nova/virt/vmwareapi/driver.py @@ -99,15 +99,6 @@ vmwareapi_opts = [ deprecated_name='vnc_port_total', deprecated_group='DEFAULT', help='Total number of VNC ports'), - # Deprecated, remove in Icehouse - cfg.StrOpt('vnc_password', - deprecated_name='vnc_password', - deprecated_group='DEFAULT', - help='DEPRECATED. VNC password. The password-based access to ' - 'VNC consoles will be removed in the next release. The ' - 'default value will disable password protection on the ' - 'VNC console.', - secret=True), cfg.BoolOpt('use_linked_clone', default=True, deprecated_name='use_linked_clone', diff --git a/nova/virt/vmwareapi/vm_util.py b/nova/virt/vmwareapi/vm_util.py index c85079bb2785..0a24823d7a2f 100644 --- a/nova/virt/vmwareapi/vm_util.py +++ b/nova/virt/vmwareapi/vm_util.py @@ -557,7 +557,7 @@ def get_add_vswitch_port_group_spec(client_factory, vswitch_name, return vswitch_port_group_spec -def get_vnc_config_spec(client_factory, port, password): +def get_vnc_config_spec(client_factory, port): """Builds the vnc config spec.""" virtual_machine_config_spec = client_factory.create( 'ns0:VirtualMachineConfigSpec') @@ -569,15 +569,6 @@ def get_vnc_config_spec(client_factory, port, password): opt_port.key = "RemoteDisplay.vnc.port" opt_port.value = port extras = [opt_enabled, opt_port] - if password: - LOG.deprecated(_("The password-based access to VNC consoles will be " - "removed in the next release. Please, switch to " - "using the default value (this will disable password " - "protection on the VNC console).")) - opt_pass = client_factory.create('ns0:OptionValue') - opt_pass.key = "RemoteDisplay.vnc.password" - opt_pass.value = password - extras.append(opt_pass) virtual_machine_config_spec.extraConfig = extras return virtual_machine_config_spec diff --git a/nova/virt/vmwareapi/vmops.py b/nova/virt/vmwareapi/vmops.py index 3a89bb7f90a2..92ab3500c790 100644 --- a/nova/virt/vmwareapi/vmops.py +++ b/nova/virt/vmwareapi/vmops.py @@ -270,8 +270,7 @@ class VMwareVMOps(object): # Set the vnc configuration of the instance, vnc port starts from 5900 if CONF.vnc_enabled: vnc_port = self._get_vnc_port(vm_ref) - vnc_pass = CONF.vmware.vnc_password or '' - self._set_vnc_config(client_factory, instance, vnc_port, vnc_pass) + self._set_vnc_config(client_factory, instance, vnc_port) def _create_virtual_disk(): """Create a virtual disk of the size of flat vmdk file.""" @@ -1389,14 +1388,14 @@ class VMwareVMOps(object): LOG.debug(_("Reconfigured VM instance to set the machine id"), instance=instance) - def _set_vnc_config(self, client_factory, instance, port, password): + def _set_vnc_config(self, client_factory, instance, port): """ Set the vnc configuration of the VM. """ vm_ref = vm_util.get_vm_ref(self._session, instance) vnc_config_spec = vm_util.get_vnc_config_spec( - client_factory, port, password) + client_factory, port) LOG.debug(_("Reconfiguring VM instance to enable vnc on " "port - %(port)s") % {'port': port},