<div dir="ltr">While it is entirely possible that the feature is broken, it seems that in this case you're expecting the allowed_address_pairs to populate fixed_ips.<div>Neutron does many crazy and unreasonable things but asking you to pass an attribute in the request to populate another attribute is not one of these!</div><div><br></div><div>Basically allowed address pairs are MAC/IP pairs for which you allow traffic on a port, but that are not managed by neutron. This means that, in your case, if you defined an additional IP address and set it to<span style="font-size:12.8000001907349px"> 192.168.0.58 in your instance, Neutron would allow traffic from or to that address. If you did not explicitly add that address in allowed_address_pairs neutron would block traffic to and from it.</span></div><div><span style="font-size:12.8000001907349px">From the CLI, you should be able to see allowed address pairs configured on a port with neutron port-show</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">If you wanted to configure 192.168.0.58 as your port's IP address and let neutron manage it, you should be able to use the fixed_ips attribute, although I don't know how to leverage that through Heat templates.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Salvatore</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 3 March 2015 at 15:41, Jay Lau <span dir="ltr"><<a href="mailto:jay.lau.513@gmail.com" target="_blank">jay.lau.513@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><br clear="all"></div>Hi,<br><br></div>I see that the neutron port resource has a property named as allowed_address_pairs and I tried to use this property to create a port, but seems it does not working.<br><br></div>I want to create a port with mac as fa:16:3e:05:d5:9f and ip as 192.168.0.58, but after create with a heat template, the final neutron port mac is fa:16:3e:01:45:bb and ip is 192.168.0.62, can someone show me where is wrong in my configuration?<br><br></div>Also allowed_address_pairs is a list, does it means that I can create a port with multiple mac and ip address, if this is the case, then when create a VM with this port, does it mean that the VM can have multiple mac&ip?<br><div><div><br>[root@prsdemo2 ~]# cat port-3.yaml <br>heat_template_version: 2013-05-23<br> <br>description: ><br>  HOT template to create a new neutron network plus a router to the public<br>  network, and for deploying two servers into the new network. The template also<br>  assigns floating IP addresses to each server so they are routable from the<br>  public network.<br> <br>resources:<br> <br>  server1_port:<br>    type: OS::Neutron::Port<br>    properties:<br>      allowed_address_pairs:<br>        - mac_address: "fa:16:3e:05:d5:9f"<br>          ip_address: "192.168.0.58"<br>      network: "demonet"<br>[root@prsdemo2 ~]# heat stack-create -f ./port-3.yaml p3<br>+--------------------------------------+------------+--------------------+----------------------+<br>| id                                   | stack_name | stack_status       | creation_time        |<br>+--------------------------------------+------------+--------------------+----------------------+<br>| 234d512c-4c90-4d4e-8d1c-ccf272254477 | p3         | CREATE_IN_PROGRESS | 2015-03-03T14:35:49Z |<br>+--------------------------------------+------------+--------------------+----------------------+<br>[root@prsdemo2 ~]# heat stack-list<br>+--------------------------------------+------------+-----------------+----------------------+<br>| id                                   | stack_name | stack_status    | creation_time        |<br>+--------------------------------------+------------+-----------------+----------------------+<br>| 234d512c-4c90-4d4e-8d1c-ccf272254477 | p3         | CREATE_COMPLETE | 2015-03-03T14:35:49Z |<br>+--------------------------------------+------------+-----------------+----------------------+<br>[root@prsdemo2 ~]# neutron port-list<br>+--------------------------------------+------------------------------------------+-------------------+-------------------------------------------------------------------------------------+<br>| id                                   | name                                     | mac_address       | fixed_ips                                                                           |<br>+--------------------------------------+------------------------------------------+-------------------+-------------------------------------------------------------------------------------+<br>| 8d20b3a4-024a-4613-9d26-3d49534a839c | p3-server1_port-op3w5yzyks5i             | fa:16:3e:01:45:bb | {"subnet_id": "4e7b6983-7364-4a71-8d9c-580d88fd4797", "ip_address": "192.168.0.62"} |<br>+--------------------------------------+------------------------------------------+-------------------+-------------------------------------------------------------------------------------+<span class="HOEnZb"><font color="#888888"><br><br><div><div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div>Thanks,<br><br></div>Jay Lau (Guangya Liu)<br></div></div></div></div>
</div></div></font></span></div></div></div>
<br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>