Skip to content

Conversation

@markgoddard
Copy link

The ib_physnet plugin populates the physical_network field of ironic
ports determined to be Infiniband ports. Ports with a 'client-id' field
in their 'extra' attribute are determined to be IB ports.

The plugin is configured via the option [port_physnet] ib_physnet, which
is the name of the physical network to apply.

The ib_physnet plugin populates the physical_network field of ironic
ports determined to be Infiniband ports. Ports with a 'client-id' field
in their 'extra' attribute are determined to be IB ports.

The plugin is configured via the option [port_physnet] ib_physnet, which
is the name of the physical network to apply.
@markgoddard markgoddard self-assigned this Apr 4, 2018
:returns: The physical network to set, or None.
"""
proc_data = introspection_data['all_interfaces'][iface_name]
if proc_data.get('client_id'):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this was called something more specific like ib_client_id it might be more obvious to someone not familiar with IB, that it was an IB port but not to worry.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this really isn't the best way to identify IB ports. It was added in the original ironic IB spec: https://specs.openstack.org/openstack/ironic-specs/specs/not-implemented/add-infiniband-support.html

@@ -0,0 +1,67 @@
# Copyright (c) 2017 StackHPC Ltd.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

attonit: 2018

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

def test_expected_data_non_ib(self):
cfg.CONF.set_override('ib_physnet', 'physnet1',
group='port_physnet')
self.data['all_interfaces']['em1']['client_id'] = None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose we could also try with the client_id key removed, not that the code's broken.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@markgoddard markgoddard merged commit d9a9f25 into master Apr 4, 2018
@markgoddard markgoddard deleted the ib-physnet branch April 4, 2018 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants