<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?>

<!-- (C) 2011 OpenStack LLC., All Rights Reserved -->

<schema
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:identity="http://docs.openstack.org/identity/api/v2.0"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
    xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
    xmlns:atom="http://www.w3.org/2005/Atom"
    targetNamespace="http://docs.openstack.org/identity/api/v2.0"
>

    <!-- Import ATOM specific schema definitions -->
    <import vc:minVersion="1.1" namespace="http://www.w3.org/2005/Atom"
            schemaLocation="atom/atom.xsd" />

    <!-- Simple Types -->
    <simpleType name="ExtensibleServiceType">
        <annotation>
            <xsd:documentation
                xml:lang="EN"
                xmlns="http://www.w3.org/1999/xhtml">
                <p>
                    An extensible service type allows all of the
                    strings defined in <a href="#type_ServiceType"
                        title="See definition of
                        ServiceType">ServiceType</a> or an
                    alias prefixed status.
                </p>
            </xsd:documentation>
        </annotation>
        <union memberTypes="identity:ServiceType identity:ExtendedService"/>
    </simpleType>

    <simpleType name="ServiceType">
        <restriction base="xsd:string">
            <enumeration value="compute">
                <annotation>
                    <xsd:documentation
                        xml:lang="EN"
                        xmlns="http://www.w3.org/1999/xhtml">
                        <p>
                            The type for an OpenStack Compute API 1.1 compatible service.
                        </p>
                    </xsd:documentation>
                </annotation>
            </enumeration>
            <enumeration value="object-store">
                <annotation>
                    <xsd:documentation
                        xml:lang="EN"
                        xmlns="http://www.w3.org/1999/xhtml">
                        <p>
                            The type for a Swift-compatible service.
                        </p>
                    </xsd:documentation>
                </annotation>
            </enumeration>
            <enumeration value="image-service">
                <annotation>
                    <xsd:documentation
                        xml:lang="EN"
                        xmlns="http://www.w3.org/1999/xhtml">
                        <p>
                            The type for a Glance-compatible service
                        </p>
                    </xsd:documentation>
                </annotation>
            </enumeration>
            <enumeration value="identity">
                <annotation>
                    <xsd:documentation
                        xml:lang="EN"
                        xmlns="http://www.w3.org/1999/xhtml">
                        <p>
                            The type for a Keystone-compatible service.
                        </p>
                    </xsd:documentation>
                </annotation>
            </enumeration>
        </restriction>
    </simpleType>
    
    <simpleType name="ExtendedService">
        <annotation>
            <xsd:documentation
                xml:lang="EN"
                xmlns="http://www.w3.org/1999/xhtml">
                <p>
                    A non-core service type which must contain an extension prefix.
                </p>
            </xsd:documentation>
        </annotation>
        <restriction base="xsd:string">
            <pattern value="(\w|-)+:\w+"/>
        </restriction>
    </simpleType>
</schema>