'swift-ring-builder <builder_file> add
[r<region>]z<zone>-<ip>:<port>[R<r_ip>:<r_port>]/<device_name>_<meta>
<weight>
[[r<region>]z<zone>-<ip>:<port>[R<r_ip>:<r_port>]/<device_name>_<meta>
<weight>] ...
Where <r_ip> and <r_port> are replication ip and port.
or
swift-ring-builder <builder_file> add
--region <region> --zone <zone> --ip <ip or hostname> --port <port>
[--replication-ip <r_ip or r_hostname>] [--replication-port <r_port>]
--device <device_name> --weight <weight>
[--meta <meta>]
Adds devices to the ring with the given information. No partitions will be
assigned to the new device until after running \'rebalance\'. This is so you
can make multiple device changes and rebalance them all just once.'

@staticmethod
def add():

    if (len(argv) < 5):
        print(Commands.add.__doc__.strip())
        exit(EXIT_ERROR)
    if builder.next_part_power:
        print('Partition    power    increase    in    progress.    You    need    ')
        print('to    finish    the    increase    first    before    adding    devices.')
        exit(EXIT_WARNING)
    try:
        for new_dev in _parse_add_values(argv[3:]):
            for dev in builder.devs:
                if (dev is None):
                    continue
                if ((dev['ip'] == new_dev['ip']) and (dev['port'] == new_dev['port']) and (dev['device'] == new_dev['device'])):
                    print(('Device    %d    already    uses    %s:%d/%s.' % (dev['id'], dev['ip'], dev['port'], dev['device'])))
                    print('The    on-disk    ring    builder    is    unchanged.\n')
                    exit(EXIT_ERROR)
            dev_id = builder.add_dev(new_dev)
            print(('Device    %s    with    %s    weight    got    id    %s' % (format_device(new_dev), new_dev['weight'], dev_id)))
    except ValueError as err:
        print(err)
        print('The    on-disk    ring    builder    is    unchanged.')
        exit(EXIT_ERROR)
    builder.save(builder_file)
    exit(EXIT_SUCCESS)
