def _restore_port_binding(self,<EOL>switch_ip, pvlan_ids,<EOL>port, native_vlan):
intf_type, nexus_port = nexus_help.split_interface_name(port)<EOL>if native_vlan != <NUM_LIT:0>:<EOL><INDENT>self.driver.send_enable_vlan_on_trunk_int(<EOL>switch_ip, native_vlan,<EOL>intf_type, nexus_port, True)<EOL>if len(pvlan_ids) == <NUM_LIT:1>:<EOL><INDENT>return<EOL><DEDENT><DEDENT>concat_vlans = '<STR_LIT>'<EOL>compressed_vlans = self._get_compressed_vlan_list(pvlan_ids)<EOL>for pvlan in compressed_vlans:<EOL><INDENT>if concat_vlans == '<STR_LIT>':<EOL><INDENT>concat_vlans = "<STR_LIT:%s>" % pvlan<EOL><DEDENT>else:<EOL><INDENT>concat_vlans += "<STR_LIT>" % pvlan<EOL><DEDENT>if len(concat_vlans) >= const.CREATE_PORT_VLAN_LENGTH:<EOL><INDENT>self.driver.send_enable_vlan_on_trunk_int(<EOL>switch_ip, concat_vlans,<EOL>intf_type, nexus_port, False)<EOL>concat_vlans = '<STR_LIT>'<EOL><DEDENT><DEDENT>if len(concat_vlans):<EOL><INDENT>self.driver.send_enable_vlan_on_trunk_int(<EOL>switch_ip, concat_vlans,<EOL>intf_type, nexus_port, False)<EOL><DEDENT>
Restores a set of vlans for a given port.