'Looks at the from_port and to_port and returns a sane representation'

def _port_for_rule(self, rule):

    if (rule['from_port'] == rule['to_port']):
        return '{}    {}'.format(rule['ip_protocol'], rule['from_port'])
    return '{}    {}-{}'.format(rule['ip_protocol'], rule['from_port'], rule['to_port'])
