Skip to content

Commit 8a0ad7d

Browse files
committed
Add per_vrf_loopback_auto_provision
Adding a fabric property accessor that will be required by future commits for issue #352
1 parent 74eb648 commit 8a0ad7d

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

plugins/module_utils/fabric/fabric_details_v2.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,32 @@ def is_read_only(self):
361361
self.log.debug(msg)
362362
return None
363363

364+
@property
365+
def per_vrf_loopback_auto_provision(self):
366+
"""
367+
### Summary
368+
The ``nvPairs.PER_VRF_LOOPBACK_AUTO_PROVISION`` value of the fabric
369+
specified with filter.
370+
371+
### Raises
372+
None
373+
374+
### Type
375+
boolean
376+
377+
### Returns
378+
- True
379+
- False
380+
- None
381+
"""
382+
try:
383+
return self._get_nv_pair("PER_VRF_LOOPBACK_AUTO_PROVISION")
384+
except ValueError as error:
385+
msg = f"Failed to retrieve per_vrf_loopback_auto_provision: "
386+
msg += f"Error detail: {error}"
387+
self.log.debug(msg)
388+
return None
389+
364390
@property
365391
def replication_mode(self):
366392
"""

tests/unit/modules/dcnm/dcnm_fabric/test_fabric_details_by_name_v2.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ def responses():
161161
assert instance.fabric_id == "FABRIC-2"
162162
assert instance.fabric_type == "Switch_Fabric"
163163
assert instance.is_read_only is None
164+
assert instance.per_vrf_loopback_auto_provision is False
164165
assert instance.replication_mode == "Multicast"
165166
assert instance.template_name == "Easy_Fabric"
166167

0 commit comments

Comments
 (0)