SFI client passing -r parameter even if the rspec_type is not known by sfi.py client
[sfa.git] / sfa / client / sfi.py
index dcad9da..b606d97 100644 (file)
@@ -674,6 +674,8 @@ use this if you mean an authority instead""")
     
     # init self-signed cert, user credentials and gid
     def bootstrap (self):
+        if self.options.verbose:
+            self.logger.info("Initializing SfaClientBootstrap with {}".format(self.reg_url))
         client_bootstrap = SfaClientBootstrap (self.user, self.reg_url, self.options.sfi_dir,
                                                logger=self.logger)
         # if -k is provided, use this to initialize private key
@@ -1150,9 +1152,10 @@ use this if you mean an authority instead""")
                 # just request the version the client wants
                 api_options['geni_rspec_version'] = version_manager.get_version(options.rspec_version).to_dict()
             else:
-                api_options['geni_rspec_version'] = {'type': 'geni', 'version': '3'}
+                api_options['geni_rspec_version'] = {'type': options.rspec_version}
         else:
             api_options['geni_rspec_version'] = {'type': 'geni', 'version': '3'}
+
         list_resources = server.ListResources (creds, api_options)
         value = ReturnValue.get_value(list_resources)
         if self.options.raw: