DID constructor does not use policy `extract_scope` function to determine scope
Description
class DID has complex rules to parse scope and name from a string, but does not actually use the function advertised for policy packages to do this: extract_scope.
This is confusing and e.g. means that rucio download does not support giving the did in this convention.
Steps to reproduce
Define a extract_scope in policy package.
Run rucio download <name> where name contains the scope and extract_scope correctly returns the scope.
Download fails. in our case for some reason, the scope is parsed as /ctao:
>>> c.download_dids([{"did": "/ctao.dpps.test/root/foo.dat"}])
ERROR:root:DID does not exist: /ctao:/ctao.dpps.test/root/foo.dat
Where extract_scope works fine:
>>> extract_scope("/ctao.dpps.test/root/foo.dat")
('root', '/ctao.dpps.test/root/foo.dat')
Rucio Version
38.1, current master
Additional Information
No response
Turns out this is very much related to #7973, as the special condition for belle-ii exactly triggers calling extract_scope on a did.
Why just for belle-ii?