def parse_node_info_token(token)
      node_info = NODE_REGEX.match(token)

      if node_info
        node_info = Hash[ node_info.names.zip( node_info.captures ) ]
      else
        raise BeakerHostGenerator::Exceptions::InvalidNodeSpecError.new,
              "Invalid node_info token: #{token}"
      end

      if node_info['arbitrary_roles']
        node_info['arbitrary_roles'] =
          node_info['arbitrary_roles'].split(',') || ''
      else
        # Default to empty list to avoid having to check for nil elsewhere
        node_info['arbitrary_roles'] = []
      end

      if node_info['host_settings']
        node_info['host_settings'] =
          settings_string_to_map(node_info['host_settings'])
      else
        node_info['host_settings'] = {}
      end

      return node_info
    end
def parse_node_info_token(token)
      node_info = NODE_REGEX.match(token)

      if node_info
        node_info = Hash[ node_info.names.zip( node_info.captures ) ]
      else
        raise BeakerHostGenerator::Exceptions::InvalidNodeSpecError.new,
              "Invalid node_info token: #{token}"
      end

      if node_info['arbitrary_roles']
        node_info['arbitrary_roles'] =
          node_info['arbitrary_roles'].split(',') || ''
      else
        # Default to empty list to avoid having to check for nil elsewhere
        node_info['arbitrary_roles'] = []
      end

      if node_info['host_settings']
        node_info['host_settings'] =
          settings_string_to_map(node_info['host_settings'])
      else
        node_info['host_settings'] = {}
      end

      return node_info
    end
Converts a string token that represents a node (and not an OS type) into
 a proper hash map with keys representing the various regex capture groups
 in `NODE_REGEX` and values being the captured text.

 Throws an exception if the token is not in the expected formatted, as
 determined by `NODE_REGEX.match`.

 It is expected that the `Generator` will have initimate knowledge about
 the keys and values in the returned map, as it may be adjusted and given
 to the hypervisors or other abstractions for processing.

 @param token [String] The portion of the user input layout specifiction
                       that describes the node (and not the OS platform).
                       For example `"64myrole.mdca"`.

 @returns [Hash{String=>Object}] A map containing the regex capture groups
                                 suitable for processing by the Generator
                                 and hypervisors.