Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
slapos slapos
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 122
    • Merge requests 122
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • slaposslapos
  • Merge requests
  • !1638

Merged
Created Sep 05, 2024 by Xavier Thompson@xavier_thompsonOwner

Introduce slapconfiguration:jsonschema recipe

  • Overview 49
  • Commits 6
  • Changes 3
  • Enable <= slap-connection in slapconfiguration usage
    This is for convenience, to allow

    [slap-configuration]
    <= slap-connection
    recipe = slapos.cookbook:slapconfiguration
  • Add slapconfiguration:jsonschema recipe. This validates the parameter dict against the JSON schema, and fills in defaults from the schema first if the property is not set by the user. This allows for a unique source of truth in default parameters :) It also uses the serialisation in the schema to determine how the parameters should be parsed (xml or json-in-xml). It requires downloading the JSON schemas in the SR.

    • This works for both regular instance parameters and for shared instance parameters.
    • Errors in the regular instance parameters lead to a raised exception, but errors in shared instance parameters just result in this shared instance being collected in invalid-shared-instance-list, while valid shared instances are collected in valid-shared-instance-list.
  • Add toggle parameters to slapconfiguration:jsonschema to allow selecting whether validating parameters and setting defaults apply to main or shared parameters or both or neither:

apply to validate-parameters set-default
neither main nor shared none none
shared parameters main main
main parameters shared shared
main and shared all all
Edited Jan 10, 2025 by Xavier Thompson
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: feat/slapconfiguration-with-jsonschema
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7