Skip to content

Commit

Permalink
Use dhcp-option-value-bytes also in displaying via neutron.
Browse files Browse the repository at this point in the history
When the option value in bytes is set, use that while displaying the option
in Neutron.

Change-Id: I0e1538946d16582fc5b9abf48e9090bb3a155c81
closes-bug: 1490418
  • Loading branch information
haripk committed Sep 7, 2015
1 parent 813d488 commit 3522e67
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/config/vnc_openstack/vnc_openstack/neutron_plugin_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -1912,8 +1912,13 @@ def _port_vnc_to_neutron(self, port_obj, port_req_memo=None):
if dhcp_options_list and dhcp_options_list.dhcp_option:
dhcp_options = []
for dhcp_option in dhcp_options_list.dhcp_option:
pair = {"opt_value": dhcp_option.dhcp_option_value,
"opt_name": dhcp_option.dhcp_option_name}
# if dhcp_option_value_bytes is set, consider that value
if dhcp_option.dhcp_option_value_bytes:
pair = {"opt_value": dhcp_option.dhcp_option_value_bytes,
"opt_name": dhcp_option.dhcp_option_name}
else:
pair = {"opt_value": dhcp_option.dhcp_option_value,
"opt_name": dhcp_option.dhcp_option_name}
dhcp_options.append(pair)
port_q_dict['extra_dhcp_opts'] = dhcp_options

Expand Down

0 comments on commit 3522e67

Please sign in to comment.