def configure_openvswitch(self, odl_ovsdb):
hookenv.log("Configuring OpenvSwitch with ODL OVSDB controller: %s" %
odl_ovsdb.connection_string())
local_ip = ch_ip.get_address_in_network(
self.config.get('os-data-network'),
hookenv.unit_private_ip())
ovs.set_config('local_ip', local_ip)
ovs.set_config('controller-ips', odl_ovsdb.private_address(),
table='external_ids')
ovs.set_config('host-id', socket.gethostname(),
table='external_ids')
ovs.set_manager(odl_ovsdb.connection_string())
hookenv.status_set('active', 'Unit is ready')
openvswitch_odl.py 文件源码
python
阅读 30
收藏 0
点赞 0
评论 0
评论列表
文章目录