X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=inline;f=sfa%2Fclient%2Fsfi.py;h=6e60f636e7fb7a8e5fd1b9e20e3b07cd8cc935f2;hb=a0ecdcce6c47700324b8cdb94951ab11392b4642;hp=2f47839d068577cef84885769b28f9069cdb6201;hpb=1c3e5bfbf19d5d6b553d6d9f065c3e76138200de;p=sfa.git diff --git a/sfa/client/sfi.py b/sfa/client/sfi.py index 2f47839d..6e60f636 100644 --- a/sfa/client/sfi.py +++ b/sfa/client/sfi.py @@ -387,13 +387,15 @@ class Sfi: help='how myslice config variables as well') if command in ("version"): - parser.add_option("-R","--registry-version", - action="store_true", dest="version_registry", default=False, - help="probe registry version instead of sliceapi") parser.add_option("-l","--local", action="store_true", dest="version_local", default=False, help="display version of the local client") + if command in ("version", "trusted"): + parser.add_option("-R","--registry_interface", + action="store_true", dest="registry_interface", default=False, + help="target the registry interface instead of slice interface") + if command in ("add", "update"): parser.add_option('-x', '--xrn', dest='xrn', metavar='', help='object hrn/urn (mandatory)') parser.add_option('-t', '--type', dest='type', metavar='', help='object type', default=None) @@ -878,7 +880,7 @@ use this if you mean an authority instead""") if options.version_local: version=version_core() else: - if options.version_registry: + if options.registry_interface: server=self.registry() else: server = self.sliceapi() @@ -1095,7 +1097,7 @@ use this if you mean an authority instead""") if self.options.raw: save_raw_to_file(result, self.options.raw, self.options.rawformat, self.options.rawbanner) if options.file is not None: - save_rspec_to_file(value['geni_rspec'], options.file) + save_rspec_to_file(value, options.file) if (self.options.raw is None) and (options.file is None): display_rspec(value, options.format) @@ -1616,7 +1618,15 @@ $ sfi m -b http://mymanifold.foo.com:7080/ """ return the trusted certs at this interface (get_trusted_certs) """ - trusted_certs = self.registry().get_trusted_certs() + if options.registry_interface: + server=self.registry() + else: + server = self.sliceapi() + cred = self.my_authority_credential_string() + trusted_certs = server.get_trusted_certs(cred) + if not options.registry_interface: + trusted_certs = ReturnValue.get_value(trusted_certs) + for trusted_cert in trusted_certs: print "\n===========================================================\n" gid = GID(string=trusted_cert)