def _show_snmp_config(self):
     show_cmds = []
     cmd = "show snmp"
     show_cmds.append(show_cmd(self._module, cmd, json_fmt=True, fail_on_error=False))
     cmd = "show running-config | include snmp"
     show_cmds.append(show_cmd(self._module, cmd, json_fmt=True, fail_on_error=False))
     return show_cmds
 def _show_ntp_config(self):
     show_cmds = []
     cmd = "show ntp"
     show_cmds.append(
         show_cmd(self._module, cmd, json_fmt=True, fail_on_error=False))
     cmd = "show ntp keys"
     show_cmds.append(
         show_cmd(self._module, cmd, json_fmt=True, fail_on_error=False))
     return show_cmds
 def check_declarative_intent_params(self, result):
     if not result['changed']:
         return
     delay_interval = self._required_config.get('delay')
     if delay_interval > 0:
         time.sleep(delay_interval)
         for cmd in ("show mlag-vip", ""):
             show_cmd(self._module,
                      cmd,
                      json_fmt=False,
                      fail_on_error=False)
    def show_logging(self):
        show_logging = show_cmd(self._module, "show logging", json_fmt=True, fail_on_error=False)
        running_config = show_cmd(self._module, "show running-config | include .*logging.*debug-files.*", json_fmt=True, fail_on_error=False)

        if len(show_logging) > 0:
            show_logging[0]['debug'] = running_config['Lines'] if 'Lines' in running_config else []
        else:
            show_logging = [{
                'debug': running_config['Lines'] if 'Lines' in running_config else []
            }]
        return show_logging
Beispiel #5
0
 def _show_ptp_config(self):
     cmd = "show ptp clock"
     return show_cmd(self._module, cmd, json_fmt=True, fail_on_error=False)
 def show_logging(self):
     # we can't use show logging it has lack of information
     return show_cmd(self._module,
                     "show running-config | include .*logging.*",
                     json_fmt=False,
                     fail_on_error=False)
Beispiel #7
0
 def _show_users(self):
     cmd = "show snmp user"
     return show_cmd(self._module, cmd, json_fmt=True, fail_on_error=False)
 def _get_protocols(self):
     return show_cmd(self._module, "show protocols")
 def _get_ospf_config(self, ospf_id):
     cmd = 'show ip ospf %s | include Process' % ospf_id
     return show_cmd(self._module, cmd, json_fmt=False, fail_on_error=False)
 def _show_ptp_interface_config(self):
     cmd = "show ptp interface %s %s" % (self._interface_type,
                                         self._interface_id)
     return show_cmd(self._module, cmd, json_fmt=True, fail_on_error=False)
 def _show_nve_detail(self):
     cmd = "show interface nve {0} detail".format(self._required_config.get("nve_id"))
     return show_cmd(self._module, cmd, json_fmt=True, fail_on_error=False)
 def _show_vxlan_config(self):
     cmd = "show interfaces nve"
     return show_cmd(self._module, cmd, json_fmt=True, fail_on_error=False)
Beispiel #13
0
 def _get_magp_config(self):
     cmd = "show magp"
     return show_cmd(self._module, cmd, json_fmt=True, fail_on_error=False)
 def _show_mlag_cmd(self, cmd):
     return show_cmd(self._module, cmd, json_fmt=True, fail_on_error=False)
 def _show_mlag_data(self):
     cmd = "show mlag"
     return show_cmd(self._module, cmd, json_fmt=True, fail_on_error=False)
Beispiel #16
0
 def _get_username_config(self):
     return show_cmd(self._module,
                     "show usernames",
                     json_fmt=True,
                     fail_on_error=False)
Beispiel #17
0
 def _show_peers_servers_config(self):
     cmd = "show ntp configured"
     return show_cmd(self._module, cmd, json_fmt=True, fail_on_error=False)
 def _show_igmp_querier_config(self):
     cmd = ("show ip igmp snooping querier vlan %d " %
            self._required_config['vlan_id'])
     return show_cmd(self._module, cmd, json_fmt=True, fail_on_error=False)
Beispiel #19
0
 def _get_wjh_config(self):
     return show_cmd(self._module,
                     "show running-config | include .*what-just-happened.*",
                     json_fmt=False,
                     fail_on_error=False)
 def _show_igmp_snooping_groups_config(self, multicast_ip_address):
     cmd = ("show ip igmp snooping groups vlan %d group %s" %
            (self._required_config['vlan_id'], multicast_ip_address))
     return show_cmd(self._module, cmd, json_fmt=True, fail_on_error=False)
 def _show_hosts_config(self):
     cmd = "show snmp host"
     return show_cmd(self._module, cmd, json_fmt=True, fail_on_error=False)
Beispiel #22
0
 def _show_bfd_config(self):
     cmd = "show running-config | include bfd"
     return show_cmd(self._module, cmd, json_fmt=True, fail_on_error=False)
 def _get_ospf_interfaces_config(self, ospf_id):
     cmd = 'show ip ospf interface %s brief' % ospf_id
     return show_cmd(self._module, cmd, json_fmt=False, fail_on_error=False)
Beispiel #24
0
 def _show_interface_qos(self, if_type, interface):
     cmd = "show qos interface {0} {1}".format(if_type, interface)
     return show_cmd(self._module, cmd, json_fmt=True, fail_on_error=False)
 def _get_ip_routing(self):
     return show_cmd(self._module,
                     'show ip routing | include "IP routing"',
                     json_fmt=False)
Beispiel #26
0
 def _show_cmd(self, cmd):
     return show_cmd(self.module, cmd, json_fmt=True)
 def _show_igmp_interfaces(self):
     cmd = "show ip igmp snooping interfaces"
     return show_cmd(self._module, cmd, json_fmt=True, fail_on_error=False)
Beispiel #28
0
 def _get_lldp_config(self):
     return show_cmd(self._module, self.SHOW_LLDP_CMD)
Beispiel #29
0
 def _get_vlan_config(self):
     return show_cmd(self._module, "show vlan")
Beispiel #30
0
 def _show_traffic_pool(self):
     cmd = "show traffic pool {0}".format(self._required_config.get("name"))
     return show_cmd(self._module, cmd, json_fmt=True, fail_on_error=False)