Skip to content

Commit

Permalink
Merge "Update swift-get-nodes to use storage_directory util func"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Mar 31, 2014
2 parents a7d5446 + 4b7bab9 commit 6e44a84
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bin/swift-get-nodes
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import sys
import urllib

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()
Expand Down Expand Up @@ -127,16 +127,16 @@ print 'Use your own device location of servers:'
print 'such as "export DEVICE=/srv/node"'
for node in nodes:
if hash_str:
print 'ssh %s "ls -lah ${DEVICE:-/srv/node}/%s/%s/%s/%s/%s/"' % (
node['ip'], node['device'], loc, part, hash_str[-3:], hash_str)
print 'ssh %s "ls -lah ${DEVICE:-/srv/node}/%s/%s/"' % (
node['ip'], node['device'], storage_directory(loc, part, hash_str))
else:
print 'ssh %s "ls -lah ${DEVICE:-/srv/node}/%s/%s/%s/"' % (
node['ip'], node['device'], loc, part)
for mnode in more_nodes:
if hash_str:
print 'ssh %s "ls -lah ${DEVICE:-/srv/node}/%s/%s/%s/%s/%s/" '\
'# [Handoff]' % (mnode['ip'], mnode['device'], loc, part,
hash_str[-3:], hash_str)
print 'ssh %s "ls -lah ${DEVICE:-/srv/node}/%s/%s/" '\
'# [Handoff]' % (mnode['ip'], mnode['device'],
storage_directory(loc, part, hash_str))
else:
print 'ssh %s "ls -lah ${DEVICE:-/srv/node}/%s/%s/%s/" # [Handoff]' % (
mnode['ip'], mnode['device'], loc, part)

0 comments on commit 6e44a84

Please sign in to comment.