diff --git a/ironicclient/osc/v1/baremetal_port.py b/ironicclient/osc/v1/baremetal_port.py index 632b4befc..097d51cfd 100644 --- a/ironicclient/osc/v1/baremetal_port.py +++ b/ironicclient/osc/v1/baremetal_port.py @@ -69,17 +69,6 @@ class CreateBaremetalPort(command.ShowOne): "the required keys are 'port_id' and 'hostname'. " "Argument can be specified multiple times.") ) - parser.add_argument( - '-l', - dest='local_link_connection_deprecated', - metavar="", - action='append', - help=_("DEPRECATED. Please use --local-link-connection instead. " - "Key/value metadata describing Local link connection " - "information. Valid keys are 'switch_info', 'switch_id', " - "and 'port_id'. The keys 'switch_id' and 'port_id' are " - "required. Can be specified multiple times.") - ) parser.add_argument( '--pxe-enabled', metavar='', @@ -124,18 +113,6 @@ class CreateBaremetalPort(command.ShowOne): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal - if parsed_args.local_link_connection_deprecated: - self.log.warning("Please use --local-link-connection instead " - "of -l, as it is deprecated and will be " - "removed in future releases.") - # It is parsed to either None, or to an array - if parsed_args.local_link_connection: - parsed_args.local_link_connection.extend( - parsed_args.local_link_connection_deprecated) - else: - parsed_args.local_link_connection = ( - parsed_args.local_link_connection_deprecated) - field_list = ['address', 'uuid', 'extra', 'node_uuid', 'pxe_enabled', 'local_link_connection', 'portgroup_uuid', 'physical_network', 'name', 'description'] diff --git a/ironicclient/tests/unit/osc/v1/test_baremetal_port.py b/ironicclient/tests/unit/osc/v1/test_baremetal_port.py index fa05df128..83b114eb4 100644 --- a/ironicclient/tests/unit/osc/v1/test_baremetal_port.py +++ b/ironicclient/tests/unit/osc/v1/test_baremetal_port.py @@ -180,24 +180,6 @@ class TestCreateBaremetalPort(TestBaremetalPort): self.baremetal_mock.port.create.assert_called_once_with(**args) self.cmd.log.warning.assert_called() - def test_baremetal_port_create_llc_warning_some_deprecated(self): - self._test_baremetal_port_create_llc_warning( - additional_args=['-l', 'port_id=eth0', '--local-link-connection', - 'switch_id=aa:bb:cc:dd:ee:ff'], - additional_verify_items=[ - ('local_link_connection_deprecated', ['port_id=eth0']), - ('local_link_connection', ['switch_id=aa:bb:cc:dd:ee:ff'])] - ) - - def test_baremetal_port_create_llc_warning_all_deprecated(self): - self._test_baremetal_port_create_llc_warning( - additional_args=['-l', 'port_id=eth0', '-l', - 'switch_id=aa:bb:cc:dd:ee:ff'], - additional_verify_items=[('local_link_connection_deprecated', - ['port_id=eth0', - 'switch_id=aa:bb:cc:dd:ee:ff'])] - ) - def test_baremetal_port_create_portgroup_uuid(self): arglist = [ baremetal_fakes.baremetal_port_address, diff --git a/releasenotes/notes/remove-port-create-l-option-08ce0a3fc3e48d59.yaml b/releasenotes/notes/remove-port-create-l-option-08ce0a3fc3e48d59.yaml new file mode 100644 index 000000000..9f9bbc81c --- /dev/null +++ b/releasenotes/notes/remove-port-create-l-option-08ce0a3fc3e48d59.yaml @@ -0,0 +1,5 @@ +--- +deprecations: + - | + The deprecated ``-l`` option of ``openstack baremetal port create`` command + was removed. Use the ``--local-link-connection`` option istead.