Commit Graph

13 Commits

Author SHA1 Message Date
Sharpz7 98a226b9c6 [codespell] Fixing Spelling Mistakes
This is the first in a series of commits to add support for codespell. This is continuning the process completed in ironic-python-agent.

Future Commits will add a Tox Target, CI support and potentially a git-blame-ignore-revs file if their are lots of spelling mistakes that could clutter git blame.

Change-Id: Icb4e66359c3e79618c916b35793ea7b5f79b030d
2024-01-25 21:22:07 +00:00
Dmitry Tantsur c2cb0f235a Support LLDP data coming in the new field
Change-Id: Id8d6978035f81215c52ed5ab3406d7adac2c561e
Depends-On: https://review.opendev.org/c/openstack/ironic-python-agent/+/881462
2023-04-25 12:22:33 +02:00
François Rigault f5e3a665f7 Use port.id instead of port.uuid
This is a follow-up for extra issues identified during code review of
Ib4978f5e3e4f1b64faa1bfae3cdcf46199bb2f21

Story: 2008698
Task: 42099
Change-Id: Ic18d42209d0f0f7c12ab0972dba2b97bb93b7c4e
2021-03-24 00:42:47 +01:00
Riccardo Pittau 721bd814a6 Use latest version of python construct
Also increasing minimum version to 2.9.39 for String class name
change to PaddedString.

Change-Id: Ie7b80f4698a77208c89797b82f7e41fcd8dbf168
2020-05-14 10:37:07 +02:00
Riccardo Pittau 4eefb42550 Finalize ironicclient removal
Completely remove dependency from ironicclient in favor of
openstacksdk.

Change-Id: I9b98ddb05fe867a0d3884f736a2edd7b4d61b00c
2020-03-25 10:08:38 +01:00
Bob Fournier 7703aab662 Handle validation failure if not all switch fields received
The Ironic API has a validation on the LocalLinkConnectionType to
ensure all mandatory values are included. Handle failures which
could occur if the switch does not send all mandatory fields.

Change-Id: I8716a69586265a58520cc2c6bc0bbc00a7c159da
Story: 2004238
Task: 27761
2018-11-13 08:19:14 -05:00
Bob Fournier 97282c64e9 Only set switch_id in local_link_connection if it is a mac address
When the processed lldp data is used for setting the local_link_connection
switch_id, it will set it even if the Chassis ID is not a mac.  Need to
only set it when the ChassisId is a mac address, as is done when using
non-processed lldp data.  Ironic validates that switch_id is either a
mac address or OpenFlow datapath ID.

This fixes a regresssion introduced in Pike.

Change-Id: I566acb5b19852b541df7554870ab2666f7df9614
Closes-Bug: 1748022
2018-02-13 09:33:58 +00:00
Dmitry Tantsur 782ee92c45 Set pxe_enabled on new and existing ports on introspection
Set it to True for the PXE-booting port, to False for all the others.
Create an extended functional tests covering various operations with ports.

Change-Id: I435a5c04884b6c4da70cb7260b305fbde23eebc0
Closes-Bug: #1667472
2017-04-18 10:20:49 +00:00
Bob Fournier 07c94392e2 Use processed lldp data, if available, for local_link_connection plugin
This change uses the processed lldp stored by the lldp_basic plugin
to populate the local_link_connection port_id and switch_id.

If processed lldp data cannot be found, the raw lldp data is processed by
this plugin as currently implemented.  This patch changes the
processing to use the construct lib as implemented in the common
definitions in lldp_tlvs.py to parse the LLDP TLVs.

A minor change is also made to pass node_info into warning log messages.

Change-Id: Iae3fa41736898df2c73350d8dc61ed24f2963e32
2017-04-10 14:34:22 -04:00
Annie Lezil 1e6b689286 Remove translation of log messages Part-2
The i18n team has decided not to translate the logs because it seems
like it not very useful.

Change-Id: I46c1b0c3efa28c3f887b1a29dc77d47fe749be87
Closes-Bug: #1674374
2017-03-28 01:53:40 +00:00
Sam Betts c18d3cf450 LLC Hook: Do not assume interfaces are added to Ironic
The current local_link_connection hook assumes that all inspected
interfaces are either added to or already exist in ironic as ports. When
CONF.processing.add_ports is set to PXE, and a node has more interfaces
than the one that we PXE on, then there will be more interfaces in the
inventory than added to Ironic. This patch ensures we must handle that
scenario.

Change-Id: I42c98c571ae8cfc26f319b712b5ac5bad88bb75d
Closes-Bug: #1628991
2016-09-30 16:39:41 +01:00
Sam Betts 20d941eeb1 LLC Hook: Fix patching Ironic ports
This patch corrects a problem with the LLC hook's use
of the node_info.patch_port function, ensuring the correct data is
passed to the function, not a unicode string.

This patch also ensures that the mac addresses for chassis-id and
port-id are passed to ironic in the expected Unix format. Ironic will
fail to validate the mac addresses without this.

Change-Id: Id5b729cd9e9beeb4f59ba6950162163d2fdf3a3a
Closes-Bug: #1629302
Closes-Bug: #1629303
2016-09-30 16:33:37 +01:00
Sam Betts 4af672b849 Add GenericLocalLinkConnectionHook processing hook
For Ironic multi-tenant networking support, we need to be able to
discover the nodes local connectivity. To do this IPA can try to pull
LLDP packets for every NIC.

This patch adds a processing hook to handle the data from these packets
in ironic-inspector so that we can populate the correct fields fields in
Ironic. The generic lldp hook only handles the mandatory fields port id
and chassis id, set on port_id and switch_id in local_link_connection.

Further LLDP fields should be handled by additional vendor specific LLDP
processing hooks, that populate the switch_info field in a non-generic
way.

Change-Id: I884eaaa9cc54cd08c21147da438b1dabc10d3a40
Related-Bug: #1526403
Depends-On: Ie655fd59b06de7b84fba3b438d5e4c2ecd8075c3
Depends-On: Idae9b1ede1797029da1bd521501b121957ca1f1a
2016-07-29 15:00:22 +01:00