def _setup_integration_br(self, root_helper, integ_br, ofp_rest_api_addr, tunnel_ip, ovsdb_port, ovsdb_ip): self.int_br = OVSBridge(integ_br, root_helper) self.int_br.find_datapath_id() ryu_rest_client = client.OFPClient(ofp_rest_api_addr) self.vif_ports = VifPortSet(self.int_br, ryu_rest_client) self.vif_ports.setup() sc_client = client.SwitchConfClient(ofp_rest_api_addr) sc_client.set_key(self.int_br.datapath_id, conf_switch_key.OVS_TUNNEL_ADDR, tunnel_ip) # Currently Ryu supports only tcp methods. (ssl isn't supported yet) self.int_br.set_manager('ptcp:%d' % ovsdb_port) sc_client.set_key(self.int_br.datapath_id, conf_switch_key.OVSDB_ADDR, 'tcp:%s:%d' % (ovsdb_ip, ovsdb_port))
def _setup_integration_br(self, root_helper, integ_br, tunnel_ip, ovsdb_port, ovsdb_ip): self.int_br = OVSBridge(integ_br, root_helper) self.int_br.find_datapath_id() rest_api_addr = self.plugin_rpc.get_ofp_rest_api_addr(self.context) if not rest_api_addr: raise q_exc.Invalid(_("Ryu rest API port isn't specified")) LOG.debug(_("Going to ofp controller mode %s"), rest_api_addr) ryu_rest_client = client.OFPClient(rest_api_addr) self.vif_ports = VifPortSet(self.int_br, ryu_rest_client) self.vif_ports.setup() sc_client = client.SwitchConfClient(rest_api_addr) sc_client.set_key(self.int_br.datapath_id, conf_switch_key.OVS_TUNNEL_ADDR, tunnel_ip) # Currently Ryu supports only tcp methods. (ssl isn't supported yet) self.int_br.set_manager('ptcp:%d' % ovsdb_port) sc_client.set_key(self.int_br.datapath_id, conf_switch_key.OVSDB_ADDR, 'tcp:%s:%d' % (ovsdb_ip, ovsdb_port))