diff options
author | 胡鼎原 <hdyvip@gmail.com> | 2017-05-16 09:48:52 +0800 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-05-30 22:11:02 +0900 |
commit | 8fa14c87ec05d68a5997fc6946d58b5ce1f74c17 (patch) | |
tree | f974009e7064f861c044bc9bb7fe33b150c8d20b /doc | |
parent | 51a86c4d568ecc7ff08182b69e4b949bc9ec9876 (diff) |
doc: fix error in ovsdb_manager.rst code
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/source/library_ovsdb_manager.rst | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/source/library_ovsdb_manager.rst b/doc/source/library_ovsdb_manager.rst index b23ae81d..104f4b68 100644 --- a/doc/source/library_ovsdb_manager.rst +++ b/doc/source/library_ovsdb_manager.rst @@ -31,12 +31,13 @@ on a bridge. self.logger.info('New OVSDB connection from system id %s', systemd_id) - def create_port(self, systemd_id, bridge_name, name): + def create_port(self, system_id, bridge_name, name): new_iface_uuid = uuid.uuid4() new_port_uuid = uuid.uuid4() + bridge = ovsdb.row_by_name(self, system_id, bridge_name) + def _create_port(tables, insert): - bridge = ovsdb.row_by_name(self, system_id, bridge_name) iface = insert(tables['Interface'], new_iface_uuid) iface.name = name @@ -46,7 +47,7 @@ on a bridge. port.name = name port.interfaces = [iface] - brdige.ports = bridfe.ports + [port] + bridge.ports = bridge.ports + [port] return (new_port_uuid, new_iface_uuid) @@ -58,4 +59,4 @@ on a bridge. name, bridge, rep.status) return None - return reply.insert_uuid[new_port_uuid] + return rep.insert_uuids[new_port_uuid] |