key, value = line[:colon], line[colon + 1:]
value = value.strip()
- if value[0] == value[-1] and value[0] == "\"" or value[0] == "'":
+ if ((value and value[0] == value[-1]) and
+ (value[0] == "\"" or value[0] == "'")):
value = value[1:-1]
return key.strip(), [value]
import json
import xmlrpclib
+from heat.openstack.common import timeutils
+
def to_primitive(value, convert_instances=False, level=0):
"""Convert a complex object into primitives.
level=level)
return o
elif isinstance(value, datetime.datetime):
- return str(value)
+ return timeutils.strtime(value)
elif hasattr(value, 'iteritems'):
return to_primitive(dict(value.iteritems()),
convert_instances=convert_instances,
cfg.StrOpt('rpc_zmq_ipc_dir', default='/var/run/openstack',
help='Directory for holding IPC sockets'),
+
cfg.StrOpt('rpc_zmq_host', default=socket.gethostname(),
help='Name of this node. Must be a valid hostname, FQDN, or '
- 'IP address')
+ 'IP address. Must match "host" option, if running Nova.')
]
'subscribe': subscribe, 'bind': bind}
LOG.debug(_("Connecting to %(addr)s with %(type)s"), str_data)
- LOG.debug(_("-> Subscribed to %(subscribe)s"), str_data)
+ LOG.debug(_("-> Subscribed to %(subscribe)s"), str_data)
LOG.debug(_("-> bind: %(bind)s"), str_data)
try:
mm_impl = importutils.import_module(mm_module)
mm_constructor = getattr(mm_impl, mm_class)
matchmaker = mm_constructor()
+
+
+register_opts(cfg.CONF)