示例#1
0
  def getHostPort(self):
    """ Returns the port used by the component link on the host. """
    key = 'link-' + self.name + '-port'
    port = getComponentField(self.parent.name, key, 0)
    if not port:
      port = pickUnusedPort()
      setComponentField(self.parent.name, key, port)

    return port
示例#2
0
    def getHostPort(self):
        """ Returns the port used by the component link on the host. """
        key = 'link-' + self.name + '-port'
        port = getComponentField(self.parent.name, key, 0)
        if not port:
            port = pickUnusedPort()
            setComponentField(self.parent.name, key, port)

        return port