continue;
}
- char name[UUID_LEN + 1];
- snprintf(name, sizeof name, UUID_FMT,
- UUID_ARGS(&nbr->header_.uuid));
- struct ovn_port *op = ovn_port_find(ports, name);
+ struct ovn_port *op = ovn_port_find(ports, nbr->name);
if (op) {
if (op->nbs || op->nbr) {
static struct vlog_rate_limit rl
= VLOG_RATE_LIMIT_INIT(5, 1);
VLOG_WARN_RL(&rl, "duplicate logical router port %s",
- name);
+ nbr->name);
continue;
}
op->nbr = nbr;
list_remove(&op->list);
list_push_back(both, &op->list);
} else {
- op = ovn_port_create(ports, name, NULL, nbr, NULL);
+ op = ovn_port_create(ports, nbr->name, NULL, nbr, NULL);
list_push_back(nb_only, &op->list);
}
sizeof *op->od->router_ports * (op->od->n_router_ports + 1));
op->od->router_ports[op->od->n_router_ports++] = op;
} else if (op->nbr && op->nbr->peer) {
- char peer_name[UUID_LEN + 1];
- snprintf(peer_name, sizeof peer_name, UUID_FMT,
- UUID_ARGS(&op->nbr->peer->header_.uuid));
- op->peer = ovn_port_find(ports, peer_name);
+ op->peer = ovn_port_find(ports, op->nbr->name);
}
}
}
{
"name": "OVN_Northbound",
- "version": "2.0.0",
- "cksum": "3515938918 4583",
+ "version": "2.0.1",
+ "cksum": "660370796 4618",
"tables": {
"Logical_Switch": {
"columns": {
"external_ids": {
"type": {"key": "string", "value": "string",
"min": 0, "max": "unlimited"}}},
+ "indexes": [["name"]],
"isRoot": false}
}
}
subnets).
</p>
- <column name="options" key="router-port" type='{"type": "uuid"}'>
- Required. The UUID of the <ref table="Logical_Router_Port"/> to
- which this logical switch port is connected.
+ <column name="options" key="router-port">
+ Required. The <ref column="name"/> of the <ref
+ table="Logical_Router_Port"/> to which this logical switch port is
+ connected.
</column>
</group>
<column name="name">
<p>
- A name for the logical router port. This name has no special meaning or purpose
- other than to provide convenience for human interaction with the ovn-nb
- database. There is no requirement for the name to be unique. The
- logical router port's UUID should be used as the unique identifier.
+ A name for the logical router port.
+ </p>
+
+ <p>
+ In addition to provide convenience for human interaction with the
+ ovn-nb database, this column is used as reference by its patch port in
+ <ref table="Logical_Port"/> or another logical router port in <ref
+ table="Logical_Router_Port"/>.
</p>
</column>
<li>
To attach a logical switch to a logical router. A logical router
port of this type is referenced by exactly one <ref
- table="Logical_Port"/> of type <code>router</code>. The <ref
- column="peer"/> column is empty.
+ table="Logical_Port"/> of type <code>router</code>. The value of
+ <ref column="name"/> is set as <code>router-port</code> in column
+ <ref column="options"/> of <ref table="Logical_Port"/>.
+ In this case <ref column="peer"/> column is empty.
</li>
<li>
<column name="peer">
<p>
For a router port used to connect two logical routers, this
- identifies the other router port in the pair.
+ identifies the other router port in the pair by <ref column="name"/>.
</p>
<p>
-- lport-add ls$i lrp$i$j-attachment`
ovn-nbctl \
set Logical_Port lrp$i$j-attachment type=router \
- options:router-port=$lrp_uuid \
+ options:router-port=lrp$i$j \
addresses='"00:00:00:00:ff:'$i$j'"'
done
done