<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0" xmlns:a="http://www.w3.org/2001/XMLSchema" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <include href="obs.rng"/>
  <start>
    <ref name="configuration-element"/>
  </start>
  <define ns="" name="configuration-element">
    <element name="configuration">
      <interleave>
        <element name="title">
          <a:documentation>
            short description of this OBS instance showed in the webui
          </a:documentation>
          <text/>
        </element>
        <element name="description">
          <a:documentation>
            long description of this OBS instance showed in the webui on the main page
          </a:documentation>
          <text/>
        </element>
        <optional>
          <element name="anonymous">
            <a:documentation>
              The webui (or other sites) can show the content of this OBS instance to not logged in users too.
            </a:documentation>
            <choice>
              <value>on</value>
              <value>off</value>
            </choice>
          </element>
        </optional>
        <optional>
          <element name="change_password">
            <a:documentation>
              Users can change their password. This may not work with proxy_auth mechanisms or external authentication mechanisms (formerly LDAP).
            </a:documentation>
            <choice>
              <value>on</value>
              <value>off</value>
            </choice>
          </element>
        </optional>
        <optional>
          <element name="disallow_group_creation">
            <a:documentation>
              Disallow group creation via the API. This is useful when groups are provided by external authentication mechanisms (fomerly LDAP).
            </a:documentation>
            <choice>
              <value>on</value>
              <value>off</value>
            </choice>
          </element>
        </optional>
        <optional>
          <element name="allow_user_to_create_home_project">
            <a:documentation>
              Users are allowed to create projects in their 'home:' namespace themselves.
            </a:documentation>
            <choice>
              <value>on</value>
              <value>off</value>
            </choice>
          </element>
        </optional>
        <optional>
          <element name="default_access_disabled">
            <a:documentation>
              Newly created projects have access disabled by default.
            </a:documentation>
            <choice>
              <value>on</value>
              <value>off</value>
            </choice>
          </element>
        </optional>
        <optional>
          <element name="registration">
            <a:documentation>
              New user can register themselves (allow) or they need approval after registration (confirmation) or accounts can only be created by the admin (deny).
            </a:documentation>
            <choice>
              <value>allow</value>
              <value>confirmation</value>
              <value>deny</value>
            </choice>
          </element>
        </optional>
        <optional>
          <element name="default_tracker">
            <a:documentation>
              Defines the default issue tracker to be used
            </a:documentation>
            <text/>
          </element>
        </optional>
        <optional>
          <element name="download_url">
            <a:documentation>
               Base URL of the published repositories.
               This url points to the root of the published repositories, all projects appear underneath it as follows: '$download_url/Foo:/Subproj:/repository_name'
            </a:documentation>
            <text/>
          </element>
        </optional>
        <optional>
          <element name="obs_url">
            <a:documentation>
              The URL to this OBS instances webui as seen from outside.
            </a:documentation>
            <text/>
          </element>
        </optional>
        <optional>
          <element name="api_url">
            <a:documentation>
              API URL to be used by services.
            </a:documentation>
            <text/>
          </element>
        </optional>
        <optional>
          <element name="http_proxy">
            <a:documentation>
              May be used if external hosts, like remote OBS instances, gravatar or to download from external sides
            </a:documentation>
            <text/>
          </element>
        </optional>
        <optional>
          <element name="no_proxy">
            <a:documentation>
              A filter that specifies URLs that should be excluded from proxying.

              This should be a coma separated list like the environment variable 'NO_PROXY', e.g.: NO_PROXY="*.foo.com,bar.org,.startup.io"
            </a:documentation>
            <text/>
          </element>
        </optional>
        <!-- backend stuff -->
        <optional>
          <element name="name">
            <a:documentation>
              This OBS instances' name. It is exposed as the '%DISTURL' macro when building rpms.
            </a:documentation>
            <text/>
          </element>
        </optional>
        <optional>
          <element name="download_on_demand">
            <a:documentation>
              EXPERIMENTAL: allows admins to use external package repositories in project repositories
            </a:documentation>
            <choice>
              <value>on</value>
              <value>off</value>
            </choice>
          </element>
        </optional>
        <optional>
          <element name="enforce_project_keys">
            <a:documentation>
              Always create a signing key when a project is created and no parent project has a key. Key removal is prohibited in that case.
            </a:documentation>
            <choice>
              <value>on</value>
              <value>off</value>
            </choice>
          </element>
        </optional>
        <optional>
          <element name="cleanup_empty_projects">
            <a:documentation>
              If the last package in a project is cleaned up via 'sourceupdate=cleanup', delete the whole project too?
            </a:documentation>
            <choice>
              <value>on</value>
              <value>off</value>
            </choice>
          </element>
        </optional>
        <optional>
          <element name="disable_publish_for_branches">
            <a:documentation>
              When a user creates a new project by branching a package, disable publishing for that project. The default is "on" to save disk space and bandwidth.
            </a:documentation>
            <choice>
              <value>on</value>
              <value>off</value>
            </choice>
          </element>
        </optional>
        <!-- webui only stuff -->
        <optional>
          <element name="ymp_url">
            <a:documentation>
              URL prefix for one-click installation files (software.opensuse.org)
            </a:documentation>
            <text/>
          </element>
        </optional>
        <optional>
          <element name="bugzilla_url">
            <a:documentation>
              Default bugzilla instance for reporting to bugowners
            </a:documentation>
            <text/>
          </element>
        </optional>
        <optional>
          <element name="tos_url">
            <a:documentation>
              URL to link to a Terms of Service page
            </a:documentation>
            <text/>
          </element>
        </optional>
        <optional>
          <element name="admin_email">
            <a:documentation>
              Email address to contact the admin of this OBS instance.
            </a:documentation>
            <text/>
          </element>
        </optional>
        <optional>
          <element name="theme">
            <a:documentation>
              The webui theme
            </a:documentation>
            <text/>
          </element>
        </optional>
        <optional>
          <element name="cleanup_after_days">
            <a:documentation>
              Enables delete requests for branched projects after given number of days.
            </a:documentation>
            <text/>
          </element>
        </optional>
        <optional>
          <element name="gravatar">
            <a:documentation>
              Load user's profile pictures from Gravatar.
            </a:documentation>
            <choice>
              <value>on</value>
              <value>off</value>
            </choice>
          </element>
        </optional>
        <optional>
          <element name="hide_private_options">
            <a:documentation>
              Do not show the options to hide projects or packages.
            </a:documentation>
            <choice>
              <value>on</value>
              <value>off</value>
            </choice>
          </element>
        </optional>
        <optional>
          <element name="unlisted_projects_filter">
            <a:documentation>
              Regular expression for projects that should be hidden (e.g.: '^home:.*').
            </a:documentation>
            <text/>
          </element>
        </optional>
        <optional>
          <element name="unlisted_projects_filter_description">
            <a:documentation>
              The description that will appear in the project list explaining the exclusion filter.
            </a:documentation>
            <text/>
          </element>
        </optional>
        <optional>
          <element name="code_of_conduct">
            <a:documentation>
              Code of Conduct. Text containing the content rules of this server.
            </a:documentation>
            <text/>
          </element>
        </optional>
        <a:documentation>
          Architectures for which this server can schedule builds.
        </a:documentation>
        <element name="schedulers">
          <zeroOrMore>
            <element name="arch">
              <ref name="build-arch"/>
            </element>
          </zeroOrMore>
        </element>
        <empty/>
      </interleave>
    </element>
  </define>
</grammar>
