Beispiel #1
0
def prodcat_request(client=None, **kwargs):
	content = utils.method_validator(client=client, **kwargs)
	if client.success:
		payload = utils.payload(content["namespace"], content["method"])
		payload["headers"]["destination"] = client.iris.place_address
		for k, v in content["attributes"].items(): payload["payload"]["attributes"][k] = v
		send(client=client, namespace=content["namespace"], method=content["method"], payload=payload, debug=client.debug)
Beispiel #2
0
 def __service_request(self, **kwargs):
     content = utils.method_validator(client=self, **kwargs)
     if self.success:
         payload = self.__payload(method=content["method"],
                                  namespace=content["namespace"])
         for k, v in content["attributes"].items():
             payload["payload"]["attributes"][k] = v
         request.send(client=self,
                      namespace=content["namespace"],
                      method=content["method"],
                      payload=payload,
                      debug=self.debug)
     else:
         print(self.response)
Beispiel #3
0
 def __subsystem_request(self, **kwargs):
     content = utils.method_validator(client=self, **kwargs)
     if self.success:
         payload = self.__payload(method=content["method"],
                                  namespace=content["namespace"])
         payload["headers"]["correlationId"] = db.find_correlation_id(
             namespace=content["namespace"], method=content["method"])
         for k, v in content["attributes"].items():
             payload["payload"]["attributes"][k] = v
         request.send(client=self,
                      namespace=content["namespace"],
                      method=content["method"],
                      payload=payload,
                      debug=self.debug)
     else:
         print(self.response)