[ovs-dev] [PATCH] ovn: add name column to logical switch table
Russell Bryant
rbryant at redhat.com
Wed Mar 18 12:31:08 UTC 2015
On 03/17/2015 07:01 PM, Ben Pfaff wrote:
> On Tue, Mar 17, 2015 at 05:58:28PM -0400, Russell Bryant wrote:
>> Add a name column the logical switch table of the ovn-nb database
>> schema. This column has no special meaning. It's purpose is only to
>> provide convenience for humans interacting with the ovn-nb database.
>>
>> Signed-off-by: Russell Bryant <rbryant at redhat.com>
>> ---
>> ovn/ovn-nb.ovsschema | 4 +++-
>> ovn/ovn-nb.xml | 9 +++++++++
>> 2 files changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/ovn/ovn-nb.ovsschema b/ovn/ovn-nb.ovsschema
>> index b45723c..21e9ff6 100644
>> --- a/ovn/ovn-nb.ovsschema
>> +++ b/ovn/ovn-nb.ovsschema
>> @@ -3,13 +3,15 @@
>> "tables": {
>> "Logical_Switch": {
>> "columns": {
>> + "name": {"type": "string"},
>> "router_port": {"type": {"key": {"type": "uuid",
>> "refTable": "Logical_Router_Port",
>> "refType": "strong"},
>> "min": 0, "max": 1}},
>> "external_ids": {
>> "type": {"key": "string", "value": "string",
>> - "min": 0, "max": "unlimited"}}}},
>> + "min": 0, "max": "unlimited"}}},
>> + "indexes": [["name"]]},
>
> Adding "name" to "indexes" is what forces it to be unique ;-)
Of course it does, I was just making sure you were paying attention ...
... but seriously, I went and actually read the schema definition in the
ovsdb spec now, so hopefully I'll stop just making guesses at it. :-)
--
Russell Bryant
More information about the dev
mailing list