Skip to content

Commit

Permalink
Merge pull request #931 from jlongstaf/stable/newton
Browse files Browse the repository at this point in the history
Fix for device_id exception raised when creating Neutron network port in customer's stack
  • Loading branch information
ssorenso authored Jun 5, 2018
2 parents 09a1c3b + 79fe8f5 commit fd6ea42
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions f5lbaasdriver/v2/bigip/plugin_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# limitations under the License.
#

import uuid

from oslo_log import helpers as log_helpers
from oslo_log import log as logging

Expand Down Expand Up @@ -536,6 +538,9 @@ 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)))
port_data[portbindings.HOST_ID] = host
port_data[portbindings.VNIC_TYPE] = vnic_type
port_data[portbindings.PROFILE] = binding_profile
Expand Down Expand Up @@ -700,6 +705,9 @@ def create_port_on_network(self, context, network_id=None,
}
if device_id:
port_data['device_id'] = device_id
else:
port_data['device_id'] = str(uuid.uuid5(
uuid.NAMESPACE_DNS, str(host)))
port_data[portbindings.HOST_ID] = host
port_data[portbindings.VNIC_TYPE] = vnic_type
port_data[portbindings.PROFILE] = binding_profile
Expand Down

0 comments on commit fd6ea42

Please sign in to comment.