You could use `enumerate` here instead of the `iter` variable.


    for i, port in enumerate(ports, 1):
        params['Listeners.member.{0}.InstancePort'.format(str(i))] = str(port)

In libcloud the convention is to use `%` substitution rather than `.format` substitution, so this would be even better:

    for i, port in enumerate(ports, 1):
        params['Listeners.member.%d.InstancePort' % i] = str(port)