mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 22:00:22 -07:00
nxos_bgp updates (#24270)
* Remove invoke from nxos_bgp * Try to simplify get_existing * Streamline state_present * More testing, squash & compact get_value & get_custom_value * Streamline main * nxapi has problems reading CustomNetworkConfig directly
This commit is contained in:
parent
4186b07d21
commit
830f19d444
4 changed files with 170 additions and 214 deletions
|
@ -155,6 +155,9 @@ class NetworkConfig(object):
|
|||
def __str__(self):
|
||||
return '\n'.join([c.raw for c in self.items])
|
||||
|
||||
def __len__(self):
|
||||
return len(self._items)
|
||||
|
||||
def load(self, s):
|
||||
self._items = self.parse(s)
|
||||
|
||||
|
@ -368,6 +371,9 @@ class NetworkConfig(object):
|
|||
|
||||
class CustomNetworkConfig(NetworkConfig):
|
||||
|
||||
def items_text(self):
|
||||
return [item.text for item in self.items]
|
||||
|
||||
def expand_section(self, configobj, S=None):
|
||||
if S is None:
|
||||
S = list()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue