Exemple #1
0
    def load_configuration(self):
        '''
        General description:This method configures the load
        Args:
            none
        Returns:none

        '''
        ConfigHelperService.load_common_configuration(self)
        if not self.result.get('git_path'):
            raise Exception('git_path not found for  config'
                            )
        else:
            self.git_path = self.result['git_path']
        self.systemDetail = \
            self.systemDetailsDb.get_system_details_single()
        if not self.systemDetail:
            raise Exception('systemDeatils not found')
        self.account_name = self.systemDetail.get('account_name')
        result = self.configdb.getConfigByName("CloneAccountServiceDetails")
        if not result.get('gitlab_token'):
            raise Exception('gitlab_token not found for  config'
                            )
        else:
            self.gitlab_token = result['gitlab_token']  # PRIVATE TOKEN
        if not result.get('git_lab_rest_api_url'):
            raise Exception('git_lab_rest_api_url not found for  config'
                            )
        else:
            self.git_lab_rest_api_url = \
                result['git_lab_rest_api_url']
Exemple #2
0
 def load_configuration(self):
     ConfigHelperService.load_common_configuration(self)
     if self.result.get("remote_machine_import_path") is None:
         raise Exception("remote_machine_import_path not found in config")
     else:
         self.remote_machine_import_path = self.result.get(
             "remote_machine_import_path")
Exemple #3
0
    def load_configuration(self):
        '''
        General description:This method configures the load
        Args:
            none
        Returns:none

        '''
        ConfigHelperService.load_common_configuration(self)
        if self.result.get("olderthandays") is not None:
            self.olderthandays = int(self.result["olderthandays"])
        else:
            raise Exception("olderthandays not found for CleanerServices")
        if self.result.get("buildolderthandays"):
            self.buildolderthandays = int(self.result["buildolderthandays"])
        else:
            raise Exception("buildolderthandays not found for CleanerServices")
        if self.result.get("buildcount"):
            self.buildCount = int(self.result["buildcount"])
        else:
            raise Exception("buildcount not found for CleanerServices")
        if self.result.get("RemoveActualArtifacts"):
            self.remove_actual_artifacts = self.result["RemoveActualArtifacts"]
        else:
            raise Exception(
                "RemoveActualArtifacts value not found for CleanerServices")
        if self.result.get("EntitiesToHandle") is not None:
            self.entities_to_handle = self.result.get("EntitiesToHandle")
        else:
            raise Exception(
                "EntitiesToHandle value not found for CleanerServices")
Exemple #4
0
 def load_configuration(self):
     ConfigHelperService.load_common_configuration(self)
     self.noOfThreads = int(self.result['noOfThreads'])
     if self.noOfThreads <= 0:
         raise ValueError(
             'CloneRequestService : No of parallel threads cannot be less than 1'
         )
Exemple #5
0
 def load_configuration(self):
     ConfigHelperService.load_common_configuration(self)
     if self.result.get("remote_machine_import_path") is None:
         raise Exception(
             "remote_machine_import_path not found in config of PushServices"
         )
     self.remote_import_path = self.result["remote_machine_import_path"]
     if self.result.get("count_of_files"):
         self.count_of_files = int(self.result["count_of_files"])
     if self.result.get("allow_split"):
         self.allow_split = str(self.result.get("allow_split")).lower()
Exemple #6
0
 def load_configuration(self):
     ConfigHelperService.load_common_configuration(self)
Exemple #7
0
 def load_configuration(self):
     ConfigHelperService.load_common_configuration(self)
     if self.result.get("count_of_files"):
         self.count_of_files = int(self.result["count_of_files"])