示例#1
0
    def get_mpls_tables_ilm(self, req, **kwargs):
          
        print 'REST Service: GET MPLS node tables ILM'

        router_id = kwargs['ID']

        nhlfe = self.main_app.topo_controller.get_node_mpls_tables_ilm(router_id)

        if nhlfe is None:
            return Response(status=404)

        try:    
            body = body= listOfILMJSON(nhlfe)
            return Response(content_type='application/json', body=body)
        except Exception as e:
            return Response(status=500)
示例#2
0
    def get_topology_node_of(self, req, **kwargs):
          
        print 'REST Service: GET OF node table'

        dpid = kwargs['dpid']

        proxy = self.proxy
        of_table = proxy.get_topology_node_of_table(dpid)

        if of_table is None:
            return Response(status=404)

        try:    
            body= listOfILMJSON(of_table)
            return Response(content_type='application/json', body=body)
        except Exception as e:
            return Response(status=500)
示例#3
0
    def get_mpls_tables_ilm(self, req, **kwargs):
          
        print 'REST Service: GET MPLS node tables ILM'

        router_id = kwargs['ID']

        proxy = self.proxy
        nhlfe = proxy.get_node_mpls_tables_ilm(router_id)

        if nhlfe is None:
            return Response(status=404)

        try:    
            body = body= listOfILMJSON(nhlfe)
            return Response(content_type='application/json', body=body)
        except Exception as e:
            return Response(status=500)
示例#4
0
    def get_topology_node_of(self, req, **kwargs):

        print 'REST Service: GET OF node table'

        dpid = kwargs['dpid']

        proxy = self.proxy
        of_table = proxy.get_topology_node_of_table(dpid)

        if of_table is None:
            return Response(status=404)

        try:
            body = listOfILMJSON(of_table)
            return Response(content_type='application/json', body=body)
        except Exception as e:
            return Response(status=500)