Commit 464bbbdb authored by Titouan Soulard's avatar Titouan Soulard

FIXUP (rebase): slave partitions are shared

parent 8f0d310b
...@@ -174,7 +174,7 @@ class Recipe(object): ...@@ -174,7 +174,7 @@ class Recipe(object):
request_dict["parameters"] = json.dumps(partition_parameter_kw) request_dict["parameters"] = json.dumps(partition_parameter_kw)
if filter_kw: if filter_kw:
request_dict["sla_parameters"] = filter_kw request_dict["sla_parameters"] = filter_kw
if slave: if shared:
request_dict["shared"] = True request_dict["shared"] = True
if requested_state: if requested_state:
request_dict["state"] = requested_state request_dict["state"] = requested_state
...@@ -192,7 +192,7 @@ class Recipe(object): ...@@ -192,7 +192,7 @@ class Recipe(object):
request_name=name, request_name=name,
partition_parameter_kw=partition_parameter_kw, partition_parameter_kw=partition_parameter_kw,
filter_kw=filter_kw, filter_kw=filter_kw,
shared=slave, shared=shared,
state=requested_state state=requested_state
) )
) )
...@@ -205,8 +205,8 @@ class Recipe(object): ...@@ -205,8 +205,8 @@ class Recipe(object):
return_parameters return_parameters
) )
# Fetch the instance-guid and the instance-state # Fetch the instance-guid and the instance-state
# Note: SlapOS Master does not support it for slave instances # Note: SlapOS Master does not support it for shared instances
if not slave: if not shared:
options['instance-guid'] = partition_dict["reference"] options['instance-guid'] = partition_dict["reference"]
# XXX: deprecated, to be removed # XXX: deprecated, to be removed
options['instance_guid'] = options['instance-guid'] options['instance_guid'] = options['instance-guid']
...@@ -218,12 +218,12 @@ class Recipe(object): ...@@ -218,12 +218,12 @@ class Recipe(object):
try: try:
self.instance = request(software_url, software_type, self.instance = request(software_url, software_type,
name, partition_parameter_kw=partition_parameter_kw, name, partition_parameter_kw=partition_parameter_kw,
filter_kw=filter_kw, shared=slave, state=requested_state) filter_kw=filter_kw, shared=shared, state=requested_state)
return_parameter_dict = self._getReturnParameterDict(self.instance, return_parameter_dict = self._getReturnParameterDict(self.instance,
return_parameters) return_parameters)
# Fetch the instance-guid and the instance-state # Fetch the instance-guid and the instance-state
# Note: SlapOS Master does not support it for slave instances # Note: SlapOS Master does not support it for shared instances
if not slave: if not shared:
try: try:
options['instance-guid'] = self.instance.getInstanceGuid() \ options['instance-guid'] = self.instance.getInstanceGuid() \
.encode('UTF-8') .encode('UTF-8')
...@@ -245,7 +245,7 @@ class Recipe(object): ...@@ -245,7 +245,7 @@ class Recipe(object):
request_name=name, request_name=name,
partition_parameter_kw=partition_parameter_kw, partition_parameter_kw=partition_parameter_kw,
filter_kw=filter_kw, filter_kw=filter_kw,
shared=slave, shared=shared,
state=requested_state state=requested_state
) )
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment