<commit_before>= Xen agent

Agent for manipulating Xen node.

Supported ontology:
  cirrocumulus-xen

= Actions
== Query free RAM
Request:
  <fipa-message ontology="cirrocumulus-xen" act="query-ref"><content>(free_memory)</content></fipa-message>
Reply:
  <fipa-message ontology="cirrocumulus-xen" act="inform"><content>(= "(free_memory)" (FREE_RAM_IN_MB))</content></fipa-message>

== Manipulate virtual disks
=== Check virtual disk state
Request:
  <fipa-message ontology="cirrocumulus-xen" act="query-ref"><content>(state (raid DISK_NUMBER))</content></fipa-message>
Reply if disk is active:
  <fipa-message ontology="cirrocumulus-xen" act="inform"><content>(= (state (raid DISK_NUMBER)) (active))</content></fipa-message>
Reply if disk is not active:
  <fipa-message ontology="cirrocumulus-xen" act="inform"><content>(= (state (raid DISK_NUMBER)) (stopped))</content></fipa-message>

=== Get visible AoE exports for virtual disk
Request:
  <fipa-message ontology="cirrocumulus-xen" act="query-ref"><content>(state (aoe DISK_NUMBER))</content></fipa-message>
Reply:
  <fipa-message ontology="cirrocumulus-xen" act="inform"><content>(= (state (aoe DISK_NUMBER)) (LIST OF VISIBLE AOE EXPORTS))</content></fipa-message>

List of visible AoE exports looks like:
  "e146.1" "e146.2"

=== Activate virtual disk
Request:
  <fipa-message ontology="cirrocumulus-xen" act="request"><content>(start (raid DISK_NUMBER))</content></fipa-message>

This will check AoE exports for selected disk number and assemble software raid from them.

Reply if success:
  <fipa-message ontology="cirrocumulus-xen" act="inform"><content>((start (raid DISK_NUMBER)) (finished))</content></fipa-message>
Reply if failure:
  <fipa-message ontology="cirrocumulus-xen" act="failure"><content>((start (raid DISK_NUMBER)) (REASON))</content></fipa-message>

== Deactivate virtual disk
Request:
  <fipa-message ontology="cirrocumulus-xen" act="request"><content>(stop (raid DISK_NUMBER))</content></fipa-message>

Reply if success:
  <fipa-message ontology="cirrocumulus-xen" act="inform"><content>((stop (raid DISK_NUMBER)) (finished))</content></fipa-message>
Reply if failure:
  <fipa-message ontology="cirrocumulus-xen" act="failure"><content>((stop (raid DISK_NUMBER)) (REASON))</content></fipa-message>

This will not stop AoE exports from storages.

== Manipulate virtual servers (domU)
=== Check if domU is running
Request:
  <fipa-message ontology="cirrocumulus-xen" act="query-if"><content>(running (domu "DOMU_NAME"))</content></fipa-message>
Reply if domU is running:
  <fipa-message ontology="cirrocumulus-xen" act="inform"><content>(running (domu "DOMU_NAME"))</content></fipa-message>
Reply if domU is not running:
  <fipa-message ontology="cirrocumulus-xen" act="inform"><content>(not (running (domu "DOMU_NAME")))</content></fipa-message>
<commit_msg>xen: README.rdoc<commit_after>= Xen agent

Agent for manipulating Xen node.

Supported ontology:
  cirrocumulus-xen

= Actions
== Query free RAM
Request:
  <fipa-message ontology="cirrocumulus-xen" act="query-ref"><content>(free_memory)</content></fipa-message>
Reply:
  <fipa-message ontology="cirrocumulus-xen" act="inform"><content>(= "(free_memory)" (FREE_RAM_IN_MB))</content></fipa-message>

== Manipulate virtual disks
=== Check virtual disk state
Request:
  <fipa-message ontology="cirrocumulus-xen" act="query-ref"><content>(state (raid DISK_NUMBER))</content></fipa-message>
Reply if disk is active:
  <fipa-message ontology="cirrocumulus-xen" act="inform"><content>(= (state (raid DISK_NUMBER)) (active))</content></fipa-message>
Reply if disk is not active:
  <fipa-message ontology="cirrocumulus-xen" act="inform"><content>(= (state (raid DISK_NUMBER)) (stopped))</content></fipa-message>

=== Get visible AoE exports for virtual disk
Request:
  <fipa-message ontology="cirrocumulus-xen" act="query-ref"><content>(state (aoe DISK_NUMBER))</content></fipa-message>
Reply:
  <fipa-message ontology="cirrocumulus-xen" act="inform"><content>(= (state (aoe DISK_NUMBER)) (LIST OF VISIBLE AOE EXPORTS))</content></fipa-message>

List of visible AoE exports looks like:
  "e146.1" "e146.2"

=== Activate virtual disk
Request:
  <fipa-message ontology="cirrocumulus-xen" act="request"><content>(start (raid DISK_NUMBER))</content></fipa-message>

This will check AoE exports for selected disk number and assemble software raid from them.

Reply if success:
  <fipa-message ontology="cirrocumulus-xen" act="inform"><content>((start (raid DISK_NUMBER)) (finished))</content></fipa-message>
Reply if failure:
  <fipa-message ontology="cirrocumulus-xen" act="failure"><content>((start (raid DISK_NUMBER)) (REASON))</content></fipa-message>

== Deactivate virtual disk
Request:
  <fipa-message ontology="cirrocumulus-xen" act="request"><content>(stop (raid DISK_NUMBER))</content></fipa-message>

Reply if success:
  <fipa-message ontology="cirrocumulus-xen" act="inform"><content>((stop (raid DISK_NUMBER)) (finished))</content></fipa-message>
Reply if failure:
  <fipa-message ontology="cirrocumulus-xen" act="failure"><content>((stop (raid DISK_NUMBER)) (REASON))</content></fipa-message>

This will not stop AoE exports from storages.

== Create virtual disk
Request:
  <fipa-message ontology="cirrocumulus-xen" act="request"><content>(start (raid (disk_number DISK_NUMBER) (size SIZE_IN_GIB)))</content></fipa-message>
Reply if success:
  <fipa-message ontology="cirrocumulus-xen" act="inform"><content>((start (raid (disk_number DISK_NUMBER) (size SIZE_IN_GIB))) (finished))</content></fipa-message>
Reply if failure:
  <fipa-message ontology="cirrocumulus-xen" act="failure"><content>((start (raid (disk_number DISK_NUMBER) (size SIZE_IN_GIB))) (REASON))</content></fipa-message>

This will:
 * contact storages
 * create block devices on each of them
 * export them to this node via AoE
 * create local RAID device

== Manipulate virtual servers (domU)
=== Check if domU is running
Request:
  <fipa-message ontology="cirrocumulus-xen" act="query-if"><content>(running (domu "DOMU_NAME"))</content></fipa-message>
Reply if domU is running:
  <fipa-message ontology="cirrocumulus-xen" act="inform"><content>(running (domu "DOMU_NAME"))</content></fipa-message>
Reply if domU is not running:
  <fipa-message ontology="cirrocumulus-xen" act="inform"><content>(not (running (domu "DOMU_NAME")))</content></fipa-message>

{'fraction_non_alphanumeric': 0.16339047019971695, 'fraction_numerical': 0.0025161188866173927, 'mean_word_length': 6.842170160295931, 'pattern_counts': {'":': 0, '<': 143, '<?xml version=': 0, '>': 143, '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': '1027062', 'n_tokens_mistral': 2170, 'n_tokens_neox': 2159, 'n_words': 481}