summaryrefslogtreecommitdiff
path: root/ironic_python_agent/netutils.py
Commit message (Collapse)AuthorAgeFilesLines
* Collect IPv6 address during introspectionzhengyong2018-07-241-3/+12
| | | | | | | | | | | | | This patch adds support to retrieve IPv6 address. A new field ``ipv6_address`` is added to NetworkInterface and store the assigned IPv6 address (if any). Co-Authored-By: Kaifeng Wang <kaifeng.w@gmail.com> Change-Id: Ia527a5aa48e3daf66d2be190e43935b38b3bd6f9 Closes-Bug: #1744064 Story: #1744064 Task: #11604
* mlnx hardware_manager: get mac address using netifacesMoshe Levi2018-03-111-0/+9
| | | | Change-Id: I62e4ca6afb0f8a256ddf9bbc48225fbb96f9e817
* [LLDP] Skip NICs that say they are ready but are unreadable.Sam Betts2017-11-281-4/+11
| | | | | | | | | | | | | While listening for LLDP packets, if one of the sockets marks itself as ready to read then our code will try to read data from that socket, but if something goes wrong while reading that data then it causes IPA to raise out of the loop skipping any other of the other NICs which might have worked. This patch adds code to catch and LOG any exception that is raised while we are trying to read data from one of the sockets so that we can proceed to process all the NICs. Change-Id: I8546097f5ae23755a5fdb448902007a2d823b7bf Closes-Bug: #1665025
* Agent: Listen for connections on both IPv4 and IPv6 portsDerek Higgins2017-01-191-0/+6
| | | | | | | Allow connections if deploying over a IPv6 network. Change-Id: Ied2f6be4aa4d1a70524df1df3506e596f6926e5b Closes-Bug: #1650539
* Advertise the correct address when using IPv6Derek Higgins2017-01-111-0/+7
| | | | | | | | | Parse the output of "ip route get $IP" taking IPv6 into consideration. Also wrap the IP address in square brackets if it is IPv6. Change-Id: Ifc44e5aa3c5b814b6ceba04461bb68fe1d75c22b Closes-Bug: #1650533
* Add a new Hardware Manager for Mellanox NICsMoshe Levi2016-11-221-0/+1
| | | | | | | | | | | | | | | | | This patch add Mellanox Manager to support Mellanox InfiniBand NICs. It adds client_id to the NetworkInterface for the InfiniBand network interface. The Mellanox Manager provides it own implementation of get_interface_info. The mlnx get_interface_info generate InfiniBand MAC and client-id from the InfiniBand network interface address. Closes-Bug: #1532534 Change-Id: I4e7f7649a1bdeaa3ee99b2748037b0f37fea486c
* Dispatched out network interface info to all hardware managersMoshe Levi2016-11-171-0/+21
| | | | | | | | | | This patch dispatches out the network_interface_info to allow vendor hardware managers to plug the spacific implementation. It also move neworking releated methods form hardware to netutils Related-Bug: #1532534 Change-Id: Idcd25c4753c009b5ba70bea97ee4eb83391a77a9
* Fix several errors in LLDP handling codeDmitry Tantsur2016-11-091-20/+18
| | | | | | | | | * Stop silencing exceptions in raw socket context manager * Correctly handle receiving packages with odd size and too small ones * Fix a unit test that was testing nothing due to bad mocking Change-Id: Ic8626d10618f52d50667d2698f34a92f5dcac33e Closes-Bug: #1640238
* Build socket list right before select callRobert Li2016-08-171-2/+1
| | | | | | | | | | This will make sure the socket list and the interface list are always in sync, and the select call is on the right list of sockets. Co-Authored-By: Dmitry Tantsur <dtantsur@redhat.com> Closes-Bug: #1533892 Change-Id: Id6710f4648203b7d476a2a16ea647224baca1bb9
* Consolidate IPA configuration into a config moduleSam Betts2016-05-311-5/+0
| | | | | | | | This patch moves the IPA oslo configs out of the agent cmd into their own module so that it is safe to import them from other places in the application without causing circular imports. Change-Id: I100792bd0d1f369763afaa6f93e144e9967c3048
* Use oslo.log instead of original loggingZhiQiang Fan2015-10-241-1/+1
| | | | | | | | We are using oslo.log now, but some of the modules still use logging. We should use oslo.log to keep consistency, besides, oslo.log can provide fine wrapper for OpenStack projects. Change-Id: Ibe57e503b88b39e284a9e4b11a1886cd4e8d4ccf
* Add Python3 supportLucas Alvares Gomes2015-07-151-3/+2
| | | | | | | | | This patch add Python 3 support for IPA. We still need to enable it on gate to avoid code breaking the support from sneaking in. Partial-Bug: #1474896 Depends-On: I5a774eaa8d978f4d50faca4dc1b03a87fb194ce2 Change-Id: If47c0797b63d2914b3c47aba62ec5201301b6c33
* Move _get_agent_params() to a common placeLucas Alvares Gomes2015-03-101-0/+5
| | | | | | | | | The function _get_agent_params() parse the parameters passed to the agent via kernel cmdline or vmedia. Other parts of the code needs to access these parameters as well, so this patch is moving _get_agent_params() and the related functions to a common place (utils.py). Change-Id: I860f84d1d13511fff56d4aa56358ee597a9760d5
* Fix incorrect IPA log messageJosh Gachnang2015-03-031-2/+2
| | | | Change-Id: I520250287ae64495604e575b13a11481d03b79b2
* use oslo_config replace oslo.configjiangfei2015-02-071-1/+1
| | | | | | | | | oslo.conifg 1.6.0 has moved its namespace from old oslo.config to oslo_config requirements has updated to oslo.conifg 1.6.0 Change-Id: I16b8dc680f8a7697b7fbbd888f5162d924b4c0fe
* Fix missing string format symbolJosh Gachnang2014-12-151-1/+1
| | | | Change-Id: I94ec7299a5c918b3569e1e6f64a9bfa0c70d28d4
* Use LLDP to get switch port mappingJim Rollenhagen2014-12-091-0/+197
Provides a function to listen for LLDP packets on the network. Listens on one or all of the network interfaces, and then parses the found packets. Change-Id: I1545a41f46cd0916aab9c43ce036865454fa66e0 Co-Authored-By: Josh Gachnang <josh@pcsforeducation.com>