Example #1
0
    def test_parse_exploded_address(self):

        output = parse_exploded_address(self.ipv4_prefix)
        expected_output = '8.8.8.8'

        self.assertEqual(expected_output, output)

        output = parse_exploded_address(self.ipv6_prefix)
        expected_output = '2001::1'

        self.assertEqual(expected_output, output)
Example #2
0
    def show_ipv6_bgp_sum(self, cmd: str, prefix: str) -> Dict:
        """
        execute show ipv6 route command
        """
        prefix = parse_exploded_address(prefix)
        output = self.caller.run_command(self.ipv6_commands(cmd, prefix))

        return output
Example #3
0
    def show_ipv4_traceroute(self, cmd: str, prefix: str) -> Dict:
        """
        execute show ipv4 route command

        NOTE: api assumes that a dns resolver is enabled on the ios device, if
        it is not a timeout will occur.
        """
        prefix = parse_exploded_address(prefix)
        output = self.caller.run_command(self.ipv4_commands(cmd, prefix))

        return output