From 3a50d9f0241dd54969cf3f363688ffc3face9849 Mon Sep 17 00:00:00 2001 From: Brian Tiemann Date: Mon, 28 Oct 2024 14:20:14 -0400 Subject: [PATCH] Rework policy/rule documentation --- docs/models/ipam/vlantranslationpolicy.md | 21 ++++++++++++++++----- docs/models/ipam/vlantranslationrule.md | 2 ++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/docs/models/ipam/vlantranslationpolicy.md b/docs/models/ipam/vlantranslationpolicy.md index 81c9ec0bd..59541931e 100644 --- a/docs/models/ipam/vlantranslationpolicy.md +++ b/docs/models/ipam/vlantranslationpolicy.md @@ -2,14 +2,25 @@ VLAN translation is a feature that consists of VLAN translation policies and [VLAN translation rules](./vlantranslationrule.md). Many rules can belong to a policy, and each rule defines a mapping of a local to remote VLAN ID (VID). A policy can then be assigned to an [Interface](../dcim/interface.md) or [VMInterface](../virtualization/vminterface.md), and all VLAN translation rules associated with that policy will be visible in the interface details. -Within a policy, local VIDs and remote VIDs are independently unique. Thus, two different policies may contain rules that define a local VID of 100 or a remote VID of 200, but two rules within a single policy with `local_vid=100` or with `remote_vid=200` are prohibited. +There are uniqueness constraints on `(policy, local_vid)` and on `(policy, remote_vid)` in the `VLANTranslationRule` model. Thus, you cannot have multiple rules linked to the same policy that have the same local VID or the same remote VID. A set of policies and rules might look like this: + +Policy 1: +- Rule: 100 -> 200 +- Rule: 101 -> 201 + +Policy 2: +- Rule: 100 -> 300 +- Rule: 101 -> 301 + +However this is not allowed: + +Policy 3: +- Rule: 100 -> 200 +- Rule: 100 -> 300 + ## Fields ### Name A unique human-friendly name. - -### Description - -A brief description of the policy and/or its purpose. diff --git a/docs/models/ipam/vlantranslationrule.md b/docs/models/ipam/vlantranslationrule.md index 8a77c8919..bffc030ed 100644 --- a/docs/models/ipam/vlantranslationrule.md +++ b/docs/models/ipam/vlantranslationrule.md @@ -1,5 +1,7 @@ # VLAN Translation Rules +A VLAN translation rule represents a one-to-one mapping of a local VLAN ID (VID) to a remote VID. Many rules can belong to a single policy. + See [VLAN translation policies](./vlantranslationpolicy.md) for an overview of the VLAN Translation feature. ## Fields