Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. for string in acl_list:
  2. rows_fw.append((string[0], string[1], string[2], string[3], string[4], string[5], string[6], string[7],';'.join(string[8]),
  3. string[0], string[2], string[3], string[4], string[5], string[6], string[7],';'.join(string[8])))
  4. cux.executemany("""INSERT INTO acl_table_v2
  5. (firewall,sequence,source_ip,source_port,destination_ip,destination_port,protocol,action,appendix)
  6. VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s)
  7. ON DUPLICATE KEY UPDATE firewall=%s, source_ip=%s, source_port=%s, destination_ip=%s, destination_port=%s, protocol=%s, action=%s, appendix=%s""", rows_fw)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement