<commit_before>module XClarityClient
  #
  # Exposes NodeManagement features
  #
  module Mixins::NodeMixin
    def discover_nodes(opts = {})
      node_management.fetch_all(opts)
    end

    def fetch_nodes(uuids = nil,
                    include_attributes = nil,
                    exclude_attributes = nil)
      node_management.get_object(
        uuids,
        include_attributes,
        exclude_attributes
      )
    end

    def blink_loc_led(uuid = '')
      node_management.set_loc_led_state(uuid, 'Blinking')
    end

    def turn_on_loc_led(uuid = '')
      node_management.set_loc_led_state(uuid, 'On')
    end

    def turn_off_loc_led(uuid = '')
      node_management.set_loc_led_state(uuid, 'Off')
    end

    def power_on_node(uuid = '')
      node_management.set_power_state(uuid, :powerOn)
    end

    def power_off_node(uuid = '')
      node_management.set_power_state(uuid, :powerOffSoftGraceful)
    end

    def power_off_node_now(uuid = '')
      node_management.set_power_state(uuid, :powerOff)
    end

    def power_restart_node(uuid = '')<commit_msg>Adding param for LED name on node LED actions<commit_after>module XClarityClient
  #
  # Exposes NodeManagement features
  #
  module Mixins::NodeMixin
    def discover_nodes(opts = {})
      node_management.fetch_all(opts)
    end

    def fetch_nodes(uuids = nil,
                    include_attributes = nil,
                    exclude_attributes = nil)
      node_management.get_object(
        uuids,
        include_attributes,
        exclude_attributes
      )
    end

    def blink_loc_led(uuid = '', name = 'Identify')
      node_management.set_loc_led_state(uuid, 'Blinking', name)
    end

    def turn_on_loc_led(uuid = '', name = 'Identify')
      node_management.set_loc_led_state(uuid, 'On', name)
    end

    def turn_off_loc_led(uuid = '', name = 'Identify')
      node_management.set_loc_led_state(uuid, 'Off', name)
    end

    def power_on_node(uuid = '')
      node_management.set_power_state(uuid, :powerOn)
    end

    def power_off_node(uuid = '')
      node_management.set_power_state(uuid, :powerOffSoftGraceful)
    end

    def power_off_node_now(uuid = '')
      node_management.set_power_state(uuid, :powerOff)
    end

    def power_restart_node(uuid = '')
{'fraction_non_alphanumeric': 0.09082931110136025, 'fraction_numerical': 0.0, 'mean_word_length': 2.831932773109244, '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': '3211738', 'n_tokens_mistral': 750, 'n_tokens_neox': 726, 'n_words': 127}