<commit_before>heat_template_version: rocky

description: >
  OpenStack containerized Swift Storage services.

parameters:
  DockerSwiftProxyImage:
    description: image
    type: string
  DockerSwiftAccountImage:
    description: image
    type: string
  DockerSwiftContainerImage:
    description: image
    type: string
  DockerSwiftObjectImage:
    description: image
    type: string
  DockerSwiftConfigImage:
    description: The container image to use for the swift config_volume
    type: string
  EndpointMap:
    default: {}
    description: Mapping of service endpoint -> protocol. Typically set
                 via parameter_defaults in the resource registry.
    type: json
  DefaultPasswords:
    default: {}
    type: json
  RoleName:
    default: ''
    description: Role name on which the service is applied
    type: string
  RoleParameters:
    default: {}
    description: Parameters specific to the role
    type: json
  ServiceData:
    default: {}
    description: Dictionary packing service data
    type: json
  ServiceNetMap:
    default: {}
    description: Mapping of service_name -> network name. Typically set
                 via parameter_defaults in the resource registry.  This
                 mapping overrides those in ServiceNetMapDefaults.
    type: json
  SwiftRawDisks:
    default: {}
    description: 'A hash of additional raw devices to use as Swift backend (eg. {sdb: {}})'
    type: json
  SwiftReplicas:
    type: number
    default: 3
    description: How many replicas to use in the swift rings.
  SwiftUseLocalDir:
    default: true
    description: 'Use a local directory for Swift storage services when building rings'
    type: boolean
  UpgradeRemoveUnusedPackages:
    default: false
    description: Remove package if the service is being disabled during upgrade
    type: boolean

conditions:
  single_replica_mode: {equals: [{get_param: SwiftReplicas}, 1]}

resources:

  ContainersCommon:
    type: ./containers-common.yaml

  SwiftStorageBase:
    type: ../../puppet/services/swift-storage.yaml
    properties:
      EndpointMap: {get_param: EndpointMap}
      ServiceData: {get_param: ServiceData}
      ServiceNetMap: {get_param: ServiceNetMap}
      DefaultPasswords: {get_param: DefaultPasswords}
      RoleName: {get_param: RoleName}
      RoleParameters: {get_param: RoleParameters}

outputs:
  role_data:
    description: Role data for the swift storage services.
    value:
      service_name: {get_attr: [SwiftStorageBase, role_data, service_name]}
      config_settings:
        map_merge:
          - {get_attr: [SwiftStorageBase, role_data, config_settings]}
          # FIXME (cschwede): re-enable this once checks works inside containers
          - swift::storage::all::mount_check: false
      service_config_settings: {get_attr: [SwiftStorageBase, role_data, service_config_settings]}
      # BEGIN DOCKER SETTINGS
      puppet_config:
        config_volume: swift
        puppet_tags: swift_config,swift_container_config,swift_container_sync_realms_config,swift_account_config,swift_object_config,swift_object_expirer_config,rsync::server
        step_config:
          list_join:
            - "\n"
            - - "class xinetd() {}"<commit_msg>Noop out xinetd::service<commit_after>heat_template_version: rocky

description: >
  OpenStack containerized Swift Storage services.

parameters:
  DockerSwiftProxyImage:
    description: image
    type: string
  DockerSwiftAccountImage:
    description: image
    type: string
  DockerSwiftContainerImage:
    description: image
    type: string
  DockerSwiftObjectImage:
    description: image
    type: string
  DockerSwiftConfigImage:
    description: The container image to use for the swift config_volume
    type: string
  EndpointMap:
    default: {}
    description: Mapping of service endpoint -> protocol. Typically set
                 via parameter_defaults in the resource registry.
    type: json
  DefaultPasswords:
    default: {}
    type: json
  RoleName:
    default: ''
    description: Role name on which the service is applied
    type: string
  RoleParameters:
    default: {}
    description: Parameters specific to the role
    type: json
  ServiceData:
    default: {}
    description: Dictionary packing service data
    type: json
  ServiceNetMap:
    default: {}
    description: Mapping of service_name -> network name. Typically set
                 via parameter_defaults in the resource registry.  This
                 mapping overrides those in ServiceNetMapDefaults.
    type: json
  SwiftRawDisks:
    default: {}
    description: 'A hash of additional raw devices to use as Swift backend (eg. {sdb: {}})'
    type: json
  SwiftReplicas:
    type: number
    default: 3
    description: How many replicas to use in the swift rings.
  SwiftUseLocalDir:
    default: true
    description: 'Use a local directory for Swift storage services when building rings'
    type: boolean
  UpgradeRemoveUnusedPackages:
    default: false
    description: Remove package if the service is being disabled during upgrade
    type: boolean

conditions:
  single_replica_mode: {equals: [{get_param: SwiftReplicas}, 1]}

resources:

  ContainersCommon:
    type: ./containers-common.yaml

  SwiftStorageBase:
    type: ../../puppet/services/swift-storage.yaml
    properties:
      EndpointMap: {get_param: EndpointMap}
      ServiceData: {get_param: ServiceData}
      ServiceNetMap: {get_param: ServiceNetMap}
      DefaultPasswords: {get_param: DefaultPasswords}
      RoleName: {get_param: RoleName}
      RoleParameters: {get_param: RoleParameters}

outputs:
  role_data:
    description: Role data for the swift storage services.
    value:
      service_name: {get_attr: [SwiftStorageBase, role_data, service_name]}
      config_settings:
        map_merge:
          - {get_attr: [SwiftStorageBase, role_data, config_settings]}
          # FIXME (cschwede): re-enable this once checks works inside containers
          - swift::storage::all::mount_check: false
      service_config_settings: {get_attr: [SwiftStorageBase, role_data, service_config_settings]}
      # BEGIN DOCKER SETTINGS
      puppet_config:
        config_volume: swift
        puppet_tags: swift_config,swift_container_config,swift_container_sync_realms_config,swift_account_config,swift_object_config,swift_object_expirer_config,rsync::server
        step_config:
          list_join:
            - "\n"
            - - "class xinetd() {}"
              - "define xinetd::service($bind='',$port='',$server='',$server_args='') {}"
{'fraction_non_alphanumeric': 0.07261632341723875, 'fraction_numerical': 0.0006102212051868803, 'mean_word_length': 3.273794002607562, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '5981915', 'n_tokens_mistral': 1858, 'n_tokens_neox': 1795, 'n_words': 542}