Project

General

Profile

Actions

User story #8228

closed

Add constraints to ncf parameters

Added by Vincent MEMBRÉ almost 8 years ago. Updated almost 2 years ago.

Status:
Released
Priority:
N/A
Category:
Generic methods
Target version:
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Regression:

Description

Currently in ncf, all parameters are string that should not be empty with no trailling/leading whitespace and are trimmed.

This prevent some usecases. like #8151

We will add a field as metadata in our generic methods like this:

@parameter_constraint <param_name> constraint_1 : value_1, constraint_2 : value_2

constraint will be defined as a simili json, so we can defined several at the same time.

Some constraint we want to define:

allow_empty_string
allow_whitespace_string
list of values
matching regexp
non matching regexp
minimal size
maximal size

This issue will have a pull request on the python API


Subtasks 7 (1 open6 closed)

User story #8229: Add constraint in ncf technique editorReleasedFrançois ARMANDActions
User story #8520: Document constraint usage in ncf methodsNewActions
Bug #8522: Doc does not generated after 8228ReleasedBenoît PECCATTEActions
Bug #8531: Doc does not generated after 8228 - master branchRejectedBenoît PECCATTEActions
User story #8541: default constraint are not kept if constraint are definedReleasedBenoît PECCATTEActions
User story #8544: Add max length 2048 default constraintReleasedBenoît PECCATTEActions
User story #8546: Broken test due to change in default constraintsReleasedBenoît PECCATTEActions

Related issues 1 (0 open1 closed)

Related to Rudder - Bug #8151: Technique Editor - whitespace as separator in "File ensure keys -> values present" methodReleasedBenoît PECCATTEActions
Actions #1

Updated by Vincent MEMBRÉ almost 8 years ago

  • Related to Bug #8151: Technique Editor - whitespace as separator in "File ensure keys -> values present" method added
Actions #2

Updated by Jonathan CLARKE almost 8 years ago

  • Subject changed from Add constraint to ncf parameters to Add constraints to ncf parameters
Actions #3

Updated by Vincent MEMBRÉ almost 8 years ago

  • Status changed from New to In progress
Actions #4

Updated by Vincent MEMBRÉ almost 8 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Vincent MEMBRÉ to Benoît PECCATTE
  • Pull Request set to https://github.com/Normation/ncf/pull/350
Actions #5

Updated by Vincent MEMBRÉ almost 8 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100

Applied in changeset commit:15a5d75258c82a05a13329c7f025ef626b44e10d.

Actions #6

Updated by Vincent MEMBRÉ almost 8 years ago

  • Status changed from Pending release to Discussion
Actions #7

Updated by Vincent MEMBRÉ almost 8 years ago

  • Status changed from Discussion to Pending release
  • % Done changed from 0 to 100

Applied in changeset commit:a808aa99b2a53430bf8218a1a07d901834a9dbe0.

Actions #8

Updated by Vincent MEMBRÉ over 7 years ago

  • Status changed from Pending release to Released
Actions #9

Updated by Alexis Mousset almost 2 years ago

  • Target version changed from 0.x to ncf-0.x
Actions #10

Updated by Alexis Mousset almost 2 years ago

  • Project changed from 41 to Rudder
  • Category set to Generic methods
Actions

Also available in: Atom PDF