original_docstring: Parse a connects string.
  
          Parse a @connects tag string using the defined regular expression and add the elements
          to the internal data structure.
  
          @connects can be used to connect components in the threat model in order to manually
          build a Data Flow Diagram (DFD).
  
          For example:
  
              @connects @external:@user to @web:@server
              @connects @external:@user to @web:@server as tcp/80
  
          Args:
              connects: Connects string to parse.
              source: PTSSource instance for the @connects line.
  
          Returns:
              Nothing.
          
docstring: Parse a connects string.
  Parse a @connects tag string using the defined regular expression and add the elements
  to the internal data structure.
  
  @connects can be used to connect components in the threat model in order to manually
  build a Data Flow Diagram (DFD).
  
  For example.
  
  
docstring_tokens: Parse a connects string . Parse a @connects tag string using the defined regular expression and add the elements to the internal data structure . @connects can be used to connect components in the threat model in order to manually build a Data Flow Diagram ( DFD ) . For example .
code: def _parse_connects(self, connects, source):
          """Parse a connects string.
  
          Parse a @connects tag string using the defined regular expression and add the elements
          to the internal data structure.
  
          @connects can be used to connect components in the threat model in order to manually
          build a Data Flow Diagram (DFD).
  
          For example:
  
              @connects @external:@user to @web:@server
              @connects @external:@user to @web:@server as tcp/80
  
          Args:
              connects: Connects string to parse.
              source: PTSSource instance for the @connects line.
  
          Returns:
              Nothing.
          """
  
          match = re.findall(self.parse_patterns["connects"], connects, re.M | re.I)
          if match:
              source_boundary_id = text_to_identifier(remove_excessive_space(match[0][0]))
              source_component_id = text_to_identifier(remove_excessive_space(match[0][1]))
  
              if remove_excessive_space(match[0][2]) == "to":
                  connection_type = PTSDfdEdge.UNI_DIRECTIONAL
              else:
                  connection_type = PTSDfdEdge.BI_DIRECTIONAL
  
              dest_boundary_id = text_to_identifier(remove_excessive_space(match[0][3]))
              dest_component_id = text_to_identifier(remove_excessive_space(match[0][4]))
  
              if match[0][5]:
                  name = remove_excessive_space(match[0][5])
              else:
                  name = ""
  
              self.dfd.add_edge(PTSDfdEdge(source_boundary_id, source_component_id, dest_boundary_id, dest_component_id, connection_type, name, source))
          else:
              raise ValueError("@connects line contains an invalid pattern: {}".format(source))
code_tokens: def _parse_connects ( self , connects , source ) : match = re . findall ( self . parse_patterns [ "connects" ] , connects , re . M | re . I ) if match : source_boundary_id = text_to_identifier ( remove_excessive_space ( match [ 0 ] [ 0 ] ) ) source_component_id = text_to_identifier ( remove_excessive_space ( match [ 0 ] [ 1 ] ) ) if remove_excessive_space ( match [ 0 ] [ 2 ] ) == "to" : connection_type = PTSDfdEdge . UNI_DIRECTIONAL else : connection_type = PTSDfdEdge . BI_DIRECTIONAL dest_boundary_id = text_to_identifier ( remove_excessive_space ( match [ 0 ] [ 3 ] ) ) dest_component_id = text_to_identifier ( remove_excessive_space ( match [ 0 ] [ 4 ] ) ) if match [ 0 ] [ 5 ] : name = remove_excessive_space ( match [ 0 ] [ 5 ] ) else : name = "" self . dfd . add_edge ( PTSDfdEdge ( source_boundary_id , source_component_id , dest_boundary_id , dest_component_id , connection_type , name , source ) ) else : raise ValueError ( "@connects line contains an invalid pattern: {}" . format ( source ) )
short_docstring: Parse a connects string.
short_docstring_tokens: Parse a connects string .
comment: """Parse a connects string.
  
          Parse a @connects tag string using the defined regular expression and add the elements
          to the internal data structure.
  
          @connects can be used to connect components in the threat model in order to manually
          build a Data Flow Diagram (DFD).
  
          For example:
  
              @connects @external:@user to @web:@server
              @connects @external:@user to @web:@server as tcp/80
  
          Args:
              connects: Connects string to parse.
              source: PTSSource instance for the @connects line.
  
          Returns:
              Nothing.
          """