def _get_switch(self, dpid):
        if dpid in self.dps:
            switch = Switch(self.dps[dpid])
            for ofpport in self.port_state[dpid].values():
                switch.add_port(ofpport)
            return switch
dataset/ETHPy150Open osrg/ryu/ryu/topology/switches.py/Switches._get_switch/original