@@ -88,8 +88,28 @@ def _init_fabric_types(self) -> None:
88
88
self ._fabric_type_to_feature_name_map ["VXLAN_EVPN" ] = "vxlan"
89
89
self ._fabric_type_to_feature_name_map ["VXLAN_EVPN_MSD" ] = "vxlan"
90
90
91
+ # Map fabric type to the value that the controller GUI displays
92
+ # in the Fabric Type column at NDFC -> Manage -> Fabrics
93
+ # This is needed only for fabrics that use the External_Fabric
94
+ # template, e.g. ISN, and will be inserted into the POST request
95
+ # payload for external fabrics as (in the case of ISN fabric type):
96
+ # "EXT_FABRIC_TYPE": "Multi-Site External Network"
97
+ #
98
+ # Exposed via property fabric_type_to_ext_fabric_type_map
99
+ self ._fabric_type_to_ext_fabric_type_map = {}
100
+ self ._fabric_type_to_ext_fabric_type_map ["ISN" ] = "Multi-Site External Network"
101
+
91
102
self ._valid_fabric_types = sorted (self ._fabric_type_to_template_name_map .keys ())
92
103
104
+ # self._external_fabric_types is used in conjunction with
105
+ # self._fabric_type_to_ext_fabric_type_map. This is used in (at least)
106
+ # FabricCreateCommon() to determine if EXT_FABRIC_TYPE key needs to be
107
+ # added to a payload.
108
+ #
109
+ # Exposed via property external_fabric_types
110
+ self ._external_fabric_types = set ()
111
+ self ._external_fabric_types .add ("ISN" )
112
+
93
113
self ._mandatory_parameters_all_fabrics = []
94
114
self ._mandatory_parameters_all_fabrics .append ("FABRIC_NAME" )
95
115
self ._mandatory_parameters_all_fabrics .append ("FABRIC_TYPE" )
@@ -128,6 +148,19 @@ def _init_properties(self) -> None:
128
148
self ._properties ["template_name" ] = None
129
149
self ._properties ["valid_fabric_types" ] = self ._valid_fabric_types
130
150
151
+ @property
152
+ def external_fabric_types (self ):
153
+ """
154
+ # Summary
155
+
156
+ set() containing all external fabric types e.g. ISN.
157
+
158
+ # Raises
159
+
160
+ None
161
+ """
162
+ return self ._external_fabric_types
163
+
131
164
@property
132
165
def fabric_type (self ):
133
166
"""
@@ -150,6 +183,19 @@ def fabric_type(self, value):
150
183
raise ValueError (msg )
151
184
self ._properties ["fabric_type" ] = value
152
185
186
+ @property
187
+ def fabric_type_to_ext_fabric_type_map (self ):
188
+ """
189
+ # Summary
190
+
191
+ Returns a dictionary, keyed on fabric_type (e.g. "ISN"),
192
+ whose value is a string that the NDFC GUI uses to describe the
193
+ external fabric type. See the Fabric Type column at
194
+ NDFC -> Manage -> Fabrics for an example of how this is used
195
+ by the NDFC GUI.
196
+ """
197
+ return self ._fabric_type_to_ext_fabric_type_map
198
+
153
199
@property
154
200
def feature_name (self ):
155
201
"""
0 commit comments