Skip to content

Commit 6c90884

Browse files
authored
Merge pull request #433 from mkilar123/bgp_fabric
Add support for BGP Fabric type into the DCNM_FABRIC module
2 parents 4b78183 + 28dbf6f commit 6c90884

File tree

2 files changed

+1045
-0
lines changed

2 files changed

+1045
-0
lines changed

plugins/module_utils/fabric/fabric_types.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ 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"
@@ -82,6 +83,7 @@ def _init_fabric_types(self) -> None:
8283
# Map fabric type to the feature name that must be running
8384
# on the controller to enable the fabric type.
8485
self._fabric_type_to_feature_name_map = {}
86+
self._fabric_type_to_feature_name_map["BGP"] = "vxlan"
8587
self._fabric_type_to_feature_name_map["IPFM"] = "pmn"
8688
self._fabric_type_to_feature_name_map["ISN"] = "vxlan"
8789
self._fabric_type_to_feature_name_map["LAN_CLASSIC"] = "lan"
@@ -115,6 +117,9 @@ def _init_fabric_types(self) -> None:
115117
self._mandatory_parameters_all_fabrics.append("FABRIC_TYPE")
116118

117119
self._mandatory_parameters = {}
120+
self._mandatory_parameters["BGP"] = copy.copy(
121+
self._mandatory_parameters_all_fabrics
122+
)
118123
self._mandatory_parameters["IPFM"] = copy.copy(
119124
self._mandatory_parameters_all_fabrics
120125
)
@@ -127,12 +132,14 @@ def _init_fabric_types(self) -> None:
127132
self._mandatory_parameters["VXLAN_EVPN"] = copy.copy(
128133
self._mandatory_parameters_all_fabrics
129134
)
135+
self._mandatory_parameters["BGP"].append("BGP_AS")
130136
self._mandatory_parameters["ISN"].append("BGP_AS")
131137
self._mandatory_parameters["VXLAN_EVPN"].append("BGP_AS")
132138
self._mandatory_parameters["VXLAN_EVPN_MSD"] = copy.copy(
133139
self._mandatory_parameters_all_fabrics
134140
)
135141

142+
self._mandatory_parameters["BGP"].sort()
136143
self._mandatory_parameters["IPFM"].sort()
137144
self._mandatory_parameters["ISN"].sort()
138145
self._mandatory_parameters["LAN_CLASSIC"].sort()

0 commit comments

Comments
 (0)