Example #1
0
 def buildPath(self, name, context):
     """\
     @brief given the environment on construction, return a service path.
     @param name The name of the service.
     @param context A dict of name value lookups for the service.
     @returns Returns the 
     """
     return russ.format(self.builders[name], context)
 def buildPath(self, name, context):
     """\
     @brief given the environment on construction, return a service path.
     @param name The name of the service.
     @param context A dict of name value lookups for the service.
     @returns Returns the 
     """
     return russ.format(self.builders[name], context)
Example #3
0
 def buildServiceURL(self, name, context):
     """\
     @brief given the environment on construction, return a service URL.
     @param name The name of the service.
     @param context A dict of name value lookups for the service.
     @returns Returns the 
     """
     base_url = config.get('services-base-url')
     svc_path = russ.format(self.builders[name], context)
     return base_url + svc_path
Example #4
0
 def buildServiceURL(self, name, context):
     """\
     @brief given the environment on construction, return a service URL.
     @param name The name of the service.
     @param context A dict of name value lookups for the service.
     @returns Returns the 
     """
     base_url = config.get('services-base-url')
     svc_path = russ.format(self.builders[name], context)
     return base_url + svc_path
Example #5
0
 def buildServiceURL(self, name, context={}, **kwargs):
     """\
     @brief given the environment on construction, return a service URL.
     @param name The name of the service.
     @param context A dict of name value lookups for the service.
     @param kwargs Any keyword arguments are treated as members of the
         context, this allows you to be all 31337 by writing shit like:
         servicebuilder.build('name', param=value)
     @returns Returns the 
     """
     context = context.copy()  # shouldn't modify the caller's dictionary
     context.update(kwargs)
     base_url = config.get('services-base-url')
     svc_path = russ.format(self.builders[name], context)
     return base_url + svc_path
 def buildServiceURL(self, name, context={}, **kwargs):
     """\
     @brief given the environment on construction, return a service URL.
     @param name The name of the service.
     @param context A dict of name value lookups for the service.
     @param kwargs Any keyword arguments are treated as members of the
         context, this allows you to be all 31337 by writing shit like:
         servicebuilder.build('name', param=value)
     @returns Returns the 
     """
     context = context.copy()  # shouldn't modify the caller's dictionary
     context.update(kwargs)
     base_url = config.get('services-base-url')
     svc_path = russ.format(self.builders[name], context)
     return base_url + svc_path