Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for device_id exception raised when creating Neutron network port in HPB #931

Merged
merged 1 commit into from
Jun 5, 2018

Conversation

jlongstaf
Copy link
Contributor

Issues:
Fixes #930

Problem: create_port_on_network() fails to set a device_id in
port data unless one is passed into the function. Because the
agent calls this method without a device_id it will always
fail.

Analysis: Code was recently changed so that the passed in device_id
is always used, but failed to account for situations when device_id
is not given. Added additional code to set device_id to a uuid ID
when no device_id is given.

@jlongstaf jlongstaf self-assigned this Jun 5, 2018
@jlongstaf jlongstaf requested a review from ssorenso June 5, 2018 20:36
… HPB)

Issues:
Fixes F5Networks#930

Problem: create_port_on_network() fails to set a device_id in
port data unless one is passed into the function. Because the
agent calls this method without a device_id it will always
fail.

Analysis: Code was recently changed so that the passed in device_id
is always used, but failed to account for situations when device_id
is not given. Added additional code to set device_id to a uuid ID
when no device_id is given.

Tests:
@@ -536,6 +538,8 @@ def create_port_on_subnet(self, context, subnet_id=None,

if device_id:
port_data['device_id'] = device_id
else:
port_data['device_id'] = str(uuid.uuid5(uuid.NAMESPACE_DNS, str(host)))
Copy link

Choose a reason for hiding this comment

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

@jlongstaf - flake is complaining that this and it's sister line at 708 are too long (exceeds 80 character limit).
Otherwise, it looks good.

@ssorenso ssorenso merged commit fd6ea42 into F5Networks:stable/newton Jun 5, 2018
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.

2 participants