<commit_before>require 'fog/core'

module Fog
  module Compute
    class XenServer < Fog::Service
      autoload :Models, 'fog/compute/xen_server/models'
      autoload :Real, 'fog/compute/xen_server/real'
      autoload :Mock, 'fog/compute/xen_server/mock'

      requires :xenserver_username
      requires :xenserver_password
      requires :xenserver_url
      recognizes :xenserver_defaults
      recognizes :xenserver_timeout

      model_path 'fog/compute/xen_server/models'
      model :blob
      collection :blobs
      model :bond
      collection :bonds
      model :console
      collection :consoles
      model :crash_dump
      collection :crash_dumps
      model :dr_task
      collection :dr_tasks
      model :gpu_group
      collection :gpu_groups
      model :guest_metrics
      collection :guests_metrics
      model :host
      collection :hosts
      model :host_cpu
      collection :host_cpus
      model :host_crash_dump
      collection :host_crash_dumps
      model :host_metrics
      collection :hosts_metrics
      model :host_patch
      collection :host_patchs
      model :network
      collection :networks
      model :pbd
      collection :pbds
      model :pci
      collection :pcis
      model :pgpu
      collection :pgpus
      model :pif
      collection :pifs
      model :pif_metrics
      collection :pifs_metrics
      model :pool
      collection :pools
      model :pool_patch
      collection :pool_patchs
      model :role
      collection :roles
      model :server
      collection :servers
      model :server_appliance
      collection :server_appliances
      model :server_metrics
      collection :servers_metrics
      model :storage_manager
      collection :storage_managers
      model :storage_repository
      collection :storage_repositories
      model :tunnel
      collection :tunnels
      model :vbd
      collection :vbds
      model :vbd_metrics
      collection :vbds_metrics
      model :vdi
      collection :vdis
      model :vif
      collection :vifs
      model :vif_metrics
      collection :vifs_metrics
      model :vlan
      collection :vlans
      model :vmpp
      collection :vmpps
      model :vtpm
      collection :vtpms

      request_path 'fog/compute/xen_server/requests'
      # VM
      request :add_to_vcpus_params_live_server
      request :assert_agile_server
      request :assert_can_be_recovered_server
      request :assert_can_boot_here_server
      request :assert_can_migrate_server
      request :assert_operation_valid_server
      request :checkpoint_server
      request :clean_reboot_server
      request :clean_shutdown_server
      request :clone_server
      request :compute_memory_overhead_server
      request :copy_bios_strings_server
      request :copy_server
      request :create_new_blob_server
      request :forget_data_source_archives_server
      request :get_allowed_vbd_devices_server
      request :get_allowed_vif_devices_server
      request :get_boot_record_server
      request :get_data_sources_server
      request :get_possible_hosts_server
      request :hard_reboot_server
      request :hard_shutdown_server
      request :import_convert_server
      request :maximise_memory_server
      request :migrate_send_server
      request :pause_server
      request :pool_migrate_server<commit_msg>Add host requests<commit_after>require 'fog/core'

module Fog
  module Compute
    class XenServer < Fog::Service
      autoload :Models, 'fog/compute/xen_server/models'
      autoload :Real, 'fog/compute/xen_server/real'
      autoload :Mock, 'fog/compute/xen_server/mock'

      requires :xenserver_username
      requires :xenserver_password
      requires :xenserver_url
      recognizes :xenserver_defaults
      recognizes :xenserver_timeout

      model_path 'fog/compute/xen_server/models'
      model :blob
      collection :blobs
      model :bond
      collection :bonds
      model :console
      collection :consoles
      model :crash_dump
      collection :crash_dumps
      model :dr_task
      collection :dr_tasks
      model :gpu_group
      collection :gpu_groups
      model :guest_metrics
      collection :guests_metrics
      model :host
      collection :hosts
      model :host_cpu
      collection :host_cpus
      model :host_crash_dump
      collection :host_crash_dumps
      model :host_metrics
      collection :hosts_metrics
      model :host_patch
      collection :host_patchs
      model :network
      collection :networks
      model :pbd
      collection :pbds
      model :pci
      collection :pcis
      model :pgpu
      collection :pgpus
      model :pif
      collection :pifs
      model :pif_metrics
      collection :pifs_metrics
      model :pool
      collection :pools
      model :pool_patch
      collection :pool_patchs
      model :role
      collection :roles
      model :server
      collection :servers
      model :server_appliance
      collection :server_appliances
      model :server_metrics
      collection :servers_metrics
      model :storage_manager
      collection :storage_managers
      model :storage_repository
      collection :storage_repositories
      model :tunnel
      collection :tunnels
      model :vbd
      collection :vbds
      model :vbd_metrics
      collection :vbds_metrics
      model :vdi
      collection :vdis
      model :vif
      collection :vifs
      model :vif_metrics
      collection :vifs_metrics
      model :vlan
      collection :vlans
      model :vmpp
      collection :vmpps
      model :vtpm
      collection :vtpms

      request_path 'fog/compute/xen_server/requests'
      # host
      request :apply_edition_host
      request :assert_can_evacuate_host
      request :backup_rrds_host
      request :bugreport_upload_host
      request :call_plugin_host
      request :compute_free_memory_host
      request :compute_memory_overhead_host
      request :create_new_blob_host
      request :declare_dead_host
      request :destroy_host
      request :disable_external_auth_host
      request :disable_host
      request :disable_local_storage_caching_host
      request :dmesg_clear_host
      request :dmesg_host
      request :emergency_ha_disable_host
      request :enable_external_auth_host
      request :enable_host
      request :enable_local_storage_caching_host
      request :evacuate_host
      request :forget_data_source_archives_host
      request :get_data_sources_host
      request :get_log_host
      request :get_management_interface_host
      request :get_server_certificate_host
      request :get_server_localtime_host
      request :get_servertime_host
      request :get_system_status_capabilities_host
      request :get_vms_which_prevent_evacuation_host
      request :list_methods_host
      request :local_management_reconfigure_host
      request :management_disable_host
      request :management_reconfigure_host
      request :migrate_receive_host
      request :power_on_host
      request :query_data_source_host
      request :reboot_host
      request :record_data_source_host
      request :refresh_pack_info_host
      request :reset_cpu_features_host
      request :restart_agent_host
      request :send_debug_keys_host
      request :set_cpu_features_host
      request :set_hostname_live_host
      request :set_power_on_mode_host
      request :shutdown_agent_host
      request :shutdown_host
      request :sync_data_host
      
      # VM
      request :add_to_vcpus_params_live_server
      request :assert_agile_server
      request :assert_can_be_recovered_server
      request :assert_can_boot_here_server
      request :assert_can_migrate_server
      request :assert_operation_valid_server
      request :checkpoint_server
      request :clean_reboot_server
      request :clean_shutdown_server
      request :clone_server
      request :compute_memory_overhead_server
      request :copy_bios_strings_server
      request :copy_server
      request :create_new_blob_server
      request :forget_data_source_archives_server
      request :get_allowed_vbd_devices_server
      request :get_allowed_vif_devices_server
      request :get_boot_record_server
      request :get_data_sources_server
      request :get_possible_hosts_server
      request :hard_reboot_server
      request :hard_shutdown_server
      request :import_convert_server
      request :maximise_memory_server
      request :migrate_send_server
      request :pause_server
      request :pool_migrate_server
{'fraction_non_alphanumeric': 0.03950937610567284, 'fraction_numerical': 0.0, 'mean_word_length': 2.844061650045331, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6485671', 'n_tokens_mistral': 2449, 'n_tokens_neox': 2436, 'n_words': 552}