RingBuilder.add_dev returns device id

When added a new devices into builder the add_dev function returns it
unique id.
blueprint argparse-in-swift-ring-builder
Change-Id: I57080bb625e812f6cea71199df907a44b332b552
This commit is contained in:
Ilya Kharin
2013年05月16日 18:44:41 +04:00
parent 43bf568f48
commit 3957dbc5d4

View File

@@ -335,10 +335,9 @@ swift-ring-builder <builder_file> add
'replication_port': replication_port,
'device': device_name, 'weight': weight,
'meta': meta}
builder.add_dev(dev_params)
new_dev = builder.search_devs(dev_params)[0]
dev_id = builder.add_dev(dev_params)
print('Device %s with %s weight got id %s' %
(format_device(new_dev), weight, new_dev['id']))
(format_device(dev_params), weight, dev_id))
builder.save(argv[1])
exit(EXIT_SUCCESS)
Reference in New Issue
openstack/swift
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.