コード例 #1
0
ファイル: create.py プロジェクト: JioCloud/horizon
 def handle(self, request, context):
     try:
         saharaclient.data_source_create(
             request,
             context["general_data_source_name"],
             context["general_data_source_description"],
             context["general_data_source_type"],
             context["source_url"],
             context.get("general_data_source_credential_user", None),
             context.get("general_data_source_credential_pass", None))
         return True
     except Exception:
         exceptions.handle(request)
         return False
コード例 #2
0
ファイル: create.py プロジェクト: yashbathia/horizon
 def handle(self, request, context):
     try:
         self.object = saharaclient.data_source_create(
             request, context["general_data_source_name"],
             context["general_data_source_description"],
             context["general_data_source_type"], context["source_url"],
             context.get("general_data_source_credential_user", None),
             context.get("general_data_source_credential_pass", None))
         return True
     except Exception:
         exceptions.handle(request)
         return False
コード例 #3
0
    def handle(self, request, context):
        try:
            self.object = saharaclient.data_source_create(
                request, context["general_data_source_name"],
                context["general_data_source_description"],
                context["general_data_source_type"], context["source_url"],
                context.get("general_data_source_credential_user", None),
                context.get("general_data_source_credential_pass", None))

            hlps = helpers.Helpers(request)
            if hlps.is_from_guide():
                request.session["guide_datasource_id"] = self.object.id
                request.session["guide_datasource_name"] = self.object.name
                self.success_url = (
                    "horizon:project:data_processing.wizard:jobex_guide")
            return True
        except Exception:
            exceptions.handle(request)
            return False
コード例 #4
0
ファイル: create.py プロジェクト: AlSayedGamal/horizon
    def handle(self, request, context):
        try:
            self.object = saharaclient.data_source_create(
                request,
                context["general_data_source_name"],
                context["general_data_source_description"],
                context["general_data_source_type"],
                context["source_url"],
                context.get("general_data_source_credential_user", None),
                context.get("general_data_source_credential_pass", None))

            hlps = helpers.Helpers(request)
            if hlps.is_from_guide():
                request.session["guide_datasource_id"] = self.object.id
                request.session["guide_datasource_name"] = self.object.name
                self.success_url = (
                    "horizon:project:data_processing.wizard:jobex_guide")
            return True
        except Exception:
            exceptions.handle(request)
            return False