def existingGoalParameters(self): goalName = self.decorator.getText("goalNameCtrl") modifiedProperties = self.environmentProperties() goalEnvProperties = self.dbProxy.goalEnvironmentProperties(self.theGoalId) for idx,p in enumerate(goalEnvProperties): if (p.name() == self.theEnvironmentName): goalEnvProperties[idx] = modifiedProperties parameters = GoalParameters(goalName,'None',[],goalEnvProperties) parameters.setId(self.theGoalId) return parameters
def update_goal(self, goal, name): old_goal = self.get_goal_by_name(name, simplify=False) id = old_goal.theId params = GoalParameters(goalName=goal.theName, goalOrig=goal.theOriginator, tags=goal.theTags, properties=goal.theEnvironmentProperties) params.setId(id) try: self.db_proxy.updateGoal(params) except ARM.DatabaseProxyException as ex: self.close() raise ARMHTTPError(ex)
def update_goal(self, goal, name): old_goal = self.get_goal_by_name(name, simplify=False) id = old_goal.theId params = GoalParameters( goalName=goal.theName, goalOrig=goal.theOriginator, tags=goal.theTags, properties=goal.theEnvironmentProperties ) params.setId(id) try: self.db_proxy.updateGoal(params) except ARM.DatabaseProxyException as ex: self.close() raise ARMHTTPError(ex)
def parameters(self): parameters = GoalParameters(self.theGoalName,self.theGoalOriginator,[],self.theEnvironmentProperties) parameters.setId(self.theGoalId) return parameters
def parameters(self): parameters = GoalParameters(self.theGoalName, self.theGoalOriginator, self.theTags, self.theEnvironmentProperties) parameters.setId(self.theGoalId) return parameters
def newGoalParameters(self): goalName = self.decorator.getText("goalNameCtrl") envProperties = self.environmentProperties() parameters = GoalParameters(goalName,'None',[],[envProperties]) parameters.setId(self.theGoalId) return parameters