-s --sliceapi option no longer requires users to prefix url with 'http://'
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Wed, 21 Dec 2011 20:31:07 +0000 (15:31 -0500)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Wed, 21 Dec 2011 20:31:07 +0000 (15:31 -0500)
sfa/client/sfi.py

index 83cd9bf..d91e7e2 100644 (file)
@@ -554,6 +554,8 @@ class Sfi:
                 self.sliceapi_proxy=SfaServerProxy(cm_url, self.private_key, self.my_gid)
             else:
                 # otherwise use what was provided as --sliceapi, or SFI_SM in the config
+                if not self.sm_url.startswith('http://') or self.sm_url.startswith('https://'):
+                    self.sm_url = 'http://' + self.sm_url
                 self.logger.info("Contacting Slice Manager at: %s"%self.sm_url)
                 self.sliceapi_proxy = SfaServerProxy(self.sm_url, self.private_key, self.my_gid, 
                                                      timeout=self.options.timeout, verbose=self.options.debug)