Exemplo n.º 1
0
    def update_locked_status(url_connect, data):
        cli = eureka_client.get_discovery_client()

        cli.do_service(application_name="PERSISTENCELAYERAPP",
                       method="PUT",
                       service="/Update/LockedStatus/{}".format(url_connect),
                       timeout=20,
                       headers={"Content-Type": "Application/Json"},
                       data=bytes(json.dumps(data), encoding="utf-8"))
Exemplo n.º 2
0
    def contributor_search_without_paging(self, url_connect):
        if self.mock is False:
            cli = eureka_client.get_discovery_client()
            data = cli.do_service(
                application_name="BusinessLogicLayer",
                service="/contributor/search/{}".format(url_connect),
                timeout=20)

            return data

        return mock_contributor_search(url_connect=url_connect).text
Exemplo n.º 3
0
    def form_response(self, url_connect):
        if self.mock is False:
            cli = eureka_client.get_discovery_client()

            response_data = cli.do_service(
                application_name="PERSISTENCELAYERAPP",
                service="/Response/QuestionResponse/{}".format(url_connect),
                timeout=40)

            return response_data

        return mock_form_response(url_connect=url_connect).text
Exemplo n.º 4
0
    def contributor_search(self, url_connect):
        if self.mock is False:
            cli = eureka_client.get_discovery_client()
            data = cli.do_service(
                application_name="PERSISTENCELAYERAPP",
                service="/contributor/searchByLikePageable/{}".format(
                    url_connect),
                timeout=20)

            return data

        return mock_contributor_search_screen(url_connect=url_connect).text
Exemplo n.º 5
0
    def form_definition(self, url_connect):
        if self.mock is False:
            cli = eureka_client.get_discovery_client()

            question_data = cli.do_service(
                application_name="BusinessLogicLayer",
                service="/FormDefinition/GetFormDefinition/{}".format(
                    url_connect),
                timeout=20)

            return question_data

        return mock_form_definition(url_connect=url_connect).text
Exemplo n.º 6
0
    def run_validations(self, url_connect, data):
        if self.mock is False:
            cli = eureka_client.get_discovery_client()
            validation_data = cli.do_service(
                application_name="BusinessLogicLayer",
                method="PUT",
                service="/validation-bl/run-all/{}".format(url_connect),
                timeout=20,
                headers={"Content-Type": "Application/Json"},
                data=bytes(json.dumps(data), encoding="utf-8"))

            return validation_data

        return None
Exemplo n.º 7
0
    def get_validation(self, url_connect):
        if self.mock is False:
            cli = eureka_client.get_discovery_client()
            print(url_connect)
            response_data = cli.do_service(
                application_name="VALIDATIONPERSISTENCELAYERAPP",
                method="GET",
                service="/validation-pl/validations/return?{}".format(
                    url_connect),
                timeout=20,
                headers={"Content-Type": "Application/Json"})

            return response_data

        return mock_get_validation(url_connect=url_connect).text
Exemplo n.º 8
0
    def update_response(self, url_connect, data):
        if self.mock is False:
            cli = eureka_client.get_discovery_client()

            response_data = cli.do_service(
                application_name="BusinessLogicLayer",
                method="PUT",
                service="/Upsert/CompareResponses/{}".format(url_connect),
                timeout=20,
                headers={"Content-Type": "Application/Json"},
                data=bytes(json.dumps(data), encoding="utf-8"))

            return response_data

        return None
Exemplo n.º 9
0
def get_eureka_discovery():
    return eureka_client.get_discovery_client()