コード例 #1
0
    def execute(self, parameter_pool):
        ori_stack = parameter_pool.get_value(ParameterName.OriginalSolutionStack)\
            if parameter_pool.has(ParameterName.OriginalSolutionStack) else None
        stack = parameter_pool.get_value(ParameterName.SolutionStack)\
            if parameter_pool.has(ParameterName.SolutionStack) else None
        
        if ori_stack is None or ori_stack == stack:
            log.info('Solution stack is not changed. Keeping current optionsettings file.')
        else:
            log.info('Rotate optionsettings file because solution stack is changed.')
            
            # Rotate default option setting file            
            location = parameter_pool.get_value(ParameterName.OptionSettingFile)            
            config_file.rotate_file(location)

            # Rotate branch environment option setting file if any
            branches = parameter_pool.get_value(ParameterName.Branches)\
                if parameter_pool.has(ParameterName.Branches) else None
            if branches:
                for _, branch in branches.items():
                    location = branch[ParameterName.OptionSettingFile]            
                    config_file.rotate_file(location)
        
        ret_result = OperationResult(self, None, None, None)
        return ret_result
コード例 #2
0
    def execute(self, parameter_pool):
        ori_stack = parameter_pool.get_value(ParameterName.OriginalSolutionStack)\
            if parameter_pool.has(ParameterName.OriginalSolutionStack) else None
        stack = parameter_pool.get_value(ParameterName.SolutionStack)\
            if parameter_pool.has(ParameterName.SolutionStack) else None
        
        if ori_stack is None or ori_stack == stack:
            log.info(u'Solution stack is not changed. Keeping current optionsettings file.')
        else:
            log.info(u'Rotate optionsettings file because solution stack is changed.')
            
            # Rotate default option setting file            
            location = parameter_pool.get_value(ParameterName.OptionSettingFile)            
            config_file.rotate_file(location)

            # Rotate branch environment option setting file if any
            branches = parameter_pool.get_value(ParameterName.Branches)\
                if parameter_pool.has(ParameterName.Branches) else None
            if branches:
                for _, branch in branches.iteritems():
                    location = branch[ParameterName.OptionSettingFile]            
                    config_file.rotate_file(location)
        
        ret_result = OperationResult(self, None, None, None)
        return ret_result
コード例 #3
0
 def execute(self, parameter_pool):
     ori_stack = parameter_pool.get_value(ParameterName.OriginalSolutionStack)\
         if parameter_pool.has(ParameterName.OriginalSolutionStack) else None
     stack = parameter_pool.get_value(ParameterName.SolutionStack)\
         if parameter_pool.has(ParameterName.SolutionStack) else None
     
     if ori_stack is None or ori_stack == stack:
         log.info('Solution stack is not changed. Keeping current optionsettings file.')
     else:
         log.info('Rotate optionsettings file becuase solution stack is changed.')
         location = parameter_pool.get_value(ParameterName.OptionSettingFile)            
         config_file.rotate_file(location)
     
     ret_result = OperationResult(self, None, None, None)
     return ret_result
コード例 #4
0
    def execute(self, parameter_pool):
        ori_stack = parameter_pool.get_value(ParameterName.OriginalSolutionStack)\
            if parameter_pool.has(ParameterName.OriginalSolutionStack) else None
        stack = parameter_pool.get_value(ParameterName.SolutionStack)\
            if parameter_pool.has(ParameterName.SolutionStack) else None

        if ori_stack is None or ori_stack == stack:
            log.info(
                'Solution stack is not changed. Keeping current optionsettings file.'
            )
        else:
            log.info(
                'Rotate optionsettings file becuase solution stack is changed.'
            )
            location = parameter_pool.get_value(
                ParameterName.OptionSettingFile)
            config_file.rotate_file(location)

        ret_result = OperationResult(self, None, None, None)
        return ret_result