Remove deprecated pxe_deploy_{kernel, ramdisk}

In the last cycle we have renamed some parameters to make it more
consistent across different drivers. This patch is removing the deprecated
pxe_deploy_{kernel, ramdisk} parameters from the code and updating the
documentation accordingly.

Depends-On: I3dcf8df130efc0c2ea35695018bedba31bf0570c
Change-Id: I07eb7ad28929b651cf04ef3955903e4f4ecf9900
This commit is contained in:
Lucas Alvares Gomes 2015-05-27 12:17:21 +01:00
parent e8bb292c37
commit d5e9dc64fc
6 changed files with 36 additions and 66 deletions

View File

@ -633,7 +633,7 @@ mapped to the bare metal server through the hardware specifications.
"baremetal:deploy_kernel_id"=$DEPLOY_VMLINUZ_UUID \
"baremetal:deploy_ramdisk_id"=$DEPLOY_INITRD_UUID
- **Juno** and higher versions of Ironic::
- **Juno** version of Ironic::
nova flavor-key my-baremetal-flavor set cpu_arch=$ARCH
@ -642,7 +642,19 @@ mapped to the bare metal server through the hardware specifications.
ironic node-update $NODE_UUID add \
driver_info/pxe_deploy_kernel=$DEPLOY_VMLINUZ_UUID \
driver_info/pxe_deploy_ramdisk=$DEPLOY_INITRD_UUID \
driver_info/pxe_deploy_ramdisk=$DEPLOY_INITRD_UUID
- **Kilo** and higher versions of Ironic::
nova flavor-key my-baremetal-flavor set cpu_arch=$ARCH
Associate the deploy ramdisk and deploy kernel images each of your
node's driver_info::
ironic node-update $NODE_UUID add \
driver_info/deploy_kernel=$DEPLOY_VMLINUZ_UUID \
driver_info/deploy_ramdisk=$DEPLOY_INITRD_UUID
Setup the drivers for Bare Metal Service
========================================
@ -1090,8 +1102,8 @@ if desired.
| ipmi_password | password. Optional. |
| ipmi_username | username; default is NULL user. Optional. |
| ... | ... |
| pxe_deploy_kernel | UUID (from Glance) of the deployment kernel. Required. |
| pxe_deploy_ramdisk | UUID (from Glance) of the ramdisk that is mounted at boot time. Required. |
| deploy_kernel | UUID (from Glance) of the deployment kernel. Required. |
| deploy_ramdisk | UUID (from Glance) of the ramdisk that is mounted at boot time. Required. |
+----------------------+-------------------------------------------------------------------------------------------------------------+
ironic node-update $NODE_UUID add \
@ -1123,13 +1135,13 @@ if desired.
ironic node-update $NODE_UUID add \
properties/capabilities=key1:val1,key2:val2
#. As mentioned in the `Flavor Creation`_ section, if using the Juno or later
#. As mentioned in the `Flavor Creation`_ section, if using the Kilo or later
release of Ironic, you should specify a deploy kernel and ramdisk which
correspond to the Node's driver, eg::
ironic node-update $NODE_UUID add \
driver_info/pxe_deploy_kernel=$DEPLOY_VMLINUZ_UUID \
driver_info/pxe_deploy_ramdisk=$DEPLOY_INITRD_UUID \
driver_info/deploy_kernel=$DEPLOY_VMLINUZ_UUID \
driver_info/deploy_ramdisk=$DEPLOY_INITRD_UUID \
#. You must also inform Ironic of the Network Interface Cards which are part of
the Node by creating a Port with each NIC's MAC address. These MAC
@ -1402,15 +1414,15 @@ Steps to start a deployment are pretty similar to those when using Nova:
ironic node-create -d pxe_ipmitool -i ipmi_address=ipmi.server.net \
-i ipmi_username=user -i ipmi_password=pass \
-i pxe_deploy_kernel=file:///images/deploy.vmlinuz \
-i pxe_deploy_ramdisk=http://my.server.net/images/deploy.ramdisk
-i deploy_kernel=file:///images/deploy.vmlinuz \
-i deploy_ramdisk=http://my.server.net/images/deploy.ramdisk
+--------------+--------------------------------------------------------------------------+
| Property | Value |
+--------------+--------------------------------------------------------------------------+
| uuid | be94df40-b80a-4f63-b92b-e9368ee8d14c |
| driver_info | {u'pxe_deploy_ramdisk': u'http://my.server.net/images/deploy.ramdisk', |
| | u'pxe_deploy_kernel': u'file:///images/deploy.vmlinuz', u'ipmi_address': |
| driver_info | {u'deploy_ramdisk': u'http://my.server.net/images/deploy.ramdisk', |
| | u'deploy_kernel': u'file:///images/deploy.vmlinuz', u'ipmi_address': |
| | u'ipmi.server.net', u'ipmi_username': u'user', u'ipmi_password': |
| | u'******'} |
| extra | {} |
@ -1419,7 +1431,7 @@ Steps to start a deployment are pretty similar to those when using Nova:
| properties | {} |
+--------------+--------------------------------------------------------------------------+
Note that here pxe_deploy_kernel and pxe_deploy_ramdisk contain links to
Note that here deploy_kernel and deploy_ramdisk contain links to
images instead of Glance UUIDs.
#. As in case of Nova, you can also provide ``capabilities`` to node

View File

@ -535,8 +535,8 @@ Nodes configured for iLO driver should have the ``driver`` property set to
- ``ilo_address``: IP address or hostname of the iLO.
- ``ilo_username``: Username for the iLO with administrator privileges.
- ``ilo_password``: Password for the above iLO user.
- ``pxe_deploy_kernel``: The Glance UUID of the deployment kernel.
- ``pxe_deploy_ramdisk``: The Glance UUID of the deployment ramdisk.
- ``deploy_kernel``: The Glance UUID of the deployment kernel.
- ``deploy_ramdisk``: The Glance UUID of the deployment ramdisk.
- ``client_port``: (optional) Port to be used for iLO operations if you are
using a custom port on the iLO. Default port used is 443.
- ``client_timeout``: (optional) Timeout for iLO operations. Default timeout
@ -547,7 +547,7 @@ Nodes configured for iLO driver should have the ``driver`` property set to
For example, you could run a similar command like below to enroll the Proliant
node::
ironic node-create -d pxe_ilo ilo_address=<ilo-ip-address> -i ilo_username=<ilo-username> -i ilo_password=<ilo-password> -i pxe_deploy_kernel=<glance-uuid-of-pxe-deploy-kernel> pxe_deploy_ramdisk=<glance-uuid-of-deploy-ramdisk>
ironic node-create -d pxe_ilo ilo_address=<ilo-ip-address> -i ilo_username=<ilo-username> -i ilo_password=<ilo-password> -i deploy_kernel=<glance-uuid-of-pxe-deploy-kernel> deploy_ramdisk=<glance-uuid-of-deploy-ramdisk>
Boot modes
~~~~~~~~~~
@ -732,7 +732,7 @@ The following iLO drivers support hardware inspection:
* ``agent_ilo``
.. note::
* The RAID needs to be pre-configured prior to inspection otherwise
proliantutils returns 0 for disk size.
* The iLO firmware version needs to be 2.10 or above for nic_capacity to be

View File

@ -84,8 +84,8 @@ Nodes configured for SeaMicro driver should have the ``driver`` property set to
- ``seamicro_server_id``: SeaMicro Server ID. Expected format is <int>/<int>
- ``seamicro_username``: SeaMicro Username with administrator privileges.
- ``seamicro_password``: Password for the above SeaMicro user.
- ``pxe_deploy_kernel``: The Glance UUID of the deployment kernel.
- ``pxe_deploy_ramdisk``: The Glance UUID of the deployment ramdisk.
- ``deploy_kernel``: The Glance UUID of the deployment kernel.
- ``deploy_ramdisk``: The Glance UUID of the deployment ramdisk.
- ``seamicro_api_version``: (optional) SeaMicro API Version defaults to "2".
- ``seamicro_terminal_port``: (optional) Node's UDP port for console access.
Any unused port on the Ironic conductor node may be used.
@ -99,7 +99,7 @@ boot an instance on it:
Create Node::
ironic node-create -d pxe_seamicro -i seamicro_api_endpoint=https://<seamicro_ip_address>/ -i seamicro_server_id=<seamicro_server_id> -i seamicro_username=<seamicro_username> -i seamicro_password=<seamicro_password> -i seamicro_api_version=<seamicro_api_version> -i seamicro_terminal_port=<seamicro_terminal_port> -i pxe_deploy_kernel=<glance_uuid_of_pxe_deploy_kernel> -i pxe_deploy_ramdisk=<glance_uuid_of_deploy_ramdisk> -p cpus=<number_of_cpus> -p memory_mb=<memory_size_in_MB> -p local_gb=<local_disk_size_in_GB> -p cpu_arch=<cpu_arch>
ironic node-create -d pxe_seamicro -i seamicro_api_endpoint=https://<seamicro_ip_address>/ -i seamicro_server_id=<seamicro_server_id> -i seamicro_username=<seamicro_username> -i seamicro_password=<seamicro_password> -i seamicro_api_version=<seamicro_api_version> -i seamicro_terminal_port=<seamicro_terminal_port> -i deploy_kernel=<glance_uuid_of_deploy_kernel> -i deploy_ramdisk=<glance_uuid_of_deploy_ramdisk> -p cpus=<number_of_cpus> -p memory_mb=<memory_size_in_MB> -p local_gb=<local_disk_size_in_GB> -p cpu_arch=<cpu_arch>
Associate port with the node created::

View File

@ -106,12 +106,6 @@ REQUIRED_PROPERTIES = {
"Required."),
'deploy_ramdisk': _("UUID (from Glance) of the ramdisk that is "
"mounted at boot time. Required."),
'pxe_deploy_kernel': _("DEPRECATED: Use deploy_kernel instead. UUID "
"(from Glance) of the deployment kernel. "
"Required."),
'pxe_deploy_ramdisk': _("DEPRECATED: Use deploy_ramdisk instead. UUID "
"(from Glance) of the ramdisk that is "
"mounted at boot time. Required."),
}
COMMON_PROPERTIES = REQUIRED_PROPERTIES
@ -128,29 +122,10 @@ def _parse_driver_info(node):
:raises: MissingParameterValue
"""
info = node.driver_info
d_info = {}
# NOTE(lucasagomes): For backwards compatibility let's keep accepting
# pxe_deploy_{kernel, ramdisk}, should be removed in Liberty.
deprecated_msg = _LW('The "%(old_param)s" parameter is deprecated. '
'Please update the node %(node)s to use '
'"%(new_param)s" instead.')
for parameter in ('deploy_kernel', 'deploy_ramdisk'):
value = info.get(parameter)
if not value:
old_parameter = 'pxe_' + parameter
value = info.get(old_parameter)
if value:
LOG.warning(deprecated_msg, {'old_param': old_parameter,
'new_param': parameter,
'node': node.uuid})
d_info[parameter] = value
d_info = {k: info.get(k) for k in ('deploy_kernel', 'deploy_ramdisk')}
error_msg = _("Cannot validate PXE bootloader. Some parameters were"
" missing in node's driver_info")
deploy_utils.check_for_missing_params(d_info, error_msg)
return d_info

View File

@ -3311,8 +3311,7 @@ class ManagerTestProperties(tests_db_base.DbTestCase):
self._check_driver_properties("fake_ssh", expected)
def test_driver_properties_fake_pxe(self):
expected = ['pxe_deploy_kernel', 'pxe_deploy_ramdisk',
'deploy_kernel', 'deploy_ramdisk']
expected = ['deploy_kernel', 'deploy_ramdisk']
self._check_driver_properties("fake_pxe", expected)
def test_driver_properties_fake_seamicro(self):
@ -3332,37 +3331,32 @@ class ManagerTestProperties(tests_db_base.DbTestCase):
'ipmi_username', 'ipmi_bridging', 'ipmi_transit_channel',
'ipmi_transit_address', 'ipmi_target_channel',
'ipmi_target_address', 'ipmi_local_address',
'pxe_deploy_kernel', 'pxe_deploy_ramdisk',
'deploy_kernel', 'deploy_ramdisk',
]
self._check_driver_properties("pxe_ipmitool", expected)
def test_driver_properties_pxe_ipminative(self):
expected = ['ipmi_address', 'ipmi_password', 'ipmi_username',
'pxe_deploy_kernel', 'pxe_deploy_ramdisk',
'deploy_kernel', 'deploy_ramdisk',
'ipmi_terminal_port']
self._check_driver_properties("pxe_ipminative", expected)
def test_driver_properties_pxe_ssh(self):
expected = ['pxe_deploy_kernel', 'pxe_deploy_ramdisk',
'deploy_kernel', 'deploy_ramdisk',
expected = ['deploy_kernel', 'deploy_ramdisk',
'ssh_address', 'ssh_username', 'ssh_virt_type',
'ssh_key_contents', 'ssh_key_filename',
'ssh_password', 'ssh_port']
self._check_driver_properties("pxe_ssh", expected)
def test_driver_properties_pxe_seamicro(self):
expected = ['pxe_deploy_kernel', 'pxe_deploy_ramdisk',
'deploy_kernel', 'deploy_ramdisk',
expected = ['deploy_kernel', 'deploy_ramdisk',
'seamicro_api_endpoint', 'seamicro_password',
'seamicro_server_id', 'seamicro_username',
'seamicro_api_version', 'seamicro_terminal_port']
self._check_driver_properties("pxe_seamicro", expected)
def test_driver_properties_pxe_snmp(self):
expected = ['pxe_deploy_kernel', 'pxe_deploy_ramdisk',
'deploy_kernel', 'deploy_ramdisk',
expected = ['deploy_kernel', 'deploy_ramdisk',
'snmp_driver', 'snmp_address', 'snmp_port', 'snmp_version',
'snmp_community', 'snmp_security', 'snmp_outlet']
self._check_driver_properties("pxe_snmp", expected)

View File

@ -99,17 +99,6 @@ class PXEValidateParametersTestCase(db_base.DbTestCase):
self.assertIsNotNone(info.get('deploy_ramdisk'))
self.assertIsNotNone(info.get('deploy_kernel'))
def test__parse_driver_info_backwards_compat(self):
old_drv_info = {}
old_drv_info['pxe_deploy_kernel'] = DRV_INFO_DICT['deploy_kernel']
old_drv_info['pxe_deploy_ramdisk'] = DRV_INFO_DICT['deploy_ramdisk']
node = obj_utils.create_test_node(self.context,
driver='fake_pxe',
driver_info=old_drv_info)
info = pxe._parse_driver_info(node)
self.assertIsNotNone(info.get('deploy_ramdisk'))
self.assertIsNotNone(info.get('deploy_kernel'))
class PXEPrivateMethodsTestCase(db_base.DbTestCase):