You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'rucio-admin rse add-protocol' expects domain data to be formatted as valid JSON, i.e. with both keys and scalar values quoted using double quotes. However, the same domain data when printed by 'rucio-admin rse info' is formatted differently - keys are quoted using single quotes, scalar values (or at least numerical ones) are not quoted at all. This both is inconsistent and prevents feeding domain data retrieved with the latter command to the former without extensive editing.
Modification
The function info_rse() in rucio-admin currently prints all protocol information by simply stringifying relevant dict items. The simplest way of outputting valid JSON for domain data would be to make the protocol-item loop (lines 566-567) consider the key 'domains' a special case, invoking json.dumps() rather than str(); a more sophisticated approach would overload the method __str__() of the domain dict to call json.dumps() internally.
The text was updated successfully, but these errors were encountered:
Motivation
'rucio-admin rse add-protocol' expects domain data to be formatted as valid JSON, i.e. with both keys and scalar values quoted using double quotes. However, the same domain data when printed by 'rucio-admin rse info' is formatted differently - keys are quoted using single quotes, scalar values (or at least numerical ones) are not quoted at all. This both is inconsistent and prevents feeding domain data retrieved with the latter command to the former without extensive editing.
Modification
The function info_rse() in rucio-admin currently prints all protocol information by simply stringifying relevant dict items. The simplest way of outputting valid JSON for domain data would be to make the protocol-item loop (lines 566-567) consider the key 'domains' a special case, invoking json.dumps() rather than str(); a more sophisticated approach would overload the method
__str__()
of the domain dict to call json.dumps() internally.The text was updated successfully, but these errors were encountered: