Project

General

Profile

Actions

User story #21247

closed

Add an API endpoint to export rules, directives, techniques, groups and their dependencies in an archive

Added by François ARMAND over 2 years ago. Updated over 2 years ago.

Status:
Released
Priority:
N/A
Assignee:
-
Category:
API
Target version:
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
To do
Fix check:
To do
Regression:

Description

Add an API endpoint that would export rules and their dependencies: directives, techniques (with resources), groups.
Add the corresponding endpoint to import the same things (or a sub-set of that).

Part of the user story is to define the serialization format.
We want to use an archive, likely zip because of its wide availability, of files organized in directory by type that mimic content of /var/rudder/config-repo

We want to use a similar format too.
There is a question around revision since it does not have meaning out of the context of a Rudder, but may be important for understand things afterward. A middle ground could be to export it in archive, but ignore it in import (since we can't import things at a given revision, just on a branch).

Serialisation should be easely human updatable, even with long text. Yaml is a good candidate. A first version can use another format, as long as the feature is put behind a feature flag that needs to be enabled so that people are informed that the format is not definitive.

EDIT: this first user story will only be for exporting archive of items with (optionaly) their dependencies.
We use json for now, but would like to be able to change the format latter on, so we will put the feature behind a feature switch.
A second user story for the opposite action (import zip archive with json serialized objects) will be added as a subtask.


Subtasks 3 (0 open3 closed)

User story #21315: Add revision to node groupsReleasedVincent MEMBRÉActions
User story #21321: Add API endpoint to import an archive of rules/etcResolvedVincent MEMBRÉActions
User story #21394: Missing API documentation for import/export policies with dependenciesReleasedVincent MEMBRÉActions

Related issues 4 (1 open3 closed)

Related to Rudder - User story #21675: User documentation of archive import/exportReleasedElaad FURREEDANActions
Related to Rudder - Enhancement #22333: Avoid sync group when importing a rule archiveReleasedVincent MEMBRÉActions
Related to Rudder - Enhancement #22342: Add a "all" keyword for export API in place of listing UUIDs of rule/directive/etcNewFrançois ARMANDActions
Related to Rudder - User story #5738: Export and import (create, update) Rule with all dependencies ResolvedActions
Actions #1

Updated by François ARMAND over 2 years ago

  • Status changed from New to In progress
  • Assignee set to François ARMAND
Actions #2

Updated by Alexis Mousset over 2 years ago

  • Tracker changed from Bug to User story
  • Priority deleted (0)
Actions #10

Updated by François ARMAND over 2 years ago

  • Subtask #21315 added
Actions #11

Updated by François ARMAND over 2 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from François ARMAND to Vincent MEMBRÉ
  • Pull Request set to https://github.com/Normation/rudder/pull/4345
Actions #12

Updated by François ARMAND over 2 years ago

  • Subject changed from Add API endpoint to export/import a rules, their directives, techniques, groups in an archive to Add API endpoint to export a rules, their directives, techniques, groups in an archive
  • Description updated (diff)
Actions #13

Updated by François ARMAND over 2 years ago

  • Subject changed from Add API endpoint to export a rules, their directives, techniques, groups in an archive to Add Aan PI endpoint to export rules, directives, techniques, groups and their dependencies in an archive
Actions #14

Updated by François ARMAND over 2 years ago

  • Subject changed from Add Aan PI endpoint to export rules, directives, techniques, groups and their dependencies in an archive to Add an API endpoint to export rules, directives, techniques, groups and their dependencies in an archive
Actions #15

Updated by François ARMAND over 2 years ago

  • Subtask #21321 added
Actions #16

Updated by Vincent MEMBRÉ over 2 years ago

  • Assignee deleted (Vincent MEMBRÉ)
Actions #17

Updated by François ARMAND over 2 years ago

  • Pull Request changed from https://github.com/Normation/rudder/pull/4345 to https://github.com/Normation/rudder/pull/4367

Merged with PR from #21321

Actions #18

Updated by François ARMAND over 2 years ago

  • Subtask #21394 added
Actions #19

Updated by François ARMAND over 2 years ago

  • Status changed from Pending technical review to Pending release
Actions #20

Updated by Vincent MEMBRÉ over 2 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 7.2.0~beta1 which was released today.

Actions #21

Updated by François ARMAND about 2 years ago

Actions #22

Updated by François ARMAND almost 2 years ago

Actions #23

Updated by François ARMAND almost 2 years ago

  • Related to Enhancement #22342: Add a "all" keyword for export API in place of listing UUIDs of rule/directive/etc added
Actions #24

Updated by François ARMAND about 1 year ago

  • Related to User story #5738: Export and import (create, update) Rule with all dependencies added
Actions

Also available in: Atom PDF