original_docstring: Bind and unbind sub-ports of the parent port.
docstring: Bind and unbind sub-ports of the parent port.
docstring_tokens: Bind and unbind sub - ports of the parent port .
code: def added(self, parent_port, value):
          """Bind and unbind sub-ports of the parent port."""
          data = jsonutils.loads(value)
          LOG.debug('trunk watcher received add for parent_port %s '
                    'with data %s', parent_port, data)
          # Due to out-of-sequence etcd watch events during an agent restart,
          # we do not yet know at this point whether the parent port is setup.
          # So, we'll add it to the awaiting parents queue and reconsider it.
          subport_data = data['sub_ports']
          for subport in subport_data:
              subport['bound_callback'] = lambda *args: None
          self.data.subports_awaiting_parents[parent_port] = subport_data
          # reconsider awaiting sub_ports
          self.data.reconsider_trunk_subports()
code_tokens: def added ( self , parent_port , value ) : data = jsonutils . loads ( value ) LOG . debug ( 'trunk watcher received add for parent_port %s ' 'with data %s' , parent_port , data ) subport_data = data [ 'sub_ports' ] for subport in subport_data : subport [ 'bound_callback' ] = lambda * args : None self . data . subports_awaiting_parents [ parent_port ] = subport_data self . data . reconsider_trunk_subports ( )
short_docstring: Bind and unbind sub-ports of the parent port.
short_docstring_tokens: Bind and unbind sub - ports of the parent port .
comment: """Bind and unbind sub-ports of the parent port."""$SEP$# Due to out-of-sequence etcd watch events during an agent restart,$SEP$# we do not yet know at this point whether the parent port is setup.$SEP$# So, we'll add it to the awaiting parents queue and reconsider it.$SEP$# reconsider awaiting sub_ports