<commit_before>class ServiceTemplate < ApplicationRecord
  DEFAULT_PROCESS_DELAY_BETWEEN_GROUPS = 120

  GENERIC_ITEM_SUBTYPES = {
    "custom"          => _("Custom"),
    "vm"              => _("VM"),
    "playbook"        => _("Playbook"),
    "hosted_database" => _("Hosted Database"),
    "load_balancer"   => _("Load Balancer"),
    "storage"         => _("Storage")
  }.freeze

  CATALOG_ITEM_TYPES = {
    "amazon"                     => _("Amazon"),
    "azure"                      => _("Azure"),
    "generic"                    => _("Generic"),
    "generic_orchestration"      => _("Orchestration"),
    "generic_ansible_playbook"   => _("Ansible Playbook"),
    "generic_ansible_tower"      => _("AnsibleTower"),
    "generic_container_template" => _("OpenShift Template"),
    "google"                     => _("Google"),
    "microsoft"                  => _("SCVMM"),
    "openstack"                  => _("OpenStack"),
    "redhat"                     => _("RHEV"),
    "vmware"                     => _("VMware")
  }.freeze

  RESOURCE_ACTION_UPDATE_ATTRS = [:dialog,
                                  :dialog_id,
                                  :fqname,
                                  :configuration_template,
                                  :configuration_template_id,
                                  :configuration_template_type].freeze

  include CustomActionsMixin
  include ServiceMixin
  include OwnershipMixin
  include NewWithTypeStiMixin
  include TenancyMixin
  include_concern 'Filter'

  belongs_to :tenant
  # # These relationships are used to specify children spawned from a parent service
  # has_many   :child_services, :class_name => "ServiceTemplate", :foreign_key => :service_template_id
  # belongs_to :parent_service, :class_name => "ServiceTemplate", :foreign_key => :service_template_id

  # # These relationships are used for resources that are processed as part of the service
  # has_many   :vms_and_templates, :through => :service_resources, :source => :resource, :source_type => 'VmOrTemplate'
  has_many   :service_templates, :through => :service_resources, :source => :resource, :source_type => 'ServiceTemplate'
  has_many   :services

  has_one :picture, :dependent => :destroy, :as => :resource, :autosave => true
<commit_msg>Fix typo and update for RHEV name change (Take 2)<commit_after>class ServiceTemplate < ApplicationRecord
  DEFAULT_PROCESS_DELAY_BETWEEN_GROUPS = 120

  GENERIC_ITEM_SUBTYPES = {
    "custom"          => _("Custom"),
    "vm"              => _("Virtual Machine"),
    "playbook"        => _("Playbook"),
    "hosted_database" => _("Hosted Database"),
    "load_balancer"   => _("Load Balancer"),
    "storage"         => _("Storage")
  }.freeze

  CATALOG_ITEM_TYPES = {
    "amazon"                     => _("Amazon"),
    "azure"                      => _("Azure"),
    "generic"                    => _("Generic"),
    "generic_orchestration"      => _("Orchestration"),
    "generic_ansible_playbook"   => _("Ansible Playbook"),
    "generic_ansible_tower"      => _("Ansible Tower"),
    "generic_container_template" => _("OpenShift Template"),
    "google"                     => _("Google"),
    "microsoft"                  => _("SCVMM"),
    "openstack"                  => _("OpenStack"),
    "redhat"                     => _("Red Hat Virtualization"),
    "vmware"                     => _("VMware")
  }.freeze

  RESOURCE_ACTION_UPDATE_ATTRS = [:dialog,
                                  :dialog_id,
                                  :fqname,
                                  :configuration_template,
                                  :configuration_template_id,
                                  :configuration_template_type].freeze

  include CustomActionsMixin
  include ServiceMixin
  include OwnershipMixin
  include NewWithTypeStiMixin
  include TenancyMixin
  include_concern 'Filter'

  belongs_to :tenant
  # # These relationships are used to specify children spawned from a parent service
  # has_many   :child_services, :class_name => "ServiceTemplate", :foreign_key => :service_template_id
  # belongs_to :parent_service, :class_name => "ServiceTemplate", :foreign_key => :service_template_id

  # # These relationships are used for resources that are processed as part of the service
  # has_many   :vms_and_templates, :through => :service_resources, :source => :resource, :source_type => 'VmOrTemplate'
  has_many   :service_templates, :through => :service_resources, :source => :resource, :source_type => 'ServiceTemplate'
  has_many   :services

  has_one :picture, :dependent => :destroy, :as => :resource, :autosave => true

{'fraction_non_alphanumeric': 0.11757105943152454, 'fraction_numerical': 0.0015073212747631353, 'mean_word_length': 2.3513708513708513, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 65, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4600834', 'n_tokens_mistral': 1357, 'n_tokens_neox': 1300, 'n_words': 281}