How to use the nox.lib.netinet.netinet.create_datapathid_from_host function in nox

To help you get started, we’ve selected a few nox examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github GlobalNOC / OESS / nox / src / nox / netapps / discovery / discovery.py View on Github external
def post_link_event(self, linktuple, action):
        e = Link_event(create_datapathid_from_host(linktuple[0]),
                      create_datapathid_from_host(linktuple[2]),
                      linktuple[1], linktuple[3], action)
        self.post(e)
github bigswitch / snac-nox / src / nox / apps / discovery / discovery.py View on Github external
def post_link_event(self, linktuple, action):
        e = Link_event(create_datapathid_from_host(linktuple[0]),
                      create_datapathid_from_host(linktuple[2]),
                      linktuple[1], linktuple[3], action)
        self.post(e)
github GlobalNOC / OESS / nox / src / nox / netapps / discovery / discovery.py View on Github external
def add_link(self, linktuple):            
        self.post_link_event(linktuple, Link_event.ADD)
        src_dpid = create_datapathid_from_host(linktuple[0])
        src_port = linktuple[1]
        dst_dpid = create_datapathid_from_host(linktuple[2])
        dst_port = linktuple[3]
        self._bindings.add_link(src_dpid,src_port,dst_dpid,dst_port)
        self._user_event_log.log("discovery",LogLevel.ALERT, 
            "Added network link between {sl} and {dl}",
            set_src_loc = (src_dpid,src_port), 
            set_dst_loc = (dst_dpid,dst_port))
github GlobalNOC / OESS / nox / src / nox / netapps / discovery / discovery.py View on Github external
def post_link_event(self, linktuple, action):
        e = Link_event(create_datapathid_from_host(linktuple[0]),
                      create_datapathid_from_host(linktuple[2]),
                      linktuple[1], linktuple[3], action)
        self.post(e)
github GlobalNOC / OESS / nox / src / nox / netapps / discovery / discovery.py View on Github external
def delete_links(self, deleteme):

        for linktuple in deleteme:                    
            del self.adjacency_list[linktuple]
            src_dpid = create_datapathid_from_host(linktuple[0])
            src_port = linktuple[1]
            dst_dpid = create_datapathid_from_host(linktuple[2])
            dst_port = linktuple[3]
            try:
                self._bindings.remove_link(src_dpid,src_port,dst_dpid,dst_port)
                self._user_event_log.log("discovery",LogLevel.ALERT, 
                  "Removed network link between {sl} and {dl}", 
                  set_src_loc = (src_dpid,src_port), 
                  set_dst_loc = (dst_dpid,dst_port)) 
            except Exception, e:        
              lg.error('Error removing links from binding storage')
                
            self.post_link_event(linktuple, Link_event.REMOVE)
github GlobalNOC / OESS / nox / src / nox / netapps / discovery / discovery.py View on Github external
def delete_links(self, deleteme):

        for linktuple in deleteme:                    
            del self.adjacency_list[linktuple]
            src_dpid = create_datapathid_from_host(linktuple[0])
            src_port = linktuple[1]
            dst_dpid = create_datapathid_from_host(linktuple[2])
            dst_port = linktuple[3]
            try:
                self._bindings.remove_link(src_dpid,src_port,dst_dpid,dst_port)
                self._user_event_log.log("discovery",LogLevel.ALERT, 
                  "Removed network link between {sl} and {dl}", 
                  set_src_loc = (src_dpid,src_port), 
                  set_dst_loc = (dst_dpid,dst_port)) 
            except Exception, e:        
              lg.error('Error removing links from binding storage')
                
            self.post_link_event(linktuple, Link_event.REMOVE)
github bigswitch / snac-nox / src / nox / apps / discovery / discovery.py View on Github external
def post_link_event(self, linktuple, action):
        e = Link_event(create_datapathid_from_host(linktuple[0]),
                      create_datapathid_from_host(linktuple[2]),
                      linktuple[1], linktuple[3], action)
        self.post(e)
github bigswitch / snac-nox / src / nox / apps / discovery / discovery.py View on Github external
def delete_links(self, deleteme):

        for linktuple in deleteme:                    
            del self.adjacency_list[linktuple]
            src_dpid = create_datapathid_from_host(linktuple[0])
            src_port = linktuple[1]
            dst_dpid = create_datapathid_from_host(linktuple[2])
            dst_port = linktuple[3]
            try:
                self._bindings.remove_link(src_dpid,src_port,dst_dpid,dst_port)
                self._user_event_log.log("discovery",LogLevel.ALERT, 
                  "Removed network link between {sl} and {dl}", 
                  set_src_loc = (src_dpid,src_port), 
                  set_dst_loc = (dst_dpid,dst_port)) 
            except Exception, e:        
              lg.error('Error removing links from binding storage')
                
            self.post_link_event(linktuple, Link_event.REMOVE)