From 7c834a1b9d2c8445bf68a09b636b31960aeb1e69 Mon Sep 17 00:00:00 2001 From: Claus Holbech Date: Wed, 8 Nov 2023 16:09:57 +0100 Subject: [PATCH 1/6] Feat(eos_designs): Add `default_mgmt_method` to be used later in new management settings. --- .../eos_designs_shared_utils/mgmt.py | 41 +++++++++++++++++++ .../schema_fragments/default_mgmt_method.yml | 28 +++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 ansible_collections/arista/avd/roles/eos_designs/schemas/schema_fragments/default_mgmt_method.yml diff --git a/ansible_collections/arista/avd/plugins/plugin_utils/eos_designs_shared_utils/mgmt.py b/ansible_collections/arista/avd/plugins/plugin_utils/eos_designs_shared_utils/mgmt.py index 0f0174d6aa5..8c1d41f5cd7 100644 --- a/ansible_collections/arista/avd/plugins/plugin_utils/eos_designs_shared_utils/mgmt.py +++ b/ansible_collections/arista/avd/plugins/plugin_utils/eos_designs_shared_utils/mgmt.py @@ -6,6 +6,7 @@ from functools import cached_property from typing import TYPE_CHECKING +from ansible_collections.arista.avd.plugins.plugin_utils.errors import AristaAvdMissingVariableError from ansible_collections.arista.avd.plugins.plugin_utils.utils import default, get if TYPE_CHECKING: @@ -54,3 +55,43 @@ def mgmt_gateway(self: SharedUtils) -> str | None: @cached_property def ipv6_mgmt_gateway(self: SharedUtils) -> str | None: return get(self.hostvars, "ipv6_mgmt_gateway") + + @cached_property + def default_mgmt_method(self: SharedUtils) -> str | None: + """ + This is only executed if some protocol looks for the default value, so we can raise here to ensure a working config. + """ + default_mgmt_method = get(self.hostvars, "default_mgmt_method", default="oob") + if default_mgmt_method == "oob": + if (self.mgmt_ip is None) and (self.ipv6_mgmt_ip is None): + raise AristaAvdMissingVariableError("'default_mgmt_method: oob' requires either 'mgmt_ip' or 'ipv6_mgmt_ip' to bet set.") + + return default_mgmt_method + + elif default_mgmt_method == "inband": + # Check for missing interface + if self.inband_mgmt_interface is None: + raise AristaAvdMissingVariableError("'default_mgmt_method: inband' requires 'inband_mgmt_interface' to be set.") + + return default_mgmt_method + + return None + + @cached_property + def default_mgmt_protocol_vrf(self: SharedUtils) -> str | None: + if self.default_mgmt_method == "oob": + return self.mgmt_interface_vrf + elif self.default_mgmt_method == "inband": + # inband_mgmt_vrf returns None for vrf default. + return self.inband_mgmt_vrf or "default" + + return None + + @cached_property + def default_mgmt_protocol_interface(self: SharedUtils) -> str | None: + if self.default_mgmt_method == "oob": + return self.mgmt_interface + elif self.default_mgmt_method == "inband": + return self.inband_mgmt_interface + + return None diff --git a/ansible_collections/arista/avd/roles/eos_designs/schemas/schema_fragments/default_mgmt_method.yml b/ansible_collections/arista/avd/roles/eos_designs/schemas/schema_fragments/default_mgmt_method.yml new file mode 100644 index 00000000000..a6cd2258293 --- /dev/null +++ b/ansible_collections/arista/avd/roles/eos_designs/schemas/schema_fragments/default_mgmt_method.yml @@ -0,0 +1,28 @@ +# Copyright (c) 2023 Arista Networks, Inc. +# Use of this source code is governed by the Apache License 2.0 +# that can be found in the LICENSE file. +# yaml-language-server: $schema=../../../../plugins/plugin_utils/schema/avd_meta_schema.json +# Line above is used by RedHat's YAML Schema vscode extension +# Use Ctrl + Space to get suggestions for every field. Autocomplete will pop up after typing 2 letters. +type: dict +keys: + default_mgmt_method: + documentation_options: + table: management-interface-settings + type: str + description: | + `default_mgmt_method` controls the default VRF and source interface used for the following management and monitoring protocols configured with `eos_designs`: + - `cv_settings` + - `dns_settings` + - `ntp_settings` + - `sflow_settings` + + `oob` means the protocols will be configured with the VRF set by `mgmt_interface_vrf` and `mgmt_interface` as source interface. + `inband` means the protocols will be configured with the VRF set by `inband_mgmt_vrf` and `inband_mgmt_interface` as source interface. + `none` means the VRF and or interface must be manually set for each protocol. + This can be overriden under the settings for each protocol. + valid_values: + - oob + - inband + - none + default: oob From 61e2b52128ff08b170eee1e2b26f7b0d04f6864e Mon Sep 17 00:00:00 2001 From: Claus Holbech Date: Wed, 8 Nov 2023 16:15:12 +0100 Subject: [PATCH 2/6] Fix schema --- .../tables/management-interface-settings.md | 2 ++ .../schemas/eos_designs.jsonschema.json | 11 +++++++++++ .../eos_designs/schemas/eos_designs.schema.yml | 17 +++++++++++++++++ ...ethod.yml => default_mgmt_method.schema.yml} | 0 4 files changed, 30 insertions(+) rename ansible_collections/arista/avd/roles/eos_designs/schemas/schema_fragments/{default_mgmt_method.yml => default_mgmt_method.schema.yml} (100%) diff --git a/ansible_collections/arista/avd/roles/eos_designs/docs/tables/management-interface-settings.md b/ansible_collections/arista/avd/roles/eos_designs/docs/tables/management-interface-settings.md index 71978ac57f9..6275549ed2f 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/docs/tables/management-interface-settings.md +++ b/ansible_collections/arista/avd/roles/eos_designs/docs/tables/management-interface-settings.md @@ -7,6 +7,7 @@ | Variable | Type | Required | Default | Value Restrictions | Description | | -------- | ---- | -------- | ------- | ------------------ | ----------- | + | [default_mgmt_method](## "default_mgmt_method") | String | | `oob` | Valid Values:
- oob
- inband
- none | `default_mgmt_method` controls the default VRF and source interface used for the following management and monitoring protocols configured with `eos_designs`:
- `cv_settings`
- `dns_settings`
- `ntp_settings`
- `sflow_settings`

`oob` means the protocols will be configured with the VRF set by `mgmt_interface_vrf` and `mgmt_interface` as source interface.
`inband` means the protocols will be configured with the VRF set by `inband_mgmt_vrf` and `inband_mgmt_interface` as source interface.
`none` means the VRF and or interface must be manually set for each protocol.
This can be overriden under the settings for each protocol.
| | [mgmt_destination_networks](## "mgmt_destination_networks") | List, items: String | | | | List of IPv4 prefixes to configure as static routes towards the OOB Management interface gateway.
Replaces the default route. | | [  - <str>](## "mgmt_destination_networks.[].<str>") | String | | | | IPv4_address/Mask. | | [mgmt_gateway](## "mgmt_gateway") | String | | | | OOB Management interface gateway in IPv4 format.
Used as next-hop for default gateway or static routes defined under 'mgmt_destination_networks'. | @@ -18,6 +19,7 @@ === "YAML" ```yaml + default_mgmt_method: mgmt_destination_networks: - mgmt_gateway: diff --git a/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.jsonschema.json b/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.jsonschema.json index 444968ffa61..5c1aba5278a 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.jsonschema.json +++ b/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.jsonschema.json @@ -3079,6 +3079,17 @@ }, "title": "Default Interfaces" }, + "default_mgmt_method": { + "type": "string", + "description": "`default_mgmt_method` controls the default VRF and source interface used for the following management and monitoring protocols configured with `eos_designs`:\n - `cv_settings`\n - `dns_settings`\n - `ntp_settings`\n - `sflow_settings`\n\n`oob` means the protocols will be configured with the VRF set by `mgmt_interface_vrf` and `mgmt_interface` as source interface.\n`inband` means the protocols will be configured with the VRF set by `inband_mgmt_vrf` and `inband_mgmt_interface` as source interface.\n`none` means the VRF and or interface must be manually set for each protocol.\nThis can be overriden under the settings for each protocol.\n", + "enum": [ + "oob", + "inband", + "none" + ], + "default": "oob", + "title": "Default Management Method" + }, "default_node_types": { "type": "array", "description": "Uses hostname matches against a regular expression to determine the node type.", diff --git a/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.schema.yml b/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.schema.yml index b62f51fced9..abb1bddb853 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.schema.yml +++ b/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.schema.yml @@ -635,6 +635,23 @@ keys: items: type: str description: Interface range or interface. + default_mgmt_method: + documentation_options: + table: management-interface-settings + type: str + description: "`default_mgmt_method` controls the default VRF and source interface + used for the following management and monitoring protocols configured with `eos_designs`:\n + \ - `cv_settings`\n - `dns_settings`\n - `ntp_settings`\n - `sflow_settings`\n\n`oob` + means the protocols will be configured with the VRF set by `mgmt_interface_vrf` + and `mgmt_interface` as source interface.\n`inband` means the protocols will + be configured with the VRF set by `inband_mgmt_vrf` and `inband_mgmt_interface` + as source interface.\n`none` means the VRF and or interface must be manually + set for each protocol.\nThis can be overriden under the settings for each protocol.\n" + valid_values: + - oob + - inband + - none + default: oob default_node_types: type: list primary_key: node_type diff --git a/ansible_collections/arista/avd/roles/eos_designs/schemas/schema_fragments/default_mgmt_method.yml b/ansible_collections/arista/avd/roles/eos_designs/schemas/schema_fragments/default_mgmt_method.schema.yml similarity index 100% rename from ansible_collections/arista/avd/roles/eos_designs/schemas/schema_fragments/default_mgmt_method.yml rename to ansible_collections/arista/avd/roles/eos_designs/schemas/schema_fragments/default_mgmt_method.schema.yml From 1e21d6ef7c4c8eb2c40568e40eed9beeac546ec7 Mon Sep 17 00:00:00 2001 From: Carl Buchmann Date: Wed, 8 Nov 2023 11:07:42 -0500 Subject: [PATCH 3/6] fix typo --- .../avd/roles/eos_designs/schemas/eos_designs.jsonschema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.jsonschema.json b/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.jsonschema.json index 5c1aba5278a..d3e0e6851a6 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.jsonschema.json +++ b/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.jsonschema.json @@ -3081,7 +3081,7 @@ }, "default_mgmt_method": { "type": "string", - "description": "`default_mgmt_method` controls the default VRF and source interface used for the following management and monitoring protocols configured with `eos_designs`:\n - `cv_settings`\n - `dns_settings`\n - `ntp_settings`\n - `sflow_settings`\n\n`oob` means the protocols will be configured with the VRF set by `mgmt_interface_vrf` and `mgmt_interface` as source interface.\n`inband` means the protocols will be configured with the VRF set by `inband_mgmt_vrf` and `inband_mgmt_interface` as source interface.\n`none` means the VRF and or interface must be manually set for each protocol.\nThis can be overriden under the settings for each protocol.\n", + "description": "`default_mgmt_method` controls the default VRF and source interface used for the following management and monitoring protocols configured with `eos_designs`:\n - `cv_settings`\n - `dns_settings`\n - `ntp_settings`\n - `sflow_settings`\n\n`oob` means the protocols will be configured with the VRF set by `mgmt_interface_vrf` and `mgmt_interface` as source interface.\n`inband` means the protocols will be configured with the VRF set by `inband_mgmt_vrf` and `inband_mgmt_interface` as source interface.\n`none` means the VRF and or interface must be manually set for each protocol.\nThis can be overridden under the settings for each protocol.\n", "enum": [ "oob", "inband", From ba0a6425f60038bd3c6cf20b2123410e50ffb2a7 Mon Sep 17 00:00:00 2001 From: Carl Buchmann Date: Wed, 8 Nov 2023 11:09:39 -0500 Subject: [PATCH 4/6] Fix typo --- .../eos_designs/docs/tables/management-interface-settings.md | 2 +- .../arista/avd/roles/eos_designs/schemas/eos_designs.schema.yml | 2 +- .../schemas/schema_fragments/default_mgmt_method.schema.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible_collections/arista/avd/roles/eos_designs/docs/tables/management-interface-settings.md b/ansible_collections/arista/avd/roles/eos_designs/docs/tables/management-interface-settings.md index 6275549ed2f..8f053418b74 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/docs/tables/management-interface-settings.md +++ b/ansible_collections/arista/avd/roles/eos_designs/docs/tables/management-interface-settings.md @@ -7,7 +7,7 @@ | Variable | Type | Required | Default | Value Restrictions | Description | | -------- | ---- | -------- | ------- | ------------------ | ----------- | - | [default_mgmt_method](## "default_mgmt_method") | String | | `oob` | Valid Values:
- oob
- inband
- none | `default_mgmt_method` controls the default VRF and source interface used for the following management and monitoring protocols configured with `eos_designs`:
- `cv_settings`
- `dns_settings`
- `ntp_settings`
- `sflow_settings`

`oob` means the protocols will be configured with the VRF set by `mgmt_interface_vrf` and `mgmt_interface` as source interface.
`inband` means the protocols will be configured with the VRF set by `inband_mgmt_vrf` and `inband_mgmt_interface` as source interface.
`none` means the VRF and or interface must be manually set for each protocol.
This can be overriden under the settings for each protocol.
| + | [default_mgmt_method](## "default_mgmt_method") | String | | `oob` | Valid Values:
- oob
- inband
- none | `default_mgmt_method` controls the default VRF and source interface used for the following management and monitoring protocols configured with `eos_designs`:
- `cv_settings`
- `dns_settings`
- `ntp_settings`
- `sflow_settings`

`oob` means the protocols will be configured with the VRF set by `mgmt_interface_vrf` and `mgmt_interface` as source interface.
`inband` means the protocols will be configured with the VRF set by `inband_mgmt_vrf` and `inband_mgmt_interface` as source interface.
`none` means the VRF and or interface must be manually set for each protocol.
This can be overridden under the settings for each protocol.
| | [mgmt_destination_networks](## "mgmt_destination_networks") | List, items: String | | | | List of IPv4 prefixes to configure as static routes towards the OOB Management interface gateway.
Replaces the default route. | | [  - <str>](## "mgmt_destination_networks.[].<str>") | String | | | | IPv4_address/Mask. | | [mgmt_gateway](## "mgmt_gateway") | String | | | | OOB Management interface gateway in IPv4 format.
Used as next-hop for default gateway or static routes defined under 'mgmt_destination_networks'. | diff --git a/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.schema.yml b/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.schema.yml index abb1bddb853..6bfe63e2f24 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.schema.yml +++ b/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.schema.yml @@ -646,7 +646,7 @@ keys: and `mgmt_interface` as source interface.\n`inband` means the protocols will be configured with the VRF set by `inband_mgmt_vrf` and `inband_mgmt_interface` as source interface.\n`none` means the VRF and or interface must be manually - set for each protocol.\nThis can be overriden under the settings for each protocol.\n" + set for each protocol.\nThis can be overridden under the settings for each protocol.\n" valid_values: - oob - inband diff --git a/ansible_collections/arista/avd/roles/eos_designs/schemas/schema_fragments/default_mgmt_method.schema.yml b/ansible_collections/arista/avd/roles/eos_designs/schemas/schema_fragments/default_mgmt_method.schema.yml index a6cd2258293..c9137beac88 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/schemas/schema_fragments/default_mgmt_method.schema.yml +++ b/ansible_collections/arista/avd/roles/eos_designs/schemas/schema_fragments/default_mgmt_method.schema.yml @@ -20,7 +20,7 @@ keys: `oob` means the protocols will be configured with the VRF set by `mgmt_interface_vrf` and `mgmt_interface` as source interface. `inband` means the protocols will be configured with the VRF set by `inband_mgmt_vrf` and `inband_mgmt_interface` as source interface. `none` means the VRF and or interface must be manually set for each protocol. - This can be overriden under the settings for each protocol. + This can be overridden under the settings for each protocol. valid_values: - oob - inband From 3eb226226b3000525c90c5dbd353447562c8bb1e Mon Sep 17 00:00:00 2001 From: Carl Buchmann Date: Wed, 8 Nov 2023 12:19:21 -0500 Subject: [PATCH 5/6] fix grammar --- .../docs/tables/management-interface-settings.md | 2 +- .../roles/eos_designs/schemas/eos_designs.jsonschema.json | 2 +- .../avd/roles/eos_designs/schemas/eos_designs.schema.yml | 6 +++--- .../schemas/schema_fragments/default_mgmt_method.schema.yml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ansible_collections/arista/avd/roles/eos_designs/docs/tables/management-interface-settings.md b/ansible_collections/arista/avd/roles/eos_designs/docs/tables/management-interface-settings.md index 8f053418b74..3377dfa2e90 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/docs/tables/management-interface-settings.md +++ b/ansible_collections/arista/avd/roles/eos_designs/docs/tables/management-interface-settings.md @@ -7,7 +7,7 @@ | Variable | Type | Required | Default | Value Restrictions | Description | | -------- | ---- | -------- | ------- | ------------------ | ----------- | - | [default_mgmt_method](## "default_mgmt_method") | String | | `oob` | Valid Values:
- oob
- inband
- none | `default_mgmt_method` controls the default VRF and source interface used for the following management and monitoring protocols configured with `eos_designs`:
- `cv_settings`
- `dns_settings`
- `ntp_settings`
- `sflow_settings`

`oob` means the protocols will be configured with the VRF set by `mgmt_interface_vrf` and `mgmt_interface` as source interface.
`inband` means the protocols will be configured with the VRF set by `inband_mgmt_vrf` and `inband_mgmt_interface` as source interface.
`none` means the VRF and or interface must be manually set for each protocol.
This can be overridden under the settings for each protocol.
| + | [default_mgmt_method](## "default_mgmt_method") | String | | `oob` | Valid Values:
- oob
- inband
- none | `default_mgmt_method` controls the default VRF and source interface used for the following management and monitoring protocols configured with `eos_designs`:
- `cv_settings`
- `dns_settings`
- `ntp_settings`
- `sflow_settings`

`oob` means the protocols will be configured with the VRF set by `mgmt_interface_vrf` and `mgmt_interface` as the source interface.
`inband` means the protocols will be configured with the VRF set by `inband_mgmt_vrf` and `inband_mgmt_interface` as the source interface.
`none` means the VRF and or interface must be manually set for each protocol.
This can be overridden under the settings for each protocol.
| | [mgmt_destination_networks](## "mgmt_destination_networks") | List, items: String | | | | List of IPv4 prefixes to configure as static routes towards the OOB Management interface gateway.
Replaces the default route. | | [  - <str>](## "mgmt_destination_networks.[].<str>") | String | | | | IPv4_address/Mask. | | [mgmt_gateway](## "mgmt_gateway") | String | | | | OOB Management interface gateway in IPv4 format.
Used as next-hop for default gateway or static routes defined under 'mgmt_destination_networks'. | diff --git a/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.jsonschema.json b/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.jsonschema.json index d3e0e6851a6..3ef1f5822d7 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.jsonschema.json +++ b/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.jsonschema.json @@ -3081,7 +3081,7 @@ }, "default_mgmt_method": { "type": "string", - "description": "`default_mgmt_method` controls the default VRF and source interface used for the following management and monitoring protocols configured with `eos_designs`:\n - `cv_settings`\n - `dns_settings`\n - `ntp_settings`\n - `sflow_settings`\n\n`oob` means the protocols will be configured with the VRF set by `mgmt_interface_vrf` and `mgmt_interface` as source interface.\n`inband` means the protocols will be configured with the VRF set by `inband_mgmt_vrf` and `inband_mgmt_interface` as source interface.\n`none` means the VRF and or interface must be manually set for each protocol.\nThis can be overridden under the settings for each protocol.\n", + "description": "`default_mgmt_method` controls the default VRF and source interface used for the following management and monitoring protocols configured with `eos_designs`:\n - `cv_settings`\n - `dns_settings`\n - `ntp_settings`\n - `sflow_settings`\n\n`oob` means the protocols will be configured with the VRF set by `mgmt_interface_vrf` and `mgmt_interface` as the source interface.\n`inband` means the protocols will be configured with the VRF set by `inband_mgmt_vrf` and `inband_mgmt_interface` as the source interface.\n`none` means the VRF and or interface must be manually set for each protocol.\nThis can be overridden under the settings for each protocol.\n", "enum": [ "oob", "inband", diff --git a/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.schema.yml b/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.schema.yml index 6bfe63e2f24..2443ed5212e 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.schema.yml +++ b/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.schema.yml @@ -643,9 +643,9 @@ keys: used for the following management and monitoring protocols configured with `eos_designs`:\n \ - `cv_settings`\n - `dns_settings`\n - `ntp_settings`\n - `sflow_settings`\n\n`oob` means the protocols will be configured with the VRF set by `mgmt_interface_vrf` - and `mgmt_interface` as source interface.\n`inband` means the protocols will - be configured with the VRF set by `inband_mgmt_vrf` and `inband_mgmt_interface` - as source interface.\n`none` means the VRF and or interface must be manually + and `mgmt_interface` as the source interface.\n`inband` means the protocols + will be configured with the VRF set by `inband_mgmt_vrf` and `inband_mgmt_interface` + as the source interface.\n`none` means the VRF and or interface must be manually set for each protocol.\nThis can be overridden under the settings for each protocol.\n" valid_values: - oob diff --git a/ansible_collections/arista/avd/roles/eos_designs/schemas/schema_fragments/default_mgmt_method.schema.yml b/ansible_collections/arista/avd/roles/eos_designs/schemas/schema_fragments/default_mgmt_method.schema.yml index c9137beac88..df0beb55ee4 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/schemas/schema_fragments/default_mgmt_method.schema.yml +++ b/ansible_collections/arista/avd/roles/eos_designs/schemas/schema_fragments/default_mgmt_method.schema.yml @@ -17,8 +17,8 @@ keys: - `ntp_settings` - `sflow_settings` - `oob` means the protocols will be configured with the VRF set by `mgmt_interface_vrf` and `mgmt_interface` as source interface. - `inband` means the protocols will be configured with the VRF set by `inband_mgmt_vrf` and `inband_mgmt_interface` as source interface. + `oob` means the protocols will be configured with the VRF set by `mgmt_interface_vrf` and `mgmt_interface` as the source interface. + `inband` means the protocols will be configured with the VRF set by `inband_mgmt_vrf` and `inband_mgmt_interface` as the source interface. `none` means the VRF and or interface must be manually set for each protocol. This can be overridden under the settings for each protocol. valid_values: From e456ba33072025181fc6ac5cdd8d5fc73fe9f628 Mon Sep 17 00:00:00 2001 From: Claus Holbech Date: Thu, 9 Nov 2023 14:37:43 +0100 Subject: [PATCH 6/6] Update mgmt.py --- .../avd/plugins/plugin_utils/eos_designs_shared_utils/mgmt.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible_collections/arista/avd/plugins/plugin_utils/eos_designs_shared_utils/mgmt.py b/ansible_collections/arista/avd/plugins/plugin_utils/eos_designs_shared_utils/mgmt.py index 8c1d41f5cd7..545bb41c99e 100644 --- a/ansible_collections/arista/avd/plugins/plugin_utils/eos_designs_shared_utils/mgmt.py +++ b/ansible_collections/arista/avd/plugins/plugin_utils/eos_designs_shared_utils/mgmt.py @@ -60,6 +60,8 @@ def ipv6_mgmt_gateway(self: SharedUtils) -> str | None: def default_mgmt_method(self: SharedUtils) -> str | None: """ This is only executed if some protocol looks for the default value, so we can raise here to ensure a working config. + + The check for 'inband_mgmt_interface' relies on other indirect checks done in that code. """ default_mgmt_method = get(self.hostvars, "default_mgmt_method", default="oob") if default_mgmt_method == "oob":