Update swift-get-nodes to use storage_directory util func
Change-Id: I074d6c5f62e5218427c72b3e11de40da4ecfc0ab
This commit is contained in:
parent
6145c57f4a
commit
4b7bab9fc9
@ -19,7 +19,7 @@ import sys
|
|||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
from swift.common.ring import Ring
|
from swift.common.ring import Ring
|
||||||
from swift.common.utils import hash_path
|
from swift.common.utils import hash_path, storage_directory
|
||||||
|
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
parser = optparse.OptionParser()
|
||||||
@ -127,16 +127,16 @@ print 'Use your own device location of servers:'
|
|||||||
print 'such as "export DEVICE=/srv/node"'
|
print 'such as "export DEVICE=/srv/node"'
|
||||||
for node in nodes:
|
for node in nodes:
|
||||||
if hash_str:
|
if hash_str:
|
||||||
print 'ssh %s "ls -lah ${DEVICE:-/srv/node}/%s/%s/%s/%s/%s/"' % (
|
print 'ssh %s "ls -lah ${DEVICE:-/srv/node}/%s/%s/"' % (
|
||||||
node['ip'], node['device'], loc, part, hash_str[-3:], hash_str)
|
node['ip'], node['device'], storage_directory(loc, part, hash_str))
|
||||||
else:
|
else:
|
||||||
print 'ssh %s "ls -lah ${DEVICE:-/srv/node}/%s/%s/%s/"' % (
|
print 'ssh %s "ls -lah ${DEVICE:-/srv/node}/%s/%s/%s/"' % (
|
||||||
node['ip'], node['device'], loc, part)
|
node['ip'], node['device'], loc, part)
|
||||||
for mnode in more_nodes:
|
for mnode in more_nodes:
|
||||||
if hash_str:
|
if hash_str:
|
||||||
print 'ssh %s "ls -lah ${DEVICE:-/srv/node}/%s/%s/%s/%s/%s/" '\
|
print 'ssh %s "ls -lah ${DEVICE:-/srv/node}/%s/%s/" '\
|
||||||
'# [Handoff]' % (mnode['ip'], mnode['device'], loc, part,
|
'# [Handoff]' % (mnode['ip'], mnode['device'],
|
||||||
hash_str[-3:], hash_str)
|
storage_directory(loc, part, hash_str))
|
||||||
else:
|
else:
|
||||||
print 'ssh %s "ls -lah ${DEVICE:-/srv/node}/%s/%s/%s/" # [Handoff]' % (
|
print 'ssh %s "ls -lah ${DEVICE:-/srv/node}/%s/%s/%s/" # [Handoff]' % (
|
||||||
mnode['ip'], mnode['device'], loc, part)
|
mnode['ip'], mnode['device'], loc, part)
|
||||||
|
Loading…
Reference in New Issue
Block a user