Re: [openstack-dev] [ironic] [neutron] Enforce port/portgroup MAC uniqueness constraint

2015-11-01 Thread Ramakrishnan G
My vote is for the intermediate table to store the MAC address and enforce
unique constraint on the mac address field.  No need of extra triggers when
it can be solved in a simple way and no need to add extra code to handle it.


On Tue, Oct 20, 2015 at 5:08 AM, William Stevenson 
wrote:

> Hi,
>
> In reference to comments on a patchset[1], port/portgroup addresses
> should be unique. Please also see the irc log[1] which includes
> earlier discussion regarding rationale.
>
> Q: How can we enforce this uniqueness across tables?
>
>
> [1]
> https://review.openstack.org/#/c/206232/26/ironic/db/sqlalchemy/alembic/versions/5ea1b0d310e_added_port_group_table_and_altered_ports.py
> [2] http://ix.io/luF/irc
>
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [ironic] [neutron] Enforce port/portgroup MAC uniqueness constraint

2015-10-19 Thread William Stevenson
Hi,

In reference to comments on a patchset[1], port/portgroup addresses
should be unique. Please also see the irc log[1] which includes
earlier discussion regarding rationale.

Q: How can we enforce this uniqueness across tables?


[1] 
https://review.openstack.org/#/c/206232/26/ironic/db/sqlalchemy/alembic/versions/5ea1b0d310e_added_port_group_table_and_altered_ports.py
[2] http://ix.io/luF/irc


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [ironic] [neutron] Enforce port/portgroup MAC uniqueness constraint

2015-10-19 Thread Kevin Benton
In Neutron they are forced to be unique within a network.[1]

Are you asking if they can be required to be globally unique in Neutron?

1.
https://github.com/openstack/neutron/blob/1f7d246f467607e0b065848b324d1ed6b3b47614/neutron/db/models_v2.py#L134-L136

On Mon, Oct 19, 2015 at 4:38 PM, William Stevenson 
wrote:

> Hi,
>
> In reference to comments on a patchset[1], port/portgroup addresses
> should be unique. Please also see the irc log[1] which includes
> earlier discussion regarding rationale.
>
> Q: How can we enforce this uniqueness across tables?
>
>
> [1]
> https://review.openstack.org/#/c/206232/26/ironic/db/sqlalchemy/alembic/versions/5ea1b0d310e_added_port_group_table_and_altered_ports.py
> [2] http://ix.io/luF/irc
>
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



-- 
Kevin Benton
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev