From bf8caf4bb92c8f991be8afbc2b29dce8dba55731 Mon Sep 17 00:00:00 2001 From: Christian Adell Date: Thu, 13 Jun 2024 13:03:29 +0200 Subject: [PATCH] docs: improve design_mode docs (#169) --- docs/user/design_development.md | 2 +- docs/user/design_lifecycle.md | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/user/design_development.md b/docs/user/design_development.md index 4be46e2..2321ad2 100644 --- a/docs/user/design_development.md +++ b/docs/user/design_development.md @@ -108,7 +108,7 @@ Design files specifies a list of Jinja template that should be used to produce t ### `design_mode` -The `design_mode` indicates how this design's state will be tracked in Nautobot. By default, the design mode is set to `CLASSIC` mode, which means that objects are created in an ad-hoc fashion and no change sets are created. Classic mode is how all designs worked prior to the introduction of the design lifecycle features. If a design is intended to be tracked as a deployment, then design mode should be set to `DEPLOYMENT` in order to implement the full lifecycle. +The `design_mode` indicates how this design's state will be tracked in Nautobot. By default, the design mode is set to `CLASSIC` mode, which means that objects are created in an ad-hoc fashion and no change sets are created. Classic mode is how all designs worked prior to the introduction of the design lifecycle features. If a design is intended to be tracked as a deployment, then design mode should be set to `DEPLOYMENT` in order to implement the full lifecycle. See the [Design Lifecycle section](./design_lifecycle.md) for more details. ### `context_class` diff --git a/docs/user/design_lifecycle.md b/docs/user/design_lifecycle.md index 4ed7ba8..035bb5f 100644 --- a/docs/user/design_lifecycle.md +++ b/docs/user/design_lifecycle.md @@ -26,6 +26,17 @@ In the next figure, the Designs table view exposes the previous information. Not From the `Design`, the user can manage the associated `Job` configuration (yellow edit icon), check the docs (doc icon), and trigger its execution (run blue icon). +In order to select the new **mode** (by default, the classic/ad hoc is selected), you have to set it in the `Meta` class of the `DesignJob`: + +```py +from nautobot_design_builder.choices import DesignModeChoices + +class ExampleDesign(DesignJob): + ... + class Meta: + design_mode = DesignModeChoices.DEPLOYMENT +``` + ## Design Deployment or `DesignDeployment` Once a design (with the `DEPLOYMENT` mode) is deployed in Nautobot, a Design Deployment is created with the report of the changes implemented (i.e. `ChangeSets`), and with actions to update or decommission it (see next subsections).