12
12
13
13
SCI_TEMPLATE = """\
14
14
<sci_request version="1.0">
15
- <{operation}{reply}{synchronous}{cache}{sync_timeout}{allow_offline}{wait_for_reconnect}>
15
+ <{operation}{attribute}{ reply}{synchronous}{cache}{sync_timeout}{allow_offline}{wait_for_reconnect}>
16
16
<targets>
17
17
{targets}
18
18
</targets>
@@ -131,7 +131,7 @@ def send_sci_async(self, operation, target, payload, **sci_options):
131
131
return AsyncRequestProxy (job_id , self ._conn )
132
132
133
133
def send_sci (self , operation , target , payload , reply = None , synchronous = None , sync_timeout = None ,
134
- cache = None , allow_offline = None , wait_for_reconnect = None ):
134
+ cache = None , allow_offline = None , wait_for_reconnect = None , attribute = None ):
135
135
"""Send SCI request to 1 or more targets
136
136
137
137
:param str operation: The operation is one of {send_message, update_firmware, disconnect, query_firmware_targets,
@@ -204,6 +204,11 @@ def send_sci(self, operation, target, payload, reply=None, synchronous=None, syn
204
204
else :
205
205
wait_for_reconnect_xml = ''
206
206
207
+ if attribute is not None :
208
+ operation_attribute = ' ' + attribute
209
+ else :
210
+ operation_attribute = ''
211
+
207
212
full_request = SCI_TEMPLATE .format (
208
213
operation = operation ,
209
214
targets = targets_xml ,
@@ -213,7 +218,8 @@ def send_sci(self, operation, target, payload, reply=None, synchronous=None, syn
213
218
cache = cache_xml ,
214
219
allow_offline = allow_offline_xml ,
215
220
wait_for_reconnect = wait_for_reconnect_xml ,
216
- payload = payload
221
+ payload = payload ,
222
+ attribute = operation_attribute
217
223
)
218
224
219
225
# TODO: do parsing here?
0 commit comments