'Runs iptables-save on a table and returns the results.'

def get_rules_for_table(self, table):

    args = ['iptables-save', '-t', table]
    if self.namespace:
        args = (['ip', 'netns', 'exec', self.namespace] + args)
    return self.execute(args, run_as_root=True).split('\n')
