Transactions for software defined networks