git://git.onelab.eu
/
sfa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
python3 - 2to3 + miscell obvious tweaks
[sfa.git]
/
sfa
/
managers
/
registry_manager.py
diff --git
a/sfa/managers/registry_manager.py
b/sfa/managers/registry_manager.py
index
74d271a
..
208cea7
100644
(file)
--- a/
sfa/managers/registry_manager.py
+++ b/
sfa/managers/registry_manager.py
@@
-1,11
+1,11
@@
# pylint: disable=c0111, w1202
# pylint: disable=c0111, w1202
-from __future__ import print_function
+
# for get_key_from_incoming_ip
import tempfile
import os
# for get_key_from_incoming_ip
import tempfile
import os
-import
command
s
+import
subproces
s
from sfa.util.faults import (
RecordNotFound, AccountNotEnabled, PermissionError, MissingAuthority,
from sfa.util.faults import (
RecordNotFound, AccountNotEnabled, PermissionError, MissingAuthority,
@@
-86,7
+86,7
@@
class RegistryManager:
# The GENI GetVersion call
def GetVersion(self, api, options):
peers = {hrn: interface.get_url()
# The GENI GetVersion call
def GetVersion(self, api, options):
peers = {hrn: interface.get_url()
- for (hrn, interface) in api.registries.ite
rite
ms()
+ for (hrn, interface) in api.registries.items()
if hrn != api.hrn}
xrn = Xrn(api.hrn, type='authority')
return version_core({'interface': 'registry',
if hrn != api.hrn}
xrn = Xrn(api.hrn, type='authority')
return version_core({'interface': 'registry',
@@
-191,7
+191,7
@@
class RegistryManager:
xrn_dict = {}
registries = api.registries
tree = prefixTree()
xrn_dict = {}
registries = api.registries
tree = prefixTree()
- registry_hrns =
registries.keys(
)
+ registry_hrns =
list(registries.keys()
)
tree.load(registry_hrns)
for xrn in xrns:
registry_hrn = tree.best_match(urn_to_hrn(xrn)[0])
tree.load(registry_hrns)
for xrn in xrns:
registry_hrn = tree.best_match(urn_to_hrn(xrn)[0])
@@
-279,7
+279,7
@@
class RegistryManager:
# the longest matching prefix
hrn, type = urn_to_hrn(xrn)
registries = api.registries
# the longest matching prefix
hrn, type = urn_to_hrn(xrn)
registries = api.registries
- registry_hrns =
registries.keys(
)
+ registry_hrns =
list(registries.keys()
)
tree = prefixTree()
tree.load(registry_hrns)
registry_hrn = tree.best_match(hrn)
tree = prefixTree()
tree.load(registry_hrns)
registry_hrn = tree.best_match(hrn)
@@
-682,7
+682,7
@@
class RegistryManager:
all_commands = [scp_key_command, scp_gid_command]
for command in all_commands:
all_commands = [scp_key_command, scp_gid_command]
for command in all_commands:
- (status, output) =
command
s.getstatusoutput(command)
+ (status, output) =
subproces
s.getstatusoutput(command)
if status:
raise Exception(output)
if status:
raise Exception(output)