39
40
RPC_API_VERSION = '1.0'
41
42
def __init__(self):
42
super(SchedulerAPI, self).__init__(topic=FLAGS.scheduler_topic,
43
default_version=self.RPC_API_VERSION)
43
super(SchedulerAPI, self).__init__(
44
topic=FLAGS.scheduler_topic,
45
default_version=self.RPC_API_VERSION)
45
47
def create_volume(self, ctxt, topic, volume_id, snapshot_id=None,
46
48
image_id=None, request_spec=None,
47
49
filter_properties=None):
48
return self.cast(ctxt, self.make_msg('create_volume',
51
snapshot_id=snapshot_id,
53
request_spec=request_spec,
54
filter_properties=filter_properties),
50
request_spec_p = jsonutils.to_primitive(request_spec)
51
return self.cast(ctxt, self.make_msg(
55
snapshot_id=snapshot_id,
57
request_spec=request_spec_p,
58
filter_properties=filter_properties),
57
def update_service_capabilities(self, ctxt, service_name, host,
61
def update_service_capabilities(self, ctxt,
59
64
self.fanout_cast(ctxt, self.make_msg('update_service_capabilities',
60
service_name=service_name, host=host,
61
capabilities=capabilities))
65
service_name=service_name, host=host,
66
capabilities=capabilities))