original_docstring:  Install this TAP into its namespace. This is not done from the
              startup() method but called at a later time when a userspace
              program (running on the host) has had a chance to open the socket
              end of the TAP.
          
docstring: Install this TAP into its namespace. This is not done from the
  startup() method but called at a later time when a userspace
  program (running on the host) has had a chance to open the socket
  end of the TAP.
docstring_tokens: Install this TAP into its namespace . This is not done from the startup () method but called at a later time when a userspace program ( running on the host ) has had a chance to open the socket end of the TAP .
code: def install(self):
          ''' Install this TAP into its namespace. This is not done from the
              startup() method but called at a later time when a userspace
              program (running on the host) has had a chance to open the socket
              end of the TAP.
          '''
          self.waitfordevicelocal()
          netns = str(self.node.pid)
          try:
              check_call([IP_BIN, "link", "set", self.localname, "netns", netns])
          except Exception, e:
              msg = "error installing TAP interface %s, command:" % self.localname
              msg += "ip link set %s netns %s" % (self.localname, netns)
              self.node.exception(coreapi.CORE_EXCP_LEVEL_ERROR, self.localname, msg)
              self.node.warn(msg)
              return
          self.node.cmd([IP_BIN, "link", "set", self.localname,
                         "name", self.name])
          self.node.cmd([IP_BIN, "link", "set", self.name,  "up"])
code_tokens: def install ( self ) : self . waitfordevicelocal ( ) netns = str ( self . node . pid ) try : check_call ( [ IP_BIN , "link" , "set" , self . localname , "netns" , netns ] ) except Exception , e : msg = "error installing TAP interface %s, command:" % self . localname msg += "ip link set %s netns %s" % ( self . localname , netns ) self . node . exception ( coreapi . CORE_EXCP_LEVEL_ERROR , self . localname , msg ) self . node . warn ( msg ) return self . node . cmd ( [ IP_BIN , "link" , "set" , self . localname , "name" , self . name ] ) self . node . cmd ( [ IP_BIN , "link" , "set" , self . name , "up" ] )
short_docstring: Install this TAP into its namespace.
short_docstring_tokens: Install this TAP into its namespace .
comment: ''' Install this TAP into its namespace. This is not done from the
              startup() method but called at a later time when a userspace
              program (running on the host) has had a chance to open the socket
              end of the TAP.
          '''