help="display version of the local client")
if command in ("version", "trusted"):
- parser.add_option("-I", "--interface", dest="interface", type="choice",
- help="Select the SFA interface the call should target (Slice Interface (sm) | Registry Interface (registry))",
- choices=("sm", "registry"),
- default="sm")
+ 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='<xrn>', help='object hrn/urn (mandatory)')
if options.version_local:
version=version_core()
else:
- if options.interface == "registry":
+ if options.registry_interface:
server=self.registry()
else:
server = self.sliceapi()
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)
"""
return the trusted certs at this interface (get_trusted_certs)
"""
- if options.interface == "registry":
+ 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 options.interface != "registry":
+ if not options.registry_interface:
trusted_certs = ReturnValue.get_value(trusted_certs)
for trusted_cert in trusted_certs: