<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    ip_version sounds great. <br>
    <br>
    Currently the opt-names are written into the configuration file of
    dnsmasq directly. So I would say yes, they are coming from dnsmasq
    definitions. <br>
    <br>
    It will make more sense when ip_version is missing or null, the
    option apply to both since we could have only ipv6 or ipv4 address
    on the port. However, the validation of opt-value should rule out
    the ones which are not suitable for the current address. For
    example, an IPv6 dns server should not be specified for IPv4 address
    port, etc...<br>
    <br>
    Xu Han<br>
    <br>
    <div class="moz-cite-prefix">On 09/30/2014 08:41 PM, Robert Li
      (baoli) wrote:<br>
    </div>
    <blockquote cite="mid:D0501A61.BBD5E%25baoli@cisco.com" type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <div style="color: rgb(0, 0, 0);">Xu Han,</div>
      <div style="color: rgb(0, 0, 0);"><br>
      </div>
      <div style="color: rgb(0, 0, 0);">That looks good to me. To keep
        it consistent with existing CLI, we should use ip-version
        instead of ‘version’. It seems to be identical to prefixing the
        option_name with v4 or v6, though. </div>
      <div style="color: rgb(0, 0, 0);"><br>
      </div>
      <div style="color: rgb(0, 0, 0);">Just to clarify, are the
        available opt-names coming from dnsmasq definitions?</div>
      <div style="color: rgb(0, 0, 0);"><br>
      </div>
      <div><span style="color: rgb(0, 0, 0);">With regard to the
          default, your suggestion "</span><font color="#ff0000"><b>version
            is optional (no version means version=4).</b></font>" seems
        to be different from Mark’s:</div>
      <div>
        <blockquote cite="mid:D04ECDA5.BB8E9%25baoli@cisco.com"
          type="cite"><span id="OLK_SRC_BODY_SECTION">
            <blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE"
              style="border-left-color: rgb(181, 196, 223);
              border-left-width: 5px; border-left-style: solid; padding:
              0px 0px 0px 5px; margin: 0px 0px 0px 5px;">
              <div bgcolor="#FFFFFF" text="#000000">
                <blockquote
                  cite="mid:AE9B156A-E6B3-4B17-8614-994E3B38E0B7@mcclain.xyz"
                  type="cite">
                  I’m -1 for both options because neither is properly
                  backwards compatible.  Instead we should add an
                  optional 3rd value to the dictionary: “version”.  The
                  version key would be used to make the option only
                  apply to either version 4 or 6.  <font color="#ff0000"><b>If

                      the key is missing or null, then the option would
                      apply to both</b></font>. </blockquote>
              </div>
            </blockquote>
          </span></blockquote>
        <div><br>
        </div>
      </div>
      <div>Thanks,</div>
      <div>Robert</div>
      <div><br>
      </div>
      <span id="OLK_SRC_BODY_SECTION" style="color: rgb(0, 0, 0);">
        <div>
          <div>On 9/30/14, 1:46 AM, "Xu Han Peng" <<a
              moz-do-not-send="true" href="mailto:pengxuhan@gmail.com">pengxuhan@gmail.com</a>>
            wrote:</div>
        </div>
        <div><br>
        </div>
        <blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE"
          style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0
          0 0 5;">
          <div>
            <div bgcolor="#FFFFFF" text="#000000">Robert,<br>
              <br>
              I think the CLI will look something like based on Mark's
              suggestion:<br>
              <br>
              neutron port-create extra_dhcp_opts
              opt_name=<dhcp_option_name>,opt_value=<value>,version=4(or
              6) <network><br>
              <br>
              This extra_dhcp_opts can be repeated and version is
              optional (no version means version=4).<br>
              <br>
              Xu Han<br>
              <br>
              <div class="moz-cite-prefix">On 09/29/2014 08:51 PM,
                Robert Li (baoli) wrote:<br>
              </div>
              <blockquote cite="mid:D04ECDA5.BB8E9%25baoli@cisco.com"
                type="cite">
                <div>Hi Xu Han,</div>
                <div><br>
                </div>
                <div>My question is how the CLI user interface would
                  look like to distinguish between v4 and v6 dhcp
                  options?</div>
                <div><br>
                </div>
                <div>Thanks,</div>
                <div>Robert</div>
                <div><br>
                </div>
                <span id="OLK_SRC_BODY_SECTION">
                  <div>
                    <div>On 9/28/14, 10:29 PM, "Xu Han Peng" <<a
                        moz-do-not-send="true"
                        href="mailto:pengxuhan@gmail.com">pengxuhan@gmail.com</a>>
                      wrote:</div>
                  </div>
                  <div><br>
                  </div>
                  <blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE"
                    style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0
                    5; MARGIN:0 0 0 5;">
                    <div>
                      <div bgcolor="#FFFFFF" text="#000000">Mark's
                        suggestion works for me as well. If no one
                        objects, I am going to start the implementation.
                        <br>
                        <br>
                        Thanks,<br>
                        Xu Han<br>
                        <br>
                        <div class="moz-cite-prefix">On 09/27/2014 01:05
                          AM, Mark McClain wrote:<br>
                        </div>
                        <blockquote
                          cite="mid:AE9B156A-E6B3-4B17-8614-994E3B38E0B7@mcclain.xyz"
                          type="cite">
                          <br>
                          <div>
                            <div>On Sep 26, 2014, at 2:39 AM, Xu Han
                              Peng <<a moz-do-not-send="true"
                                href="mailto:pengxuhan@gmail.com">pengxuhan@gmail.com</a>>
                              wrote:</div>
                            <br class="Apple-interchange-newline">
                            <blockquote type="cite">
                              <div bgcolor="#FFFFFF" text="#000000">Currently
                                the extra_dhcp_opts has the following
                                API interface on a port:<br>
                                <br>
                                {<br>
                                    "port":<br>
                                    {<br>
                                        "extra_dhcp_opts": [<br>
                                            {"opt_value":
                                "testfile.1","opt_name":
                                "bootfile-name"},<br>
                                            {"opt_value":
                                "123.123.123.123", "opt_name":
                                "tftp-server"},<br>
                                            {"opt_value":
                                "123.123.123.45", "opt_name":
                                "server-ip-address"}<br>
                                        ],<br>
                                        ....<br>
                                     }<br>
                                }<br>
                                <br>
                                During the development of DHCPv6
                                function for IPv6 subnets, we found this
                                format doesn't work anymore because an
                                port can have both IPv4 and IPv6
                                address. So we need to find a new way to
                                specify extra_dhcp_opts for DHCPv4 and
                                DHCPv6, respectively. (
                                <a moz-do-not-send="true"
                                  href="https://bugs.launchpad.net/neutron/+bug/1356383">
https://bugs.launchpad.net/neutron/+bug/1356383</a>)<br>
                                <br>
                                Here are some thoughts about the new
                                format:<br>
                                <br>
                                Option1: Change the opt_name in
                                extra_dhcp_opts to add a prefix (v4 or
                                v6) so we can distinguish opts for v4 or
                                v6 by parsing the opt_name. For backward
                                compatibility, no prefix means IPv4 dhcp
                                opt.
                                <br>
                                <br>
                                        "extra_dhcp_opts": [<br>
                                            {"opt_value":
                                "testfile.1","opt_name":
                                "bootfile-name"},<br>
                                            {"opt_value":
                                "123.123.123.123", "opt_name": "<b>v4:</b>tftp-server"},<br>
                                            {"opt_value": "[2001:0200:<a
                                  moz-do-not-send="true"
                                  href="feed:7ac0::1]">feed:7ac0::1]</a>",
                                "opt_name": "<b>v6:</b>dns-server"}<br>
                                        ]<br>
                                <br>
                                Option2: break extra_dhcp_opts into IPv4
                                opts and IPv6 opts. For backward
                                compatibility, both old format and new
                                format are acceptable, but old format
                                means IPv4 dhcp opts.
                                <br>
                                <br>
                                        "extra_dhcp_opts": {<br>
                                             "ipv4": [<br>
                                                    {"opt_value":
                                "testfile.1","opt_name":
                                "bootfile-name"},<br>
                                                    {"opt_value":
                                "123.123.123.123", "opt_name":
                                "tftp-server"},<br>
                                             ],<br>
                                             "ipv6": [<br>
                                                    {"opt_value":
                                "[2001:0200:<a moz-do-not-send="true"
                                  href="feed:7ac0::1]">feed:7ac0::1]</a>",
                                "opt_name": "dns-server"}<br>
                                             ]<br>
                                        }<br>
                                <br>
                                The pro of Option1 is there is no need
                                to change API structure but only need to
                                add validation and parsing to opt_name.
                                The con of Option1 is that user need to
                                input prefix for every opt_name which
                                can be error prone. The pro of Option2
                                is that it's clearer than Option1. The
                                con is that we need to check two formats
                                for backward compatibility.
                                <br>
                                <br>
                                We discussed this in IPv6 sub-team
                                meeting and we think Option2 is
                                preferred. Can I also get community's
                                feedback on which one is preferred or
                                any other comments?<br>
                                <br>
                              </div>
                            </blockquote>
                            <br>
                          </div>
                          <div>I’m -1 for both options because neither
                            is properly backwards compatible.  Instead
                            we should add an optional 3rd value to the
                            dictionary: “version”.  The version key
                            would be used to make the option only apply
                            to either version 4 or 6.  If the key is
                            missing or null, then the option would apply
                            to both. </div>
                          <div><br>
                          </div>
                          <div>mark</div>
                          <br>
                          <br>
                          <fieldset class="mimeAttachmentHeader"></fieldset>
                          <br>
                          <pre wrap="">_______________________________________________
OpenStack-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a></pre>
                        </blockquote>
                        <br>
                      </div>
                    </div>
                  </blockquote>
                </span><br>
                <fieldset class="mimeAttachmentHeader"></fieldset>
                <br>
                <pre wrap="">_______________________________________________
OpenStack-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a></pre>
              </blockquote>
              <br>
            </div>
          </div>
        </blockquote>
      </span>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
OpenStack-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>