From 3b63571d7652da694dd5711ed37313a42b9b4220 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 2 Jan 2014 19:29:51 +0100 Subject: [PATCH] Define sheepdog_port as an integer value It really is an integer value, and there is no magic string that can be set for collie either (according to the man page) Change-Id: I9af7c4208480f92378b7f70ab54c8a1e600dd4ff --- glance/store/sheepdog.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/glance/store/sheepdog.py b/glance/store/sheepdog.py index 32f41fe67a..767715c59d 100644 --- a/glance/store/sheepdog.py +++ b/glance/store/sheepdog.py @@ -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,