Merge "Define sheepdog_port as an integer value"

This commit is contained in:
Jenkins 2014-01-03 05:12:16 +00:00 committed by Gerrit Code Review
commit ceeb44f9d7
1 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ import glance.store.location
LOG = logging.getLogger(__name__)
DEFAULT_ADDR = 'localhost'
DEFAULT_PORT = '7000'
DEFAULT_PORT = 7000
DEFAULT_CHUNKSIZE = 64 # in MiB
LOG = logging.getLogger(__name__)
@ -44,7 +44,7 @@ sheepdog_opts = [
help=_('Images will be chunked into objects of this size '
'(in megabytes). For best performance, this should be '
'a power of two.')),
cfg.StrOpt('sheepdog_store_port', default=DEFAULT_PORT,
cfg.IntOpt('sheepdog_store_port', default=DEFAULT_PORT,
help=_('Port of sheep daemon.')),
cfg.StrOpt('sheepdog_store_address', default=DEFAULT_ADDR,
help=_('IP address of sheep daemon.'))
@ -64,7 +64,7 @@ class SheepdogImage:
self.chunk_size = chunk_size
def _run_command(self, command, data, *params):
cmd = ("collie vdi %(command)s -a %(addr)s -p %(port)s %(name)s "
cmd = ("collie vdi %(command)s -a %(addr)s -p %(port)d %(name)s "
"%(params)s" %
{"command": command,
"addr": self.addr,