Skip to content

Commit 28dbf6f

Browse files
committed
corrected the sorting by key as requested by module maintainers
1 parent 739e352 commit 28dbf6f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

plugins/module_utils/fabric/fabric_types.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,22 @@ def _init_fabric_types(self) -> None:
7373
- Value is a list of mandatory parameters for the fabric type
7474
"""
7575
self._fabric_type_to_template_name_map = {}
76+
self._fabric_type_to_template_name_map["BGP"] = "Easy_Fabric_eBGP"
7677
self._fabric_type_to_template_name_map["IPFM"] = "Easy_Fabric_IPFM"
7778
self._fabric_type_to_template_name_map["ISN"] = "External_Fabric"
7879
self._fabric_type_to_template_name_map["LAN_CLASSIC"] = "LAN_Classic"
7980
self._fabric_type_to_template_name_map["VXLAN_EVPN"] = "Easy_Fabric"
8081
self._fabric_type_to_template_name_map["VXLAN_EVPN_MSD"] = "MSD_Fabric"
81-
self._fabric_type_to_template_name_map["BGP"] = "Easy_Fabric_eBGP"
8282

8383
# Map fabric type to the feature name that must be running
8484
# on the controller to enable the fabric type.
8585
self._fabric_type_to_feature_name_map = {}
86+
self._fabric_type_to_feature_name_map["BGP"] = "vxlan"
8687
self._fabric_type_to_feature_name_map["IPFM"] = "pmn"
8788
self._fabric_type_to_feature_name_map["ISN"] = "vxlan"
8889
self._fabric_type_to_feature_name_map["LAN_CLASSIC"] = "lan"
8990
self._fabric_type_to_feature_name_map["VXLAN_EVPN"] = "vxlan"
9091
self._fabric_type_to_feature_name_map["VXLAN_EVPN_MSD"] = "vxlan"
91-
self._fabric_type_to_feature_name_map["BGP"] = "vxlan"
9292

9393
# Map fabric type to the value that the controller GUI displays
9494
# in the Fabric Type column at NDFC -> Manage -> Fabrics
@@ -117,6 +117,9 @@ def _init_fabric_types(self) -> None:
117117
self._mandatory_parameters_all_fabrics.append("FABRIC_TYPE")
118118

119119
self._mandatory_parameters = {}
120+
self._mandatory_parameters["BGP"] = copy.copy(
121+
self._mandatory_parameters_all_fabrics
122+
)
120123
self._mandatory_parameters["IPFM"] = copy.copy(
121124
self._mandatory_parameters_all_fabrics
122125
)
@@ -129,22 +132,19 @@ def _init_fabric_types(self) -> None:
129132
self._mandatory_parameters["VXLAN_EVPN"] = copy.copy(
130133
self._mandatory_parameters_all_fabrics
131134
)
132-
self._mandatory_parameters["BGP"] = copy.copy(
133-
self._mandatory_parameters_all_fabrics
134-
)
135+
self._mandatory_parameters["BGP"].append("BGP_AS")
135136
self._mandatory_parameters["ISN"].append("BGP_AS")
136137
self._mandatory_parameters["VXLAN_EVPN"].append("BGP_AS")
137-
self._mandatory_parameters["BGP"].append("BGP_AS")
138138
self._mandatory_parameters["VXLAN_EVPN_MSD"] = copy.copy(
139139
self._mandatory_parameters_all_fabrics
140140
)
141141

142+
self._mandatory_parameters["BGP"].sort()
142143
self._mandatory_parameters["IPFM"].sort()
143144
self._mandatory_parameters["ISN"].sort()
144145
self._mandatory_parameters["LAN_CLASSIC"].sort()
145146
self._mandatory_parameters["VXLAN_EVPN"].sort()
146147
self._mandatory_parameters["VXLAN_EVPN_MSD"].sort()
147-
self._mandatory_parameters["BGP"].sort()
148148

149149
def _init_properties(self) -> None:
150150
"""

plugins/modules/dcnm_fabric.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@
6161
type: str
6262
FABRIC_TYPE:
6363
choices:
64+
- BGP
6465
- IPFM
6566
- ISN
6667
- LAN_CLASSIC
6768
- VXLAN_EVPN
6869
- VXLAN_EVPN_MSD
69-
- BGP
7070
description:
7171
- The type of fabric.
7272
required: true

0 commit comments

Comments
 (0)