<commit_before>require 'puppet/util/network_device/netapp'

class Puppet::Util::NetworkDevice::Netapp::Facts

  attr_reader :url, :transport
  def initialize(transport)
    @transport = transport
  end

  def retrieve(host)

    # Create empty hash
    @facts = {}

    # Invoke "system-get-version" to gather system version.
    result = @transport.invoke("system-get-version")

    return {} if result.attr_get("status") == "failed"
    # Pull out version
    sys_version = result.child_get_string("version")
    @facts['version'] = sys_version if sys_version

    if sys_clustered = result.child_get_string("is-clustered") and !sys_clustered.empty?
      Puppet.debug("Device is clustered.")
      @facts['clustered'] = sys_clustered
    end

    # cMode has differnt API's to 7Mode.<commit_msg>Modified to correctly determine whether filer is running on clustered of 7-mode.<commit_after>require 'puppet/util/network_device/netapp'

class Puppet::Util::NetworkDevice::Netapp::Facts

  attr_reader :url, :transport
  def initialize(transport)
    @transport = transport
  end

  def retrieve(host)

    # Create empty hash
    @facts = {}

    # Invoke "system-get-version" to gather system version.
    result = @transport.invoke("system-get-version")

    return {} if result.attr_get("status") == "failed"
    # Pull out version
    sys_version = result.child_get_string("version")
    @facts['version'] = sys_version if sys_version

    if sys_clustered == "true"
      Puppet.debug("Device is clustered.")
      @facts['clustered'] = sys_clustered
    end

    # cMode has differnt API's to 7Mode.
{'fraction_non_alphanumeric': 0.1146417445482866, 'fraction_numerical': 0.001869158878504673, 'mean_word_length': 3.8228228228228227, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2393673', 'n_tokens_mistral': 520, 'n_tokens_neox': 488, 'n_words': 120}