Esempio n. 1
0
    def xml(self):
        ''' parsing mechanism: xml

        Function xml() defines the xml type output parsing mechanism which
        typically contains 3 steps: executing, transforming, returning
        '''
        output = tcl.q.caas.abstract(device=self.device.handle,
                                     exec='show ip rip vrf all | xml')
        result = tcl.cast_any(output[1])

        return result
Esempio n. 2
0
    def cli(self):
        ''' parsing mechanism: cli

        Function cli() defines the cli type output parsing mechanism which
        typically contains 3 steps: executing, transforming, returning
        '''
        result = tcl.q.caas.abstract(device=self.device.handle,
                                     exec='show ip rip vrf all')

        #        # To leverage router_show parsers:
        #        result = tcl.q.router_show(device=device, cmd='show version')

        return tcl.cast_any(result[1])
Esempio n. 3
0
    def xml(self):
        ''' parsing mechanism: xml

        Function xml() defines the xml type output parsing mechanism which
        typically contains 3 steps: executing, transforming, returning
        '''
        output = tcl.q.caas.abstract(device=self.device.handle,
                                     exec='show ipv6 rip statistics | xml')
        result = tcl.cast_any(output[1])

        return result


# class ShowIpRipRouteVrfAll(MetaParser):
#     """ parser class - implements detail parsing mechanisms for cli, xml, and
#     yang output.
#     """
#     #*************************
#     # schema - class variable
#     #
#     # Purpose is to make sure the parser always return the output
#     # (nested dict) that has the same data structure across all supported
#     # parsing mechanisms (cli(), yang(), xml()).
#
#
#     def cli(self):
#         ''' parsing mechanism: cli
#
#         Function cli() defines the cli type output parsing mechanism which
#         typically contains 3 steps: executing, transforming, returning
#         '''
#         result = tcl.q.caas.abstract(device=self.device.handle,
#                                      exec='show ip rip route vrf all')
#
#         #        # To leverage router_show parsers:
#         #        result = tcl.q.router_show(device=device, cmd='show version')
#
#         return tcl.cast_any(result[1])
#
#     def xml(self):
#         ''' parsing mechanism: xml
#
#         Function xml() defines the xml type output parsing mechanism which
#         typically contains 3 steps: executing, transforming, returning
#         '''
#         output =  tcl.q.caas.abstract(device=self.device.handle,
#                                       exec='show ip rip route vrf all | xml')
#         result = tcl.cast_any(output[1])
#
#         return result
#
# class ShowIpv6RipRouteVrfAll(MetaParser):
#     """ parser class - implements detail parsing mechanisms for cli, xml, and
#     yang output.
#     """
#     #*************************
#     # schema - class variable
#     #
#     # Purpose is to make sure the parser always return the output
#     # (nested dict) that has the same data structure across all supported
#     # parsing mechanisms (cli(), yang(), xml()).
#
#
#     def cli(self):
#         ''' parsing mechanism: cli
#
#         Function cli() defines the cli type output parsing mechanism which
#         typically contains 3 steps: executing, transforming, returning
#         '''
#         result = tcl.q.caas.abstract(device=self.device.handle,
#                                      exec='show ipv6 rip route vrf all')
#
#         #        # To leverage router_show parsers:
#         #        result = tcl.q.router_show(device=device, cmd='show version')
#
#         return tcl.cast_any(result[1])
#
#     def xml(self):
#         ''' parsing mechanism: xml
#
#         Function xml() defines the xml type output parsing mechanism which
#         typically contains 3 steps: executing, transforming, returning
#         '''
#         output =  tcl.q.caas.abstract(device=self.device.handle,
#                                       exec='show ipv6 rip route vrf all | xml')
#         result = tcl.cast_any(output[1])
#
#         return result