Added new Quantum API v2 book
Change-Id: I371663d36d06f257d0f42adade9b032f5d6908f3 Adding Quantum API v2 Dev Guide for first time Change-Id: I0fc3cf80fc6898c7d47f0afcc2bfa9fefb0bd171
This commit is contained in:
parent
72004f1984
commit
3fafe9ccf0
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
.DS_Store?
|
||||
.DS_Store
|
||||
target/
|
||||
|
BIN
doc/.DS_Store
vendored
Normal file
BIN
doc/.DS_Store
vendored
Normal file
Binary file not shown.
132
doc/pom.xml
132
doc/pom.xml
@ -7,7 +7,7 @@
|
||||
|
||||
<groupId>org.openstack.docs</groupId>
|
||||
<artifactId>openstack-guide</artifactId>
|
||||
<version>1.0</version>
|
||||
<version>2.0</version>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
<name>OpenStack Guides</name>
|
||||
@ -51,20 +51,30 @@
|
||||
<plugin>
|
||||
<groupId>com.rackspace.cloud.api</groupId>
|
||||
<artifactId>clouddocs-maven-plugin</artifactId>
|
||||
<version>1.2.0</version>
|
||||
<version>1.4.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>goal1</id>
|
||||
<id>goal1v2</id>
|
||||
<goals>
|
||||
<goal>generate-pdf</goal>
|
||||
</goals>
|
||||
<phase>generate-sources</phase>
|
||||
<configuration>
|
||||
<highlightSource>false</highlightSource>
|
||||
<!-- MORE -->
|
||||
<xincludeSupported>true</xincludeSupported>
|
||||
<sourceDirectory>src/docbkx</sourceDirectory>
|
||||
<includes>
|
||||
quantum-api-2.0/quantum-api-guide.xml
|
||||
</includes>
|
||||
<canonicalUrlBase>http://docs.openstack.org/api/openstack-network/2.0/content/</canonicalUrlBase>
|
||||
<profileSecurity>reviewer</profileSecurity>
|
||||
<branding>openstack</branding>
|
||||
<!-- MORE -->
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>goal2</id>
|
||||
<id>goal2v2</id>
|
||||
<goals>
|
||||
<goal>generate-webhelp</goal>
|
||||
</goals>
|
||||
@ -72,9 +82,107 @@
|
||||
<configuration>
|
||||
<!-- These parameters only apply to webhelp -->
|
||||
<enableDisqus>1</enableDisqus>
|
||||
<disqusShortname>openstackdocs</disqusShortname>
|
||||
<disqusShortname>os-quantum-guides</disqusShortname>
|
||||
<enableGoogleAnalytics>1</enableGoogleAnalytics>
|
||||
<googleAnalyticsId>UA-17511903-6</googleAnalyticsId>
|
||||
<!-- MORE -->
|
||||
<xincludeSupported>true</xincludeSupported>
|
||||
<sourceDirectory>src/docbkx</sourceDirectory>
|
||||
<includes>
|
||||
quantum-api-2.0/quantum-api-guide.xml
|
||||
</includes>
|
||||
<canonicalUrlBase>http://docs.openstack.org/api/openstack-network/2.0/content/</canonicalUrlBase>
|
||||
<profileSecurity>reviewer</profileSecurity>
|
||||
<branding>openstack</branding>
|
||||
<!-- MORE -->
|
||||
<generateToc>
|
||||
appendix toc,title
|
||||
article/appendix nop
|
||||
article toc,title
|
||||
book title,figure,table,example,equation
|
||||
chapter toc,title
|
||||
part toc,title
|
||||
preface toc,title
|
||||
qandadiv toc
|
||||
qandaset toc
|
||||
reference toc,title
|
||||
set toc,title
|
||||
</generateToc>
|
||||
<!-- The following elements sets the autonumbering of sections in output for chapter numbers but no numbered sections-->
|
||||
<sectionAutolabel>0</sectionAutolabel>
|
||||
<sectionLabelIncludesComponentLabel>0</sectionLabelIncludesComponentLabel>
|
||||
<postProcess>
|
||||
<!-- Copies the figures to the correct location for webhelp -->
|
||||
<copy todir="${basedir}/target/docbkx/webhelp/quantum-api-2.0/figures">
|
||||
<fileset dir="${basedir}/src/docbkx/quantum-api-2.0/figures">
|
||||
<include name="**/*.png" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<!-- New stuff -->
|
||||
<copy
|
||||
todir="${basedir}/target/docbkx/webhelp/api/openstack-network/2.0">
|
||||
<fileset
|
||||
dir="${basedir}/target/docbkx/webhelp/quantum-api-2.0/quantum-api-guide/">
|
||||
<include name="**/*" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<!--Moves PDFs to the needed placement -->
|
||||
<move failonerror="false"
|
||||
file="${basedir}/target/docbkx/pdf/quantum-api-2.0/quantum-api-guide.pdf"
|
||||
tofile="${basedir}/target/docbkx/webhelp/api/openstack-network/2.0/quantum-api-guide-2.0.pdf"/>
|
||||
|
||||
<!--Deletes leftover uneeded directories -->
|
||||
<delete
|
||||
dir="${basedir}/target/docbkx/webhelp/quantum-api-2.0"/>
|
||||
</postProcess>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<id>goal1v1</id>
|
||||
<goals>
|
||||
<goal>generate-pdf</goal>
|
||||
</goals>
|
||||
<phase>generate-sources</phase>
|
||||
<configuration>
|
||||
<highlightSource>false</highlightSource>
|
||||
<!-- MORE -->
|
||||
<xincludeSupported>true</xincludeSupported>
|
||||
<sourceDirectory>src/docbkx</sourceDirectory>
|
||||
<includes>
|
||||
quantum-api-1.0/quantum-api-guide.xml
|
||||
</includes>
|
||||
<canonicalUrlBase>http://docs.openstack.org/api/openstack-network/1.0/content/</canonicalUrlBase>
|
||||
<profileSecurity>reviewer</profileSecurity>
|
||||
<branding>openstack</branding>
|
||||
<!-- MORE -->
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>goal2v1</id>
|
||||
<goals>
|
||||
<goal>generate-webhelp</goal>
|
||||
</goals>
|
||||
<phase>generate-sources</phase>
|
||||
<configuration>
|
||||
<!-- These parameters only apply to webhelp -->
|
||||
<enableDisqus>1</enableDisqus>
|
||||
|
||||
<disqusShortname>os-quantum-guides</disqusShortname>
|
||||
|
||||
<enableGoogleAnalytics>1</enableGoogleAnalytics>
|
||||
<googleAnalyticsId>UA-17511903-6</googleAnalyticsId>
|
||||
<!-- MORE -->
|
||||
<xincludeSupported>true</xincludeSupported>
|
||||
<sourceDirectory>src/docbkx</sourceDirectory>
|
||||
<includes>
|
||||
quantum-api-1.0/quantum-api-guide.xml
|
||||
</includes>
|
||||
<canonicalUrlBase>http://docs.openstack.org/api/openstack-network/1.0/content/</canonicalUrlBase>
|
||||
<profileSecurity>reviewer</profileSecurity>
|
||||
<branding>openstack</branding>
|
||||
<!-- MORE -->
|
||||
<generateToc>
|
||||
appendix toc,title
|
||||
article/appendix nop
|
||||
@ -111,7 +219,7 @@
|
||||
<move failonerror="false"
|
||||
file="${basedir}/target/docbkx/pdf/quantum-api-1.0/quantum-api-guide.pdf"
|
||||
tofile="${basedir}/target/docbkx/webhelp/api/openstack-network/1.0/quantum-api-guide-1.0.pdf"/>
|
||||
|
||||
|
||||
<!--Deletes leftover uneeded directories -->
|
||||
<delete
|
||||
dir="${basedir}/target/docbkx/webhelp/quantum-api-1.0"/>
|
||||
@ -119,17 +227,19 @@
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<!-- These parameters apply to pdf and webhelp -->
|
||||
|
||||
<configuration>
|
||||
|
||||
|
||||
<xincludeSupported>true</xincludeSupported>
|
||||
<sourceDirectory>src/docbkx</sourceDirectory>
|
||||
<includes>
|
||||
quantum-api-1.0/quantum-api-guide.xml
|
||||
quantum-api-2.0/quantum-api-guide.xml
|
||||
</includes>
|
||||
<canonicalUrlBase>http://docs.openstack.org/api/openstack-network/1.0/content/</canonicalUrlBase>
|
||||
<canonicalUrlBase>http://docs.openstack.org/api/openstack-network/2.0/content/</canonicalUrlBase>
|
||||
<profileSecurity>reviewer</profileSecurity>
|
||||
<branding>openstack</branding>
|
||||
</configuration>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
|
BIN
doc/src/docbkx/.DS_Store
vendored
Normal file
BIN
doc/src/docbkx/.DS_Store
vendored
Normal file
Binary file not shown.
@ -71,6 +71,18 @@
|
||||
(<abbrev>API</abbrev>). </para>
|
||||
</abstract>
|
||||
<revhistory>
|
||||
<revision>
|
||||
<!-- ... continue addding more revisions here as you change this document using the markup shown below... -->
|
||||
<date>2012-08-08</date>
|
||||
<revdescription>
|
||||
<itemizedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>Corrected the titles of some
|
||||
examples.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</revdescription>
|
||||
</revision>
|
||||
<revision><!-- ... continue addding more revisions here as you change this document using the markup shown below... -->
|
||||
<date>2012-04-18</date>
|
||||
<revdescription>
|
||||
@ -345,57 +357,45 @@
|
||||
</para>
|
||||
</section>
|
||||
<section xml:id="Attachment"><title>Attachment</title>
|
||||
<para>
|
||||
An attachment represents an interface plugged into a logical
|
||||
port. At any time at most one attachment can be plugged into a
|
||||
given port.
|
||||
</para><para>
|
||||
An attachment typically identified a virtual network interface.
|
||||
Network interfaces are typically defined in an external services
|
||||
which uses Quantum, for instance the OpenStack Compute service,
|
||||
Nova.
|
||||
</para>
|
||||
<para>An attachment represents an interface plugged into a
|
||||
logical port. At any time at most one attachment can
|
||||
be plugged into a given port. </para><para>An attachment typically identified a virtual network interface.
|
||||
Network interfaces are typically defined in an
|
||||
external services which uses Quantum, for instance the
|
||||
OpenStack Compute service, Nova. </para>
|
||||
</section>
|
||||
</chapter>
|
||||
<chapter xml:id="General_API_Information-d1e436">
|
||||
<title>General API Information</title>
|
||||
<para>
|
||||
The OpenStack Quantum API is defined as a ReSTful HTTP
|
||||
<para>The OpenStack Quantum API is defined as a ReSTful HTTP
|
||||
service. The API takes advantage of all aspects of the
|
||||
HTTP protocol (methods, URIs, media types, response codes,
|
||||
etc.) and providers are free to use existing features of
|
||||
the protocol such as caching, persistent connections, and
|
||||
content compression among others. For example, providers
|
||||
content compression among others. For example, providers
|
||||
who employ a caching layer may respond with a 203 when a
|
||||
request is served from the cache instead of a 200.
|
||||
Additionally, providers may offer support for conditional
|
||||
&GET; requests using ETags, or they may send a redirect in
|
||||
response to a &GET; request. Clients should be written to
|
||||
account for these differences.
|
||||
</para>
|
||||
response to a &GET; request. Clients should be written to
|
||||
account for these differences. </para>
|
||||
<section xml:id="Authentication-d1e444">
|
||||
<title>Authentication</title>
|
||||
<para>
|
||||
The current version of the OpenStack Quantum service
|
||||
does not require that each request will include the credentials
|
||||
of the user submitting the request.
|
||||
</para><para>
|
||||
However, Quantum deployments can support several
|
||||
authentication schemes (OAuth, Basic Auth, Token). The
|
||||
authentication scheme used is determined by the
|
||||
provider of the Quantum service. Please contact
|
||||
your provider to determine the best way to
|
||||
authenticate against this API.
|
||||
</para><para>
|
||||
<para>The current version of the OpenStack Quantum service
|
||||
does not require that each request will include the
|
||||
credentials of the user submitting the request. </para><para>However, Quantum deployments can support several authentication
|
||||
schemes (OAuth, Basic Auth, Token). The authentication
|
||||
scheme used is determined by the provider of the
|
||||
Quantum service. Please contact your provider to
|
||||
determine the best way to authenticate against this
|
||||
API. </para><para>
|
||||
Ideally, middleware modules for Authentication and/or Authorization
|
||||
should be inserted in the first stages of the Quantum pipeline
|
||||
(available in <code>etc/quantum.conf</code>).
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Some authentication schemes may require that the
|
||||
API operate using SSL over HTTP (HTTPS).
|
||||
</para>
|
||||
<para>Some authentication schemes may require that the
|
||||
API operate using SSL over HTTP (HTTPS). </para>
|
||||
</note>
|
||||
</section>
|
||||
<?hard-pagebreak?>
|
||||
@ -667,12 +667,11 @@ Content-Type application/json
|
||||
</para></note>
|
||||
|
||||
<important>
|
||||
<para>
|
||||
Applications should be prepared to ignore response
|
||||
data that contains extension elements.
|
||||
<para>Applications should be prepared to ignore
|
||||
response data that contains extension elements.
|
||||
Applications should also verify that an extension
|
||||
is available before submitting an extended request.
|
||||
</para>
|
||||
is available before submitting an extended
|
||||
request. </para>
|
||||
</important>
|
||||
</section>
|
||||
<?hard-pagebreak?>
|
||||
@ -896,7 +895,8 @@ Content-Type application/json
|
||||
</para>
|
||||
<para>This operation does not require a request body.</para>
|
||||
<example>
|
||||
<title>Networks List Request/Response (XML)</title>
|
||||
<title>Networks List Details Request/Response
|
||||
(XML)</title>
|
||||
<para>Request:</para>
|
||||
<literallayout class="monospaced">GET /tenants/XYZ/networks/detail.xml </literallayout>
|
||||
<para>Response:</para>
|
||||
@ -905,7 +905,8 @@ Content-Type application/json
|
||||
</example>
|
||||
<?hard-pageb reak?>
|
||||
<example>
|
||||
<title>Networks List Request/Response (JSON)</title>
|
||||
<title>Networks List Details Request/Response
|
||||
(JSON)</title>
|
||||
<para>Request:</para>
|
||||
<literallayout class="monospaced">GET /tenants/XYZ/networks/detail.json</literallayout>
|
||||
<para>Response:</para>
|
||||
@ -1005,7 +1006,8 @@ Content-Type application/json
|
||||
</para>
|
||||
<para>This operation does not require a request body.</para>
|
||||
<example>
|
||||
<title>Show Network Detail Request/Response (XML)</title>
|
||||
<title>Show Network Details Request/Response
|
||||
(XML)</title>
|
||||
<para>Request:</para>
|
||||
<literallayout class="monospaced">GET /tenants/XYZ/networks/8bec1293-16bd-4568-ba75-1f58bec0b4c3/detail.xml </literallayout>
|
||||
<para>Response:</para>
|
||||
@ -1013,7 +1015,8 @@ Content-Type application/json
|
||||
</programlisting>
|
||||
</example>
|
||||
<example>
|
||||
<title>Show Network Detail Request/Response (JSON)</title>
|
||||
<title>Show Network Details Request/Response
|
||||
(JSON)</title>
|
||||
<para>Request:</para>
|
||||
<literallayout class="monospaced">GET /tenants/XYZ/networks/8bec1293-16bd-4568-ba75-1f58bec0b4c3/detail.json </literallayout>
|
||||
<para>Response:</para>
|
||||
@ -1140,7 +1143,7 @@ Content-Type application/json
|
||||
case the identifier in the request body will be ignored.
|
||||
</para>
|
||||
<example>
|
||||
<title>Update Network Request/Response (XML)</title>
|
||||
<title>Update Network Request (XML)</title>
|
||||
<para>Request:</para>
|
||||
<literallayout class="monospaced">PUT /tenants/XYZ/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1.xml </literallayout>
|
||||
<programlisting language="xml"><xi:include href="samples/network-post-req.xml" parse="text"/> </programlisting>
|
||||
@ -1149,7 +1152,7 @@ Content-Type application/json
|
||||
response body.</emphasis></para>
|
||||
</example>
|
||||
<example>
|
||||
<title>Update Network Request/Response (JSON)</title>
|
||||
<title>Update Network Request (JSON)</title>
|
||||
<para>Request:</para>
|
||||
<literallayout class="monospaced">PUT /tenants/XYZ/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1.json </literallayout>
|
||||
<programlisting language="json"><xi:include href="samples/network-post-req.json" parse="text"/> </programlisting>
|
||||
@ -1203,7 +1206,7 @@ Content-Type application/json
|
||||
<note><para>This operation cannot be undone. </para></note>
|
||||
<para>This operation does not require a request body. </para>
|
||||
<example>
|
||||
<title>Delete Network Request/Response (XML)</title>
|
||||
<title>Delete Network Request (XML)</title>
|
||||
<para>Request:</para>
|
||||
<literallayout class="monospaced">DELETE /tenants/XYZ/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1.xml </literallayout>
|
||||
<para>Response:</para>
|
||||
@ -1211,7 +1214,7 @@ Content-Type application/json
|
||||
response body.</emphasis></para>
|
||||
</example>
|
||||
<example>
|
||||
<title>Update Network Request/Response (JSON)</title>
|
||||
<title>Delete Network Request (JSON)</title>
|
||||
<para>Request:</para>
|
||||
<literallayout class="monospaced">DELETE /tenants/XYZ/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1.json </literallayout>
|
||||
<para>Response:</para>
|
||||
@ -1425,14 +1428,16 @@ Content-Type application/json
|
||||
return the identifier of the attachment as well. </para>
|
||||
<para>This operation does not require a request body.</para>
|
||||
<example>
|
||||
<title>Show Port Detail Request/Response (XML)</title>
|
||||
<title>Show Port Details Request/Response
|
||||
(XML)</title>
|
||||
<para>Request:</para>
|
||||
<literallayout class="monospaced">GET /tenants/33/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1/ports/98017ddc-efc8-4c25-a915-774b2a633855/detail.xml </literallayout>
|
||||
<para>Response:</para>
|
||||
<programlisting language="xml"><xi:include href="samples/port-get-detail-res.xml" parse="text"/> </programlisting>
|
||||
</example>
|
||||
<example>
|
||||
<title>Show Port Detail Request/Response (JSON)</title>
|
||||
<title>Show Port Details Request/Response
|
||||
(JSON)</title>
|
||||
<para>Request:</para>
|
||||
<literallayout class="monospaced">GET /tenants/33/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1/ports/98017ddc-efc8-4c25-a915-774b2a633855/detail.json </literallayout>
|
||||
<para>Response:</para>
|
||||
@ -1568,24 +1573,24 @@ Content-Type application/json
|
||||
the new administrative state for the port.
|
||||
</para>
|
||||
<example>
|
||||
<title>Set Port State Request/Response (XML)</title>
|
||||
<title>Update Port Request (XML)</title>
|
||||
<para>Request:</para>
|
||||
<literallayout class="monospaced">PUT tenants/33/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1/ports/98017ddc-efc8-4c25-a915-774b2a633855.xml </literallayout>
|
||||
<programlisting language="xml"><xi:include href="samples/port-post-req.xml" parse="text"/>
|
||||
</programlisting>
|
||||
<para>Response:</para>
|
||||
<para><emphasis>No data is returned in the response
|
||||
body..</emphasis></para>
|
||||
body.</emphasis></para>
|
||||
</example>
|
||||
<example>
|
||||
<title>Create Port Request/Response (JSON)</title>
|
||||
<title>Update Port Request (JSON)</title>
|
||||
<para>Request:</para>
|
||||
<literallayout class="monospaced">PUT tenants/33/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1/ports/98017ddc-efc8-4c25-a915-774b2a633855.json </literallayout>
|
||||
<programlisting language="json"><xi:include href="samples/port-post-req.json" parse="text"/>
|
||||
</programlisting>
|
||||
<para>Response:</para>
|
||||
<para><emphasis>No data is returned in the
|
||||
response body..</emphasis></para>
|
||||
response body.</emphasis></para>
|
||||
</example>
|
||||
</section>
|
||||
<section xml:id="Delete_Port">
|
||||
@ -1637,7 +1642,7 @@ Content-Type application/json
|
||||
This operation does not require a request body.
|
||||
</para>
|
||||
<example>
|
||||
<title>Delete Port State Request/Response (XML)</title>
|
||||
<title>Delete Port Request (XML)</title>
|
||||
<para>Request:</para>
|
||||
<literallayout class="monospaced">DELETE tenants/33/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1/ports/98017ddc-efc8-4c25-a915-774b2a633855.xml </literallayout>
|
||||
<para>Response:</para>
|
||||
@ -1645,7 +1650,7 @@ Content-Type application/json
|
||||
body..</emphasis></para>
|
||||
</example>
|
||||
<example>
|
||||
<title>Create Port Request/Response (JSON)</title>
|
||||
<title>Delete Port Request (JSON)</title>
|
||||
<para>Request:</para>
|
||||
<literallayout class="monospaced">DELETE tenants/33/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1/ports/98017ddc-efc8-4c25-a915-774b2a633855.json </literallayout>
|
||||
<para>Response:</para>
|
||||
@ -1704,7 +1709,8 @@ Content-Type application/json
|
||||
with no <code>id</code> attribute set. </para>
|
||||
<para>This operation does not require a request body.</para>
|
||||
<example>
|
||||
<title>Show Attachment (XML)</title>
|
||||
<title>Show Attachment Request/Response
|
||||
(XML)</title>
|
||||
<para>Request:</para>
|
||||
<literallayout class="monospaced">GET /tenants/XYZ/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1/ports/b832be00-6553-4f69-af33-acd554e36d08/attachment.xml </literallayout>
|
||||
<para>Response (attachment set):</para>
|
||||
@ -1715,7 +1721,8 @@ Content-Type application/json
|
||||
</programlisting>
|
||||
</example>
|
||||
<example>
|
||||
<title>Show Attachment (JSON)</title>
|
||||
<title>Show Attachment Request/Response
|
||||
(JSON)</title>
|
||||
<para>Request:</para>
|
||||
<literallayout class="monospaced">GET /tenants/XYZ/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1/ports/b832be00-6553-4f69-af33-acd554e36d08/attachment.json </literallayout>
|
||||
<para>Response (attachment set):</para>
|
||||
@ -1784,7 +1791,7 @@ Content-Type application/json
|
||||
to the attachment to plug into the port.
|
||||
</para>
|
||||
<example>
|
||||
<title>Plug Attachment (XML)</title>
|
||||
<title>Plug Attachment Request (XML)</title>
|
||||
<para>Request:</para>
|
||||
<literallayout class="monospaced">PUT /tenants/XYZ/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1/ports/b832be00-6553-4f69-af33-acd554e36d08/attachment.xml </literallayout>
|
||||
<programlisting language="xml"><xi:include href="samples/att-put-req.xml" parse="text"/> </programlisting>
|
||||
@ -1793,7 +1800,7 @@ Content-Type application/json
|
||||
in the response body.</emphasis></para>
|
||||
</example>
|
||||
<example>
|
||||
<title>Plug Attachment (JSON)</title>
|
||||
<title>Plug Attachment Request (JSON)</title>
|
||||
<para>Request:</para>
|
||||
<literallayout class="monospaced">PUT /tenants/XYZ/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1/ports/b832be00-6553-4f69-af33-acd554e36d08/attachment.json </literallayout>
|
||||
<programlisting language="xml"><xi:include href="samples/att-put-req.json" parse="text"/>
|
||||
@ -1804,7 +1811,7 @@ Content-Type application/json
|
||||
</example>
|
||||
</section>
|
||||
<section xml:id="Delete_Attachment">
|
||||
<title>Unplug Attachment from Port</title>
|
||||
<title>Delete Attachment from Port</title>
|
||||
<informaltable rules="all">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -1838,7 +1845,7 @@ Content-Type application/json
|
||||
operation has no effect. </para>
|
||||
<para>This operation does not require a request body. </para>
|
||||
<example>
|
||||
<title>Remove Attachment (XML)</title>
|
||||
<title>Delete Attachment Request (XML)</title>
|
||||
<para>Request:</para>
|
||||
<literallayout class="monospaced">DELETE /tenants/XYZ/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1/ports/b832be00-6553-4f69-af33-acd554e36d08/attachment.xml </literallayout>
|
||||
<para>Response:</para>
|
||||
@ -1846,7 +1853,7 @@ Content-Type application/json
|
||||
in the response body.</emphasis></para>
|
||||
</example>
|
||||
<example>
|
||||
<title>Remove Attachment (JSON)</title>
|
||||
<title>Delete Attachment Request (JSON)</title>
|
||||
<para>Request:</para>
|
||||
<literallayout class="monospaced">DELETE /tenants/XYZ/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1/ports/b832be00-6553-4f69-af33-acd554e36d08/attachment.json </literallayout>
|
||||
<para>Response:</para>
|
||||
|
BIN
doc/src/docbkx/quantum-api-2.0/.DS_Store
vendored
Normal file
BIN
doc/src/docbkx/quantum-api-2.0/.DS_Store
vendored
Normal file
Binary file not shown.
140
doc/src/docbkx/quantum-api-2.0/ch_preface.xml
Normal file
140
doc/src/docbkx/quantum-api-2.0/ch_preface.xml
Normal file
@ -0,0 +1,140 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE chapter [
|
||||
<!-- Some useful entities borrowed from HTML -->
|
||||
<!ENTITY ndash "–">
|
||||
<!ENTITY mdash "—">
|
||||
<!ENTITY hellip "…">
|
||||
<!ENTITY plusmn "±">
|
||||
|
||||
<!-- Useful for describing APIs -->
|
||||
<!ENTITY GET '<command xmlns="http://docbook.org/ns/docbook">GET</command>'>
|
||||
<!ENTITY PUT '<command xmlns="http://docbook.org/ns/docbook">PUT</command>'>
|
||||
<!ENTITY POST '<command xmlns="http://docbook.org/ns/docbook">POST</command>'>
|
||||
<!ENTITY DELETE '<command xmlns="http://docbook.org/ns/docbook">DELETE</command>'>
|
||||
|
||||
<!ENTITY CHECK '<inlinemediaobject xmlns="http://docbook.org/ns/docbook">
|
||||
<imageobject role="fo">
|
||||
<imagedata fileref="figures/Check_mark_23x20_02.svg"
|
||||
format="SVG" scale="60"/>
|
||||
</imageobject>
|
||||
<imageobject role="html">
|
||||
<imagedata fileref="../figures/Check_mark_23x20_02.png"
|
||||
format="PNG" />
|
||||
</imageobject>
|
||||
</inlinemediaobject>'>
|
||||
|
||||
<!ENTITY ARROW '<inlinemediaobject xmlns="http://docbook.org/ns/docbook">
|
||||
<imageobject role="fo">
|
||||
<imagedata fileref="figures/Arrow_east.svg"
|
||||
format="SVG" scale="60"/>
|
||||
</imageobject>
|
||||
<imageobject role="html">
|
||||
<imagedata fileref="../figures/Arrow_east.png"
|
||||
format="PNG" />
|
||||
</imageobject>
|
||||
</inlinemediaobject>'>
|
||||
<!ENTITY APIv2 'Quantum API v2.0'>
|
||||
]>
|
||||
<preface xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
|
||||
xml:id="ch_preface">
|
||||
<?dbhtml stop-chunking?>
|
||||
<title>Preface</title>
|
||||
<para>The Quantum project provides virtual networking services
|
||||
among devices managed by the <link
|
||||
xlink:href="http://wiki.openstack.org/OpenStack"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:m="http://www.w3.org/1998/Math/MathML"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns:db="http://docbook.org/ns/docbook">OpenStack</link>
|
||||
compute service. </para>
|
||||
<para>This document describes the features available with the
|
||||
&APIv2;.</para>
|
||||
<para>We welcome feedback, comments, and bug reports at <link
|
||||
xlink:href="http://bugs.launchpad.net/Quantum"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:m="http://www.w3.org/1998/Math/MathML"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns:db="http://docbook.org/ns/docbook"
|
||||
>bugs.launchpad.net/Quantum</link>. </para>
|
||||
<section xml:id="Intended_Audience-d1e85">
|
||||
<title>Intended Audience</title>
|
||||
<para xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:m="http://www.w3.org/1998/Math/MathML"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns:db="http://docbook.org/ns/docbook">This guide is for
|
||||
software developers who create applications by using the
|
||||
&APIv2;. To use this information, you should have a
|
||||
general understanding of the OpenStack Quantum network
|
||||
service, the OpenStack compute service, and the
|
||||
integration between the two. You should also have access
|
||||
to a plugin that implements the &APIv2;. </para>
|
||||
<para xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:m="http://www.w3.org/1998/Math/MathML"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns:db="http://docbook.org/ns/docbook">You should also
|
||||
be familiar with: </para>
|
||||
<itemizedlist spacing="compact"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:m="http://www.w3.org/1998/Math/MathML"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns:db="http://docbook.org/ns/docbook">
|
||||
<listitem>
|
||||
<para>ReSTful web services</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>HTTP/1.1</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>JSON and XML data serialization formats</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
<?hard-pagebreak?>
|
||||
<section xml:id="Document_Change_History-d1e118">
|
||||
<title>Document Change History</title>
|
||||
<para>This version of the document replaces and obsoletes all
|
||||
previous versions. The following table describes the most
|
||||
recent changes:</para>
|
||||
<?rax revhistory?>
|
||||
<!-- Table generated in output from revision element in the book element -->
|
||||
</section>
|
||||
<?hard-pagebreak?>
|
||||
<section xml:id="Additional_Resources-d1e346">
|
||||
<title>Resources</title>
|
||||
<para>Use the following resources in conjunction with this
|
||||
guide: <informaltable rules="all"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:m="http://www.w3.org/1998/Math/MathML"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns:db="http://docbook.org/ns/docbook">
|
||||
<col width="32%"/>
|
||||
<col width="68%"/>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Resource</th>
|
||||
<th>See</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<para>Related documents</para>
|
||||
</td>
|
||||
<td><link xlink:href="docs.openstack.org"
|
||||
>OpenStack Manuals</link></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para>OpenStack Quantum Wiki</para>
|
||||
</td>
|
||||
<td><link
|
||||
xlink:href="http://wiki.openstack.org/Quantum"
|
||||
>http://wiki.openstack.org/Quantum</link></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</informaltable></para>
|
||||
</section>
|
||||
|
||||
</preface>
|
112
doc/src/docbkx/quantum-api-2.0/common.ent
Normal file
112
doc/src/docbkx/quantum-api-2.0/common.ent
Normal file
@ -0,0 +1,112 @@
|
||||
|
||||
<!--
|
||||
A collection of common faults, these are pretty much expected
|
||||
in every request.
|
||||
-->
|
||||
<!ENTITY commonFaults
|
||||
'
|
||||
<response xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<representation mediaType="application/xml" element="osapi:computeFault"/>
|
||||
<representation mediaType="application/json"/>
|
||||
</response>
|
||||
<response status="503" xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<representation mediaType="application/xml" element="osapi:serviceUnavailable"/>
|
||||
<representation mediaType="applicaiton/json"/>
|
||||
</response>
|
||||
<response status="401" xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<representation mediaType="application/xml" element="osapi:unauthorized"/>
|
||||
<representation mediaType="applicaiton/json"/>
|
||||
</response>
|
||||
<response status="403" xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<representation mediaType="application/xml" element="osapi:forbidden"/>
|
||||
<representation mediaType="applicaiton/json"/>
|
||||
</response>
|
||||
<response status="400" xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<representation mediaType="application/xml" element="osapi:badRequest"/>
|
||||
<representation mediaType="applicaiton/json"/>
|
||||
</response>
|
||||
<response status="405" xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<representation mediaType="application/xml" element="osapi:badMethod"/>
|
||||
<representation mediaType="applicaiton/json"/>
|
||||
</response>
|
||||
<response status="413" xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<representation mediaType="application/xml" element="osapi:overLimit"/>
|
||||
<representation mediaType="applicaiton/json"/>
|
||||
</response>
|
||||
'>
|
||||
<!--
|
||||
Faults on GET
|
||||
-->
|
||||
<!ENTITY getFaults
|
||||
'
|
||||
<response status="404" xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<representation mediaType="application/xml" element="osapi:itemNotFound"/>
|
||||
<representation mediaType="applicaiton/json"/>
|
||||
</response>
|
||||
'>
|
||||
<!--
|
||||
Faults on POST/PUT
|
||||
-->
|
||||
<!ENTITY postPutFaults
|
||||
'
|
||||
<response status="415" xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<representation mediaType="application/xml" element="osapi:badMediaType"/>
|
||||
<representation mediaType="applicaiton/json"/>
|
||||
</response>
|
||||
'>
|
||||
<!--
|
||||
Faults that can occur when we are building servers or images.
|
||||
-->
|
||||
<!ENTITY buildFaults
|
||||
'
|
||||
<response status="503" xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<representation mediaType="application/xml" element="osapi:serverCapacityUnavailable"/>
|
||||
<representation mediaType="applicaiton/json"/>
|
||||
</response>
|
||||
'>
|
||||
<!--
|
||||
Holds build in progress which occurs when an operation fails
|
||||
because the server is in the process of being built.
|
||||
-->
|
||||
<!ENTITY inProgressFault
|
||||
'
|
||||
<response status="409" xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<representation mediaType="application/xml" element="osapi:buildInProgress"/>
|
||||
<representation mediaType="applicaiton/json"/>
|
||||
</response>
|
||||
'>
|
||||
|
||||
<!-- Image List Parameters -->
|
||||
|
||||
<!ENTITY imageListParameters
|
||||
'
|
||||
<param xmlns="http://wadl.dev.java.net/2009/02" name="changes-since" style="query" required="false" type="xsd:dateTime"/>
|
||||
<param xmlns="http://wadl.dev.java.net/2009/02" name="server" style="query" required="false" type="xsd:anyURI"/>
|
||||
<param xmlns="http://wadl.dev.java.net/2009/02" name="name" style="query" required="false" type="xsd:string"/>
|
||||
<param xmlns="http://wadl.dev.java.net/2009/02" name="status" style="query" required="false" type="osapi:ImageStatus"/>
|
||||
<param xmlns="http://wadl.dev.java.net/2009/02" name="type" style="query" required="false" type="xsd:string" default="ALL">
|
||||
<option value="BASE"/>
|
||||
<option value="SERVER"/>
|
||||
<option value="ALL"/>
|
||||
</param>
|
||||
'>
|
||||
|
||||
<!-- Server List Parameters -->
|
||||
|
||||
<!ENTITY serverListParameters
|
||||
'
|
||||
<param xmlns="http://wadl.dev.java.net/2009/02" name="changes-since" style="query" required="false" type="xsd:dateTime"/>
|
||||
<param xmlns="http://wadl.dev.java.net/2009/02" name="image" style="query" required="false" type="xsd:anyURI"/>
|
||||
<param xmlns="http://wadl.dev.java.net/2009/02" name="flavor" style="query" required="false" type="xsd:anyURI"/>
|
||||
<param xmlns="http://wadl.dev.java.net/2009/02" name="name" style="query" required="false" type="xsd:string"/>
|
||||
<param xmlns="http://wadl.dev.java.net/2009/02" name="status" style="query" required="false" type="osapi:ServerStatus"/>
|
||||
'>
|
||||
|
||||
<!-- Flavor List Parameters -->
|
||||
|
||||
<!ENTITY flavorListParameters
|
||||
'
|
||||
<param xmlns="http://wadl.dev.java.net/2009/02" name="changes-since" style="query" required="false" type="xsd:dateTime"/>
|
||||
<param xmlns="http://wadl.dev.java.net/2009/02" name="minDisk" style="query" required="false" type="xsd:int"/>
|
||||
<param xmlns="http://wadl.dev.java.net/2009/02" name="minRam" style="query" required="false" type="xsd:int"/>
|
||||
'>
|
BIN
doc/src/docbkx/quantum-api-2.0/figures/Arrow_east.png
Normal file
BIN
doc/src/docbkx/quantum-api-2.0/figures/Arrow_east.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 433 B |
70
doc/src/docbkx/quantum-api-2.0/figures/Arrow_east.svg
Normal file
70
doc/src/docbkx/quantum-api-2.0/figures/Arrow_east.svg
Normal file
@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg:svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.0"
|
||||
width="13.895596"
|
||||
height="6.3500013"
|
||||
viewBox="0 0 13.895595 6.3500013"
|
||||
id="svg2868"
|
||||
xml:space="preserve"
|
||||
inkscape:version="0.48.0 r9654"
|
||||
sodipodi:docname="Arrow_east.svg"><svg:metadata
|
||||
id="metadata3857"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></svg:metadata><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1131"
|
||||
inkscape:window-height="740"
|
||||
id="namedview3855"
|
||||
showgrid="false"
|
||||
inkscape:zoom="11.313708"
|
||||
inkscape:cx="8.6182271"
|
||||
inkscape:cy="-2.2709277"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg2868"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0" /><svg:defs
|
||||
id="defs2874" />
|
||||
|
||||
|
||||
<namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
pageopacity="0.0"
|
||||
pageshadow="2"
|
||||
window-width="640"
|
||||
window-height="541"
|
||||
zoom="0.34493828"
|
||||
cx="372.04722"
|
||||
cy="256.66814"
|
||||
window-x="75"
|
||||
window-y="152"
|
||||
current-layer="svg2033">
|
||||
</namedview>
|
||||
<svg:g
|
||||
transform="matrix(-0.01540104,0,0,-0.01741068,13.895596,6.3500014)"
|
||||
id="Ebene_1">
|
||||
<svg:polygon
|
||||
points="902.25049,222.98633 233.17773,222.98633 233.17773,364.71875 0,182.35938 233.17773,0 233.17773,141.73242 902.25049,141.73242 902.25049,222.98633 "
|
||||
id="path2050" />
|
||||
</svg:g>
|
||||
</svg:svg>
|
After Width: | Height: | Size: 2.1 KiB |
BIN
doc/src/docbkx/quantum-api-2.0/figures/Check_mark_23x20_02.png
Normal file
BIN
doc/src/docbkx/quantum-api-2.0/figures/Check_mark_23x20_02.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 651 B |
@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://web.resource.org/cc/"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="19.21315"
|
||||
height="18.294994"
|
||||
id="svg2"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.45"
|
||||
sodipodi:modified="true"
|
||||
version="1.0">
|
||||
<defs
|
||||
id="defs4" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
gridtolerance="10000"
|
||||
guidetolerance="10"
|
||||
objecttolerance="10"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="7.9195959"
|
||||
inkscape:cx="17.757032"
|
||||
inkscape:cy="7.298821"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:window-width="984"
|
||||
inkscape:window-height="852"
|
||||
inkscape:window-x="148"
|
||||
inkscape:window-y="66" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-192.905,-516.02064)">
|
||||
<path
|
||||
style="fill:#000000"
|
||||
d="M 197.67968,534.31563 C 197.40468,534.31208 196.21788,532.53719 195.04234,530.37143 L 192.905,526.43368 L 193.45901,525.87968 C 193.76371,525.57497 194.58269,525.32567 195.27896,525.32567 L 196.5449,525.32567 L 197.18129,527.33076 L 197.81768,529.33584 L 202.88215,523.79451 C 205.66761,520.74678 208.88522,517.75085 210.03239,517.13691 L 212.11815,516.02064 L 207.90871,520.80282 C 205.59351,523.43302 202.45735,527.55085 200.93947,529.95355 C 199.42159,532.35625 197.95468,534.31919 197.67968,534.31563 z "
|
||||
id="path2223" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
337
doc/src/docbkx/quantum-api-2.0/js/shjs/sh_java.js
Normal file
337
doc/src/docbkx/quantum-api-2.0/js/shjs/sh_java.js
Normal file
@ -0,0 +1,337 @@
|
||||
if (! this.sh_languages) {
|
||||
this.sh_languages = {};
|
||||
}
|
||||
sh_languages['java'] = [
|
||||
[
|
||||
[
|
||||
/\b(?:import|package)\b/g,
|
||||
'sh_preproc',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/\/\/\//g,
|
||||
'sh_comment',
|
||||
1
|
||||
],
|
||||
[
|
||||
/\/\//g,
|
||||
'sh_comment',
|
||||
7
|
||||
],
|
||||
[
|
||||
/\/\*\*/g,
|
||||
'sh_comment',
|
||||
8
|
||||
],
|
||||
[
|
||||
/\/\*/g,
|
||||
'sh_comment',
|
||||
9
|
||||
],
|
||||
[
|
||||
/\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,
|
||||
'sh_number',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/"/g,
|
||||
'sh_string',
|
||||
10
|
||||
],
|
||||
[
|
||||
/'/g,
|
||||
'sh_string',
|
||||
11
|
||||
],
|
||||
[
|
||||
/(\b(?:class|interface))([ \t]+)([$A-Za-z0-9_]+)/g,
|
||||
['sh_keyword', 'sh_normal', 'sh_classname'],
|
||||
-1
|
||||
],
|
||||
[
|
||||
/\b(?:abstract|assert|break|case|catch|class|const|continue|default|do|else|extends|false|final|finally|for|goto|if|implements|instanceof|interface|native|new|null|private|protected|public|return|static|strictfp|super|switch|synchronized|throw|throws|true|this|transient|try|volatile|while)\b/g,
|
||||
'sh_keyword',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/\b(?:int|byte|boolean|char|long|float|double|short|void)\b/g,
|
||||
'sh_type',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,
|
||||
'sh_symbol',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/\{|\}/g,
|
||||
'sh_cbracket',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/(?:[A-Za-z]|_)[A-Za-z0-9_]*(?=[ \t]*\()/g,
|
||||
'sh_function',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/([A-Za-z](?:[^`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\s]|[_])*)((?:<.*>)?)(\s+(?=[*&]*[A-Za-z][^`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\s]*\s*[`~!@#$%&*()_=+{}|;:",<.>\/?'\\[\]\^\-\[\]]+))/g,
|
||||
['sh_usertype', 'sh_usertype', 'sh_normal'],
|
||||
-1
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/$/g,
|
||||
null,
|
||||
-2
|
||||
],
|
||||
[
|
||||
/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,
|
||||
'sh_url',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/<\?xml/g,
|
||||
'sh_preproc',
|
||||
2,
|
||||
1
|
||||
],
|
||||
[
|
||||
/<!DOCTYPE/g,
|
||||
'sh_preproc',
|
||||
4,
|
||||
1
|
||||
],
|
||||
[
|
||||
/<!--/g,
|
||||
'sh_comment',
|
||||
5
|
||||
],
|
||||
[
|
||||
/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,
|
||||
'sh_keyword',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,
|
||||
'sh_keyword',
|
||||
6,
|
||||
1
|
||||
],
|
||||
[
|
||||
/&(?:[A-Za-z0-9]+);/g,
|
||||
'sh_preproc',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,
|
||||
'sh_keyword',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,
|
||||
'sh_keyword',
|
||||
6,
|
||||
1
|
||||
],
|
||||
[
|
||||
/@[A-Za-z]+/g,
|
||||
'sh_type',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/(?:TODO|FIXME|BUG)(?:[:]?)/g,
|
||||
'sh_todo',
|
||||
-1
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/\?>/g,
|
||||
'sh_preproc',
|
||||
-2
|
||||
],
|
||||
[
|
||||
/([^=" \t>]+)([ \t]*)(=?)/g,
|
||||
['sh_type', 'sh_normal', 'sh_symbol'],
|
||||
-1
|
||||
],
|
||||
[
|
||||
/"/g,
|
||||
'sh_string',
|
||||
3
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/\\(?:\\|")/g,
|
||||
null,
|
||||
-1
|
||||
],
|
||||
[
|
||||
/"/g,
|
||||
'sh_string',
|
||||
-2
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/>/g,
|
||||
'sh_preproc',
|
||||
-2
|
||||
],
|
||||
[
|
||||
/([^=" \t>]+)([ \t]*)(=?)/g,
|
||||
['sh_type', 'sh_normal', 'sh_symbol'],
|
||||
-1
|
||||
],
|
||||
[
|
||||
/"/g,
|
||||
'sh_string',
|
||||
3
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/-->/g,
|
||||
'sh_comment',
|
||||
-2
|
||||
],
|
||||
[
|
||||
/<!--/g,
|
||||
'sh_comment',
|
||||
5
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/(?:\/)?>/g,
|
||||
'sh_keyword',
|
||||
-2
|
||||
],
|
||||
[
|
||||
/([^=" \t>]+)([ \t]*)(=?)/g,
|
||||
['sh_type', 'sh_normal', 'sh_symbol'],
|
||||
-1
|
||||
],
|
||||
[
|
||||
/"/g,
|
||||
'sh_string',
|
||||
3
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/$/g,
|
||||
null,
|
||||
-2
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/\*\//g,
|
||||
'sh_comment',
|
||||
-2
|
||||
],
|
||||
[
|
||||
/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,
|
||||
'sh_url',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/<\?xml/g,
|
||||
'sh_preproc',
|
||||
2,
|
||||
1
|
||||
],
|
||||
[
|
||||
/<!DOCTYPE/g,
|
||||
'sh_preproc',
|
||||
4,
|
||||
1
|
||||
],
|
||||
[
|
||||
/<!--/g,
|
||||
'sh_comment',
|
||||
5
|
||||
],
|
||||
[
|
||||
/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,
|
||||
'sh_keyword',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,
|
||||
'sh_keyword',
|
||||
6,
|
||||
1
|
||||
],
|
||||
[
|
||||
/&(?:[A-Za-z0-9]+);/g,
|
||||
'sh_preproc',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,
|
||||
'sh_keyword',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,
|
||||
'sh_keyword',
|
||||
6,
|
||||
1
|
||||
],
|
||||
[
|
||||
/@[A-Za-z]+/g,
|
||||
'sh_type',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/(?:TODO|FIXME|BUG)(?:[:]?)/g,
|
||||
'sh_todo',
|
||||
-1
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/\*\//g,
|
||||
'sh_comment',
|
||||
-2
|
||||
],
|
||||
[
|
||||
/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,
|
||||
'sh_url',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/(?:TODO|FIXME|BUG)(?:[:]?)/g,
|
||||
'sh_todo',
|
||||
-1
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/"/g,
|
||||
'sh_string',
|
||||
-2
|
||||
],
|
||||
[
|
||||
/\\./g,
|
||||
'sh_specialchar',
|
||||
-1
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/'/g,
|
||||
'sh_string',
|
||||
-2
|
||||
],
|
||||
[
|
||||
/\\./g,
|
||||
'sh_specialchar',
|
||||
-1
|
||||
]
|
||||
]
|
||||
];
|
347
doc/src/docbkx/quantum-api-2.0/js/shjs/sh_javascript.js
Normal file
347
doc/src/docbkx/quantum-api-2.0/js/shjs/sh_javascript.js
Normal file
@ -0,0 +1,347 @@
|
||||
if (! this.sh_languages) {
|
||||
this.sh_languages = {};
|
||||
}
|
||||
sh_languages['javascript'] = [
|
||||
[
|
||||
[
|
||||
/\/\/\//g,
|
||||
'sh_comment',
|
||||
1
|
||||
],
|
||||
[
|
||||
/\/\//g,
|
||||
'sh_comment',
|
||||
7
|
||||
],
|
||||
[
|
||||
/\/\*\*/g,
|
||||
'sh_comment',
|
||||
8
|
||||
],
|
||||
[
|
||||
/\/\*/g,
|
||||
'sh_comment',
|
||||
9
|
||||
],
|
||||
[
|
||||
/\b(?:abstract|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|final|finally|for|function|goto|if|implements|in|instanceof|interface|native|new|null|private|protected|prototype|public|return|static|super|switch|synchronized|throw|throws|this|transient|true|try|typeof|var|volatile|while|with)\b/g,
|
||||
'sh_keyword',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/(\+\+|--|\)|\])(\s*)(\/=?(?![*\/]))/g,
|
||||
['sh_symbol', 'sh_normal', 'sh_symbol'],
|
||||
-1
|
||||
],
|
||||
[
|
||||
/(0x[A-Fa-f0-9]+|(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?)(\s*)(\/(?![*\/]))/g,
|
||||
['sh_number', 'sh_normal', 'sh_symbol'],
|
||||
-1
|
||||
],
|
||||
[
|
||||
/([A-Za-z$_][A-Za-z0-9$_]*\s*)(\/=?(?![*\/]))/g,
|
||||
['sh_normal', 'sh_symbol'],
|
||||
-1
|
||||
],
|
||||
[
|
||||
/\/(?:\\.|[^*\\\/])(?:\\.|[^\\\/])*\/[gim]*/g,
|
||||
'sh_regexp',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,
|
||||
'sh_number',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/"/g,
|
||||
'sh_string',
|
||||
10
|
||||
],
|
||||
[
|
||||
/'/g,
|
||||
'sh_string',
|
||||
11
|
||||
],
|
||||
[
|
||||
/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,
|
||||
'sh_symbol',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/\{|\}/g,
|
||||
'sh_cbracket',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/\b(?:Math|Infinity|NaN|undefined|arguments)\b/g,
|
||||
'sh_predef_var',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/\b(?:Array|Boolean|Date|Error|EvalError|Function|Number|Object|RangeError|ReferenceError|RegExp|String|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt)\b/g,
|
||||
'sh_predef_func',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/(?:[A-Za-z]|_)[A-Za-z0-9_]*(?=[ \t]*\()/g,
|
||||
'sh_function',
|
||||
-1
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/$/g,
|
||||
null,
|
||||
-2
|
||||
],
|
||||
[
|
||||
/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,
|
||||
'sh_url',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/<\?xml/g,
|
||||
'sh_preproc',
|
||||
2,
|
||||
1
|
||||
],
|
||||
[
|
||||
/<!DOCTYPE/g,
|
||||
'sh_preproc',
|
||||
4,
|
||||
1
|
||||
],
|
||||
[
|
||||
/<!--/g,
|
||||
'sh_comment',
|
||||
5
|
||||
],
|
||||
[
|
||||
/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,
|
||||
'sh_keyword',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,
|
||||
'sh_keyword',
|
||||
6,
|
||||
1
|
||||
],
|
||||
[
|
||||
/&(?:[A-Za-z0-9]+);/g,
|
||||
'sh_preproc',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,
|
||||
'sh_keyword',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,
|
||||
'sh_keyword',
|
||||
6,
|
||||
1
|
||||
],
|
||||
[
|
||||
/@[A-Za-z]+/g,
|
||||
'sh_type',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/(?:TODO|FIXME|BUG)(?:[:]?)/g,
|
||||
'sh_todo',
|
||||
-1
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/\?>/g,
|
||||
'sh_preproc',
|
||||
-2
|
||||
],
|
||||
[
|
||||
/([^=" \t>]+)([ \t]*)(=?)/g,
|
||||
['sh_type', 'sh_normal', 'sh_symbol'],
|
||||
-1
|
||||
],
|
||||
[
|
||||
/"/g,
|
||||
'sh_string',
|
||||
3
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/\\(?:\\|")/g,
|
||||
null,
|
||||
-1
|
||||
],
|
||||
[
|
||||
/"/g,
|
||||
'sh_string',
|
||||
-2
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/>/g,
|
||||
'sh_preproc',
|
||||
-2
|
||||
],
|
||||
[
|
||||
/([^=" \t>]+)([ \t]*)(=?)/g,
|
||||
['sh_type', 'sh_normal', 'sh_symbol'],
|
||||
-1
|
||||
],
|
||||
[
|
||||
/"/g,
|
||||
'sh_string',
|
||||
3
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/-->/g,
|
||||
'sh_comment',
|
||||
-2
|
||||
],
|
||||
[
|
||||
/<!--/g,
|
||||
'sh_comment',
|
||||
5
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/(?:\/)?>/g,
|
||||
'sh_keyword',
|
||||
-2
|
||||
],
|
||||
[
|
||||
/([^=" \t>]+)([ \t]*)(=?)/g,
|
||||
['sh_type', 'sh_normal', 'sh_symbol'],
|
||||
-1
|
||||
],
|
||||
[
|
||||
/"/g,
|
||||
'sh_string',
|
||||
3
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/$/g,
|
||||
null,
|
||||
-2
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/\*\//g,
|
||||
'sh_comment',
|
||||
-2
|
||||
],
|
||||
[
|
||||
/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,
|
||||
'sh_url',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/<\?xml/g,
|
||||
'sh_preproc',
|
||||
2,
|
||||
1
|
||||
],
|
||||
[
|
||||
/<!DOCTYPE/g,
|
||||
'sh_preproc',
|
||||
4,
|
||||
1
|
||||
],
|
||||
[
|
||||
/<!--/g,
|
||||
'sh_comment',
|
||||
5
|
||||
],
|
||||
[
|
||||
/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,
|
||||
'sh_keyword',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,
|
||||
'sh_keyword',
|
||||
6,
|
||||
1
|
||||
],
|
||||
[
|
||||
/&(?:[A-Za-z0-9]+);/g,
|
||||
'sh_preproc',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,
|
||||
'sh_keyword',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,
|
||||
'sh_keyword',
|
||||
6,
|
||||
1
|
||||
],
|
||||
[
|
||||
/@[A-Za-z]+/g,
|
||||
'sh_type',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/(?:TODO|FIXME|BUG)(?:[:]?)/g,
|
||||
'sh_todo',
|
||||
-1
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/\*\//g,
|
||||
'sh_comment',
|
||||
-2
|
||||
],
|
||||
[
|
||||
/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,
|
||||
'sh_url',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/(?:TODO|FIXME|BUG)(?:[:]?)/g,
|
||||
'sh_todo',
|
||||
-1
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/"/g,
|
||||
'sh_string',
|
||||
-2
|
||||
],
|
||||
[
|
||||
/\\./g,
|
||||
'sh_specialchar',
|
||||
-1
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/'/g,
|
||||
'sh_string',
|
||||
-2
|
||||
],
|
||||
[
|
||||
/\\./g,
|
||||
'sh_specialchar',
|
||||
-1
|
||||
]
|
||||
]
|
||||
];
|
538
doc/src/docbkx/quantum-api-2.0/js/shjs/sh_main.js
Normal file
538
doc/src/docbkx/quantum-api-2.0/js/shjs/sh_main.js
Normal file
@ -0,0 +1,538 @@
|
||||
/*
|
||||
SHJS - Syntax Highlighting in JavaScript
|
||||
Copyright (C) 2007, 2008 gnombat@users.sourceforge.net
|
||||
License: http://shjs.sourceforge.net/doc/gplv3.html
|
||||
*/
|
||||
|
||||
if (! this.sh_languages) {
|
||||
this.sh_languages = {};
|
||||
}
|
||||
var sh_requests = {};
|
||||
|
||||
function sh_isEmailAddress(url) {
|
||||
if (/^mailto:/.test(url)) {
|
||||
return false;
|
||||
}
|
||||
return url.indexOf('@') !== -1;
|
||||
}
|
||||
|
||||
function sh_setHref(tags, numTags, inputString) {
|
||||
var url = inputString.substring(tags[numTags - 2].pos, tags[numTags - 1].pos);
|
||||
if (url.length >= 2 && url.charAt(0) === '<' && url.charAt(url.length - 1) === '>') {
|
||||
url = url.substr(1, url.length - 2);
|
||||
}
|
||||
if (sh_isEmailAddress(url)) {
|
||||
url = 'mailto:' + url;
|
||||
}
|
||||
tags[numTags - 2].node.href = url;
|
||||
}
|
||||
|
||||
/*
|
||||
Konqueror has a bug where the regular expression /$/g will not match at the end
|
||||
of a line more than once:
|
||||
|
||||
var regex = /$/g;
|
||||
var match;
|
||||
|
||||
var line = '1234567890';
|
||||
regex.lastIndex = 10;
|
||||
match = regex.exec(line);
|
||||
|
||||
var line2 = 'abcde';
|
||||
regex.lastIndex = 5;
|
||||
match = regex.exec(line2); // fails
|
||||
*/
|
||||
function sh_konquerorExec(s) {
|
||||
var result = [''];
|
||||
result.index = s.length;
|
||||
result.input = s;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
Highlights all elements containing source code in a text string. The return
|
||||
value is an array of objects, each representing an HTML start or end tag. Each
|
||||
object has a property named pos, which is an integer representing the text
|
||||
offset of the tag. Every start tag also has a property named node, which is the
|
||||
DOM element started by the tag. End tags do not have this property.
|
||||
@param inputString a text string
|
||||
@param language a language definition object
|
||||
@return an array of tag objects
|
||||
*/
|
||||
function sh_highlightString(inputString, language) {
|
||||
if (/Konqueror/.test(navigator.userAgent)) {
|
||||
if (! language.konquered) {
|
||||
for (var s = 0; s < language.length; s++) {
|
||||
for (var p = 0; p < language[s].length; p++) {
|
||||
var r = language[s][p][0];
|
||||
if (r.source === '$') {
|
||||
r.exec = sh_konquerorExec;
|
||||
}
|
||||
}
|
||||
}
|
||||
language.konquered = true;
|
||||
}
|
||||
}
|
||||
|
||||
var a = document.createElement('a');
|
||||
var span = document.createElement('span');
|
||||
|
||||
// the result
|
||||
var tags = [];
|
||||
var numTags = 0;
|
||||
|
||||
// each element is a pattern object from language
|
||||
var patternStack = [];
|
||||
|
||||
// the current position within inputString
|
||||
var pos = 0;
|
||||
|
||||
// the name of the current style, or null if there is no current style
|
||||
var currentStyle = null;
|
||||
|
||||
var output = function(s, style) {
|
||||
var length = s.length;
|
||||
// this is more than just an optimization - we don't want to output empty <span></span> elements
|
||||
if (length === 0) {
|
||||
return;
|
||||
}
|
||||
if (! style) {
|
||||
var stackLength = patternStack.length;
|
||||
if (stackLength !== 0) {
|
||||
var pattern = patternStack[stackLength - 1];
|
||||
// check whether this is a state or an environment
|
||||
if (! pattern[3]) {
|
||||
// it's not a state - it's an environment; use the style for this environment
|
||||
style = pattern[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (currentStyle !== style) {
|
||||
if (currentStyle) {
|
||||
tags[numTags++] = {pos: pos};
|
||||
if (currentStyle === 'sh_url') {
|
||||
sh_setHref(tags, numTags, inputString);
|
||||
}
|
||||
}
|
||||
if (style) {
|
||||
var clone;
|
||||
if (style === 'sh_url') {
|
||||
clone = a.cloneNode(false);
|
||||
}
|
||||
else {
|
||||
clone = span.cloneNode(false);
|
||||
}
|
||||
clone.className = style;
|
||||
tags[numTags++] = {node: clone, pos: pos};
|
||||
}
|
||||
}
|
||||
pos += length;
|
||||
currentStyle = style;
|
||||
};
|
||||
|
||||
var endOfLinePattern = /\r\n|\r|\n/g;
|
||||
endOfLinePattern.lastIndex = 0;
|
||||
var inputStringLength = inputString.length;
|
||||
while (pos < inputStringLength) {
|
||||
var start = pos;
|
||||
var end;
|
||||
var startOfNextLine;
|
||||
var endOfLineMatch = endOfLinePattern.exec(inputString);
|
||||
if (endOfLineMatch === null) {
|
||||
end = inputStringLength;
|
||||
startOfNextLine = inputStringLength;
|
||||
}
|
||||
else {
|
||||
end = endOfLineMatch.index;
|
||||
startOfNextLine = endOfLinePattern.lastIndex;
|
||||
}
|
||||
|
||||
var line = inputString.substring(start, end);
|
||||
|
||||
var matchCache = [];
|
||||
for (;;) {
|
||||
var posWithinLine = pos - start;
|
||||
|
||||
var stateIndex;
|
||||
var stackLength = patternStack.length;
|
||||
if (stackLength === 0) {
|
||||
stateIndex = 0;
|
||||
}
|
||||
else {
|
||||
// get the next state
|
||||
stateIndex = patternStack[stackLength - 1][2];
|
||||
}
|
||||
|
||||
var state = language[stateIndex];
|
||||
var numPatterns = state.length;
|
||||
var mc = matchCache[stateIndex];
|
||||
if (! mc) {
|
||||
mc = matchCache[stateIndex] = [];
|
||||
}
|
||||
var bestMatch = null;
|
||||
var bestPatternIndex = -1;
|
||||
for (var i = 0; i < numPatterns; i++) {
|
||||
var match;
|
||||
if (i < mc.length && (mc[i] === null || posWithinLine <= mc[i].index)) {
|
||||
match = mc[i];
|
||||
}
|
||||
else {
|
||||
var regex = state[i][0];
|
||||
regex.lastIndex = posWithinLine;
|
||||
match = regex.exec(line);
|
||||
mc[i] = match;
|
||||
}
|
||||
if (match !== null && (bestMatch === null || match.index < bestMatch.index)) {
|
||||
bestMatch = match;
|
||||
bestPatternIndex = i;
|
||||
if (match.index === posWithinLine) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bestMatch === null) {
|
||||
output(line.substring(posWithinLine), null);
|
||||
break;
|
||||
}
|
||||
else {
|
||||
// got a match
|
||||
if (bestMatch.index > posWithinLine) {
|
||||
output(line.substring(posWithinLine, bestMatch.index), null);
|
||||
}
|
||||
|
||||
var pattern = state[bestPatternIndex];
|
||||
|
||||
var newStyle = pattern[1];
|
||||
var matchedString;
|
||||
if (newStyle instanceof Array) {
|
||||
for (var subexpression = 0; subexpression < newStyle.length; subexpression++) {
|
||||
matchedString = bestMatch[subexpression + 1];
|
||||
output(matchedString, newStyle[subexpression]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
matchedString = bestMatch[0];
|
||||
output(matchedString, newStyle);
|
||||
}
|
||||
|
||||
switch (pattern[2]) {
|
||||
case -1:
|
||||
// do nothing
|
||||
break;
|
||||
case -2:
|
||||
// exit
|
||||
patternStack.pop();
|
||||
break;
|
||||
case -3:
|
||||
// exitall
|
||||
patternStack.length = 0;
|
||||
break;
|
||||
default:
|
||||
// this was the start of a delimited pattern or a state/environment
|
||||
patternStack.push(pattern);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// end of the line
|
||||
if (currentStyle) {
|
||||
tags[numTags++] = {pos: pos};
|
||||
if (currentStyle === 'sh_url') {
|
||||
sh_setHref(tags, numTags, inputString);
|
||||
}
|
||||
currentStyle = null;
|
||||
}
|
||||
pos = startOfNextLine;
|
||||
}
|
||||
|
||||
return tags;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// DOM-dependent functions
|
||||
|
||||
function sh_getClasses(element) {
|
||||
var result = [];
|
||||
var htmlClass = element.className;
|
||||
if (htmlClass && htmlClass.length > 0) {
|
||||
var htmlClasses = htmlClass.split(' ');
|
||||
for (var i = 0; i < htmlClasses.length; i++) {
|
||||
if (htmlClasses[i].length > 0) {
|
||||
result.push(htmlClasses[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function sh_addClass(element, name) {
|
||||
var htmlClasses = sh_getClasses(element);
|
||||
for (var i = 0; i < htmlClasses.length; i++) {
|
||||
if (name.toLowerCase() === htmlClasses[i].toLowerCase()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
htmlClasses.push(name);
|
||||
element.className = htmlClasses.join(' ');
|
||||
}
|
||||
|
||||
/**
|
||||
Extracts the tags from an HTML DOM NodeList.
|
||||
@param nodeList a DOM NodeList
|
||||
@param result an object with text, tags and pos properties
|
||||
*/
|
||||
function sh_extractTagsFromNodeList(nodeList, result) {
|
||||
var length = nodeList.length;
|
||||
for (var i = 0; i < length; i++) {
|
||||
var node = nodeList.item(i);
|
||||
switch (node.nodeType) {
|
||||
case 1:
|
||||
if (node.nodeName.toLowerCase() === 'br') {
|
||||
var terminator;
|
||||
if (/MSIE/.test(navigator.userAgent)) {
|
||||
terminator = '\r';
|
||||
}
|
||||
else {
|
||||
terminator = '\n';
|
||||
}
|
||||
result.text.push(terminator);
|
||||
result.pos++;
|
||||
}
|
||||
else {
|
||||
result.tags.push({node: node.cloneNode(false), pos: result.pos});
|
||||
sh_extractTagsFromNodeList(node.childNodes, result);
|
||||
result.tags.push({pos: result.pos});
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
result.text.push(node.data);
|
||||
result.pos += node.length;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Extracts the tags from the text of an HTML element. The extracted tags will be
|
||||
returned as an array of tag objects. See sh_highlightString for the format of
|
||||
the tag objects.
|
||||
@param element a DOM element
|
||||
@param tags an empty array; the extracted tag objects will be returned in it
|
||||
@return the text of the element
|
||||
@see sh_highlightString
|
||||
*/
|
||||
function sh_extractTags(element, tags) {
|
||||
var result = {};
|
||||
result.text = [];
|
||||
result.tags = tags;
|
||||
result.pos = 0;
|
||||
sh_extractTagsFromNodeList(element.childNodes, result);
|
||||
return result.text.join('');
|
||||
}
|
||||
|
||||
/**
|
||||
Merges the original tags from an element with the tags produced by highlighting.
|
||||
@param originalTags an array containing the original tags
|
||||
@param highlightTags an array containing the highlighting tags - these must not overlap
|
||||
@result an array containing the merged tags
|
||||
*/
|
||||
function sh_mergeTags(originalTags, highlightTags) {
|
||||
var numOriginalTags = originalTags.length;
|
||||
if (numOriginalTags === 0) {
|
||||
return highlightTags;
|
||||
}
|
||||
|
||||
var numHighlightTags = highlightTags.length;
|
||||
if (numHighlightTags === 0) {
|
||||
return originalTags;
|
||||
}
|
||||
|
||||
var result = [];
|
||||
var originalIndex = 0;
|
||||
var highlightIndex = 0;
|
||||
|
||||
while (originalIndex < numOriginalTags && highlightIndex < numHighlightTags) {
|
||||
var originalTag = originalTags[originalIndex];
|
||||
var highlightTag = highlightTags[highlightIndex];
|
||||
|
||||
if (originalTag.pos <= highlightTag.pos) {
|
||||
result.push(originalTag);
|
||||
originalIndex++;
|
||||
}
|
||||
else {
|
||||
result.push(highlightTag);
|
||||
if (highlightTags[highlightIndex + 1].pos <= originalTag.pos) {
|
||||
highlightIndex++;
|
||||
result.push(highlightTags[highlightIndex]);
|
||||
highlightIndex++;
|
||||
}
|
||||
else {
|
||||
// new end tag
|
||||
result.push({pos: originalTag.pos});
|
||||
|
||||
// new start tag
|
||||
highlightTags[highlightIndex] = {node: highlightTag.node.cloneNode(false), pos: originalTag.pos};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while (originalIndex < numOriginalTags) {
|
||||
result.push(originalTags[originalIndex]);
|
||||
originalIndex++;
|
||||
}
|
||||
|
||||
while (highlightIndex < numHighlightTags) {
|
||||
result.push(highlightTags[highlightIndex]);
|
||||
highlightIndex++;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
Inserts tags into text.
|
||||
@param tags an array of tag objects
|
||||
@param text a string representing the text
|
||||
@return a DOM DocumentFragment representing the resulting HTML
|
||||
*/
|
||||
function sh_insertTags(tags, text) {
|
||||
var doc = document;
|
||||
|
||||
var result = document.createDocumentFragment();
|
||||
var tagIndex = 0;
|
||||
var numTags = tags.length;
|
||||
var textPos = 0;
|
||||
var textLength = text.length;
|
||||
var currentNode = result;
|
||||
|
||||
// output one tag or text node every iteration
|
||||
while (textPos < textLength || tagIndex < numTags) {
|
||||
var tag;
|
||||
var tagPos;
|
||||
if (tagIndex < numTags) {
|
||||
tag = tags[tagIndex];
|
||||
tagPos = tag.pos;
|
||||
}
|
||||
else {
|
||||
tagPos = textLength;
|
||||
}
|
||||
|
||||
if (tagPos <= textPos) {
|
||||
// output the tag
|
||||
if (tag.node) {
|
||||
// start tag
|
||||
var newNode = tag.node;
|
||||
currentNode.appendChild(newNode);
|
||||
currentNode = newNode;
|
||||
}
|
||||
else {
|
||||
// end tag
|
||||
currentNode = currentNode.parentNode;
|
||||
}
|
||||
tagIndex++;
|
||||
}
|
||||
else {
|
||||
// output text
|
||||
currentNode.appendChild(doc.createTextNode(text.substring(textPos, tagPos)));
|
||||
textPos = tagPos;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
Highlights an element containing source code. Upon completion of this function,
|
||||
the element will have been placed in the "sh_sourceCode" class.
|
||||
@param element a DOM <pre> element containing the source code to be highlighted
|
||||
@param language a language definition object
|
||||
*/
|
||||
function sh_highlightElement(element, language) {
|
||||
sh_addClass(element, 'sh_sourceCode');
|
||||
var originalTags = [];
|
||||
var inputString = sh_extractTags(element, originalTags);
|
||||
var highlightTags = sh_highlightString(inputString, language);
|
||||
var tags = sh_mergeTags(originalTags, highlightTags);
|
||||
var documentFragment = sh_insertTags(tags, inputString);
|
||||
while (element.hasChildNodes()) {
|
||||
element.removeChild(element.firstChild);
|
||||
}
|
||||
element.appendChild(documentFragment);
|
||||
}
|
||||
|
||||
function sh_getXMLHttpRequest() {
|
||||
if (window.ActiveXObject) {
|
||||
return new ActiveXObject('Msxml2.XMLHTTP');
|
||||
}
|
||||
else if (window.XMLHttpRequest) {
|
||||
return new XMLHttpRequest();
|
||||
}
|
||||
throw 'No XMLHttpRequest implementation available';
|
||||
}
|
||||
|
||||
function sh_load(language, element, prefix, suffix) {
|
||||
if (language in sh_requests) {
|
||||
sh_requests[language].push(element);
|
||||
return;
|
||||
}
|
||||
sh_requests[language] = [element];
|
||||
var request = sh_getXMLHttpRequest();
|
||||
var url = prefix + 'sh_' + language + suffix;
|
||||
request.open('GET', url, true);
|
||||
request.onreadystatechange = function () {
|
||||
if (request.readyState === 4) {
|
||||
try {
|
||||
if (! request.status || request.status === 200) {
|
||||
eval(request.responseText);
|
||||
var elements = sh_requests[language];
|
||||
for (var i = 0; i < elements.length; i++) {
|
||||
sh_highlightElement(elements[i], sh_languages[language]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
throw 'HTTP error: status ' + request.status;
|
||||
}
|
||||
}
|
||||
finally {
|
||||
request = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
request.send(null);
|
||||
}
|
||||
|
||||
/**
|
||||
Highlights all elements containing source code on the current page. Elements
|
||||
containing source code must be "pre" elements with a "class" attribute of
|
||||
"sh_LANGUAGE", where LANGUAGE is a valid language identifier; e.g., "sh_java"
|
||||
identifies the element as containing "java" language source code.
|
||||
*/
|
||||
function sh_highlightDocument(prefix, suffix) {
|
||||
var nodeList = document.getElementsByTagName('pre');
|
||||
for (var i = 0; i < nodeList.length; i++) {
|
||||
var element = nodeList.item(i);
|
||||
var htmlClasses = sh_getClasses(element);
|
||||
for (var j = 0; j < htmlClasses.length; j++) {
|
||||
var htmlClass = htmlClasses[j].toLowerCase();
|
||||
if (htmlClass === 'sh_sourcecode') {
|
||||
continue;
|
||||
}
|
||||
if (htmlClass.substr(0, 3) === 'sh_') {
|
||||
var language = htmlClass.substring(3);
|
||||
if (language in sh_languages) {
|
||||
sh_highlightElement(element, sh_languages[language]);
|
||||
}
|
||||
else if (typeof(prefix) === 'string' && typeof(suffix) === 'string') {
|
||||
sh_load(language, element, prefix, suffix);
|
||||
}
|
||||
else {
|
||||
throw 'Found <pre> element with class="' + htmlClass + '", but no such language exists';
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
115
doc/src/docbkx/quantum-api-2.0/js/shjs/sh_xml.js
Normal file
115
doc/src/docbkx/quantum-api-2.0/js/shjs/sh_xml.js
Normal file
@ -0,0 +1,115 @@
|
||||
if (! this.sh_languages) {
|
||||
this.sh_languages = {};
|
||||
}
|
||||
sh_languages['xml'] = [
|
||||
[
|
||||
[
|
||||
/<\?xml/g,
|
||||
'sh_preproc',
|
||||
1,
|
||||
1
|
||||
],
|
||||
[
|
||||
/<!DOCTYPE/g,
|
||||
'sh_preproc',
|
||||
3,
|
||||
1
|
||||
],
|
||||
[
|
||||
/<!--/g,
|
||||
'sh_comment',
|
||||
4
|
||||
],
|
||||
[
|
||||
/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,
|
||||
'sh_keyword',
|
||||
-1
|
||||
],
|
||||
[
|
||||
/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,
|
||||
'sh_keyword',
|
||||
5,
|
||||
1
|
||||
],
|
||||
[
|
||||
/&(?:[A-Za-z0-9]+);/g,
|
||||
'sh_preproc',
|
||||
-1
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/\?>/g,
|
||||
'sh_preproc',
|
||||
-2
|
||||
],
|
||||
[
|
||||
/([^=" \t>]+)([ \t]*)(=?)/g,
|
||||
['sh_type', 'sh_normal', 'sh_symbol'],
|
||||
-1
|
||||
],
|
||||
[
|
||||
/"/g,
|
||||
'sh_string',
|
||||
2
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/\\(?:\\|")/g,
|
||||
null,
|
||||
-1
|
||||
],
|
||||
[
|
||||
/"/g,
|
||||
'sh_string',
|
||||
-2
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/>/g,
|
||||
'sh_preproc',
|
||||
-2
|
||||
],
|
||||
[
|
||||
/([^=" \t>]+)([ \t]*)(=?)/g,
|
||||
['sh_type', 'sh_normal', 'sh_symbol'],
|
||||
-1
|
||||
],
|
||||
[
|
||||
/"/g,
|
||||
'sh_string',
|
||||
2
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/-->/g,
|
||||
'sh_comment',
|
||||
-2
|
||||
],
|
||||
[
|
||||
/<!--/g,
|
||||
'sh_comment',
|
||||
4
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
/(?:\/)?>/g,
|
||||
'sh_keyword',
|
||||
-2
|
||||
],
|
||||
[
|
||||
/([^=" \t>]+)([ \t]*)(=?)/g,
|
||||
['sh_type', 'sh_normal', 'sh_symbol'],
|
||||
-1
|
||||
],
|
||||
[
|
||||
/"/g,
|
||||
'sh_string',
|
||||
2
|
||||
]
|
||||
]
|
||||
];
|
184
doc/src/docbkx/quantum-api-2.0/js/trc/schema/controller.js
Normal file
184
doc/src/docbkx/quantum-api-2.0/js/trc/schema/controller.js
Normal file
@ -0,0 +1,184 @@
|
||||
/**
|
||||
controller.js
|
||||
|
||||
(C) 2009 Rackspace Hosting, All Rights Reserved
|
||||
|
||||
This file definas a single object in global scope:
|
||||
|
||||
trc.schema.controller
|
||||
|
||||
The controller object is responsible for displaying a menu that
|
||||
allows users to view schema source and jump to various definitions
|
||||
in the schema.
|
||||
**/
|
||||
|
||||
|
||||
//
|
||||
// Initialization code...
|
||||
//
|
||||
(function()
|
||||
{
|
||||
//
|
||||
// Make sure dependecies are defined in the global scope, throw
|
||||
// an error if they are not.
|
||||
//
|
||||
if ((!window.trc) ||
|
||||
(!trc.util))
|
||||
{
|
||||
throw new Error("Require trc/util.js to be loaded.");
|
||||
}
|
||||
|
||||
//
|
||||
// We use YUI to build our controller menu make sure we have the
|
||||
// proper dependecies loaded, call init when we do...
|
||||
//
|
||||
|
||||
function InitController()
|
||||
{
|
||||
trc.schema.controller._init();
|
||||
}
|
||||
|
||||
trc.util.yui.loadYUIDeps (["menu"], InitController);
|
||||
})();
|
||||
|
||||
|
||||
if (!trc.schema)
|
||||
{
|
||||
trc.schema = new Object();
|
||||
}
|
||||
|
||||
trc.schema.controller = {
|
||||
//
|
||||
// Internal and external links by type:
|
||||
//
|
||||
// type --> array of links
|
||||
//
|
||||
// possible types include: import, include, element,
|
||||
// attribute, complextype, simpleType
|
||||
//
|
||||
// each link contains the following properties:
|
||||
// name : the name of the link
|
||||
// href : the link itself
|
||||
// title : a description of the link
|
||||
links : new Object(),
|
||||
|
||||
//
|
||||
// A single link that points to the schema index document.
|
||||
//
|
||||
index : null,
|
||||
|
||||
//
|
||||
// Our initialization function
|
||||
//
|
||||
_init : function() {
|
||||
//
|
||||
// Load the menu...
|
||||
//
|
||||
var controllerDiv = document.getElementById("Controller");
|
||||
var mainMenu = this._menuMarkup("mainmenu");
|
||||
|
||||
for (var linkType in this.links)
|
||||
{
|
||||
var subItem = this._menuItemMarkup(mainMenu, linkType, "#", null);
|
||||
var subMenu = this._menuMarkup (linkType+"_subMenu");
|
||||
|
||||
var items = this.links[linkType];
|
||||
for (var i=0;i<items.length;i++)
|
||||
{
|
||||
this._menuItemMarkup (subMenu,
|
||||
items[i].name,
|
||||
items[i].href,
|
||||
items[i].title);
|
||||
}
|
||||
subItem.item.appendChild (subMenu.main);
|
||||
}
|
||||
|
||||
//
|
||||
// Toggle view source menu
|
||||
//
|
||||
this._menuItemMarkup (mainMenu, "toggle src view",
|
||||
"javascript:trc.schema.sampleManager.toggleSrcView()", null);
|
||||
|
||||
//
|
||||
// Index schema document
|
||||
//
|
||||
if (this.index != null)
|
||||
{
|
||||
this._menuItemMarkup (mainMenu, this.index.name,
|
||||
this.index.href, this.index.title);
|
||||
}
|
||||
|
||||
controllerDiv.appendChild (mainMenu.main);
|
||||
var oMenu = new YAHOO.widget.Menu("mainmenu", {position: "static"});
|
||||
oMenu.render();
|
||||
oMenu.show();
|
||||
},
|
||||
|
||||
//
|
||||
// Builds menu markup returns the associated divs in the
|
||||
// properties main, body, header, footer, and list
|
||||
//
|
||||
_menuMarkup : function(id /*Id for main part*/)
|
||||
{
|
||||
//
|
||||
// Build our menu div...
|
||||
//
|
||||
var mainDiv = document.createElement("div");
|
||||
var headerDiv = document.createElement("div");
|
||||
var bodyDiv = document.createElement("div");
|
||||
var footerDiv = document.createElement("div");
|
||||
var listDiv = document.createElement("ul");
|
||||
|
||||
mainDiv.setAttribute ("id", id);
|
||||
trc.util.dom.setClassName (mainDiv, "yuimenu");
|
||||
trc.util.dom.setClassName (headerDiv, "hd");
|
||||
trc.util.dom.setClassName (bodyDiv, "bd");
|
||||
trc.util.dom.setClassName (footerDiv, "ft");
|
||||
|
||||
mainDiv.appendChild (headerDiv);
|
||||
mainDiv.appendChild (bodyDiv);
|
||||
mainDiv.appendChild (footerDiv);
|
||||
bodyDiv.appendChild (listDiv);
|
||||
|
||||
return {
|
||||
main : mainDiv,
|
||||
body : bodyDiv,
|
||||
header : headerDiv,
|
||||
footer : footerDiv,
|
||||
list : listDiv
|
||||
};
|
||||
},
|
||||
|
||||
//
|
||||
// Adds a menu item to existing markup.
|
||||
//
|
||||
_menuItemMarkup : function (menu, /*Markup returned from _menuMarkup*/
|
||||
name, /* String, menu item name */
|
||||
href, /* String, menu item href */
|
||||
title /* String, title (tool tip)*/
|
||||
)
|
||||
{
|
||||
var listItem = document.createElement ("li");
|
||||
var link = document.createElement ("a");
|
||||
|
||||
trc.util.dom.setClassName (listItem, "yuimenuitem");
|
||||
trc.util.dom.setClassName (link, "yuimenuitemlabel");
|
||||
|
||||
link.setAttribute ("href", href);
|
||||
|
||||
if (title != null)
|
||||
{
|
||||
link.setAttribute ("title", title);
|
||||
}
|
||||
|
||||
link.appendChild (document.createTextNode(name));
|
||||
|
||||
listItem.appendChild (link);
|
||||
menu.list.appendChild(listItem);
|
||||
|
||||
return {
|
||||
item : listItem,
|
||||
anchor : link
|
||||
};
|
||||
}
|
||||
};
|
137
doc/src/docbkx/quantum-api-2.0/js/trc/schema/layoutManager.js
Normal file
137
doc/src/docbkx/quantum-api-2.0/js/trc/schema/layoutManager.js
Normal file
@ -0,0 +1,137 @@
|
||||
/**
|
||||
layoutManager.js
|
||||
|
||||
(C) 2009 Rackspace Hosting, All Rights Reserved
|
||||
|
||||
This file contains code that adjusts the layout of a schema
|
||||
document after a dom has been loaded. It does not modify the
|
||||
global scope.
|
||||
**/
|
||||
|
||||
(function()
|
||||
{
|
||||
//
|
||||
// Make sure dependecies are defined in the global scope, throw
|
||||
// an error if they are not.
|
||||
//
|
||||
if ((!window.trc) ||
|
||||
(!trc.util))
|
||||
{
|
||||
throw new Error("Require trc/util.js to be loaded.");
|
||||
}
|
||||
|
||||
//
|
||||
// This function should be called when the DOM is loaded so we
|
||||
// can get to work adjusting things.
|
||||
//
|
||||
function InitLayoutManager()
|
||||
{
|
||||
layoutManager._init();
|
||||
}
|
||||
trc.util.browser.addInitFunction (InitLayoutManager);
|
||||
|
||||
var layoutManager={
|
||||
//
|
||||
// Initialization function...
|
||||
//
|
||||
_init : function()
|
||||
{
|
||||
this._adjustMain();
|
||||
this._adjustSubElements();
|
||||
},
|
||||
|
||||
//
|
||||
// Applies appropriate styles to body and other main content
|
||||
// tags.
|
||||
//
|
||||
_adjustMain : function()
|
||||
{
|
||||
//
|
||||
// Change the class name for the correct YUI skin name.
|
||||
//
|
||||
var bodyTags = document.getElementsByTagName("body");
|
||||
if (bodyTags.length == 0)
|
||||
{
|
||||
throw new Error ("Couldn't find body element, bad DOM?");
|
||||
}
|
||||
else
|
||||
{
|
||||
trc.util.dom.setClassName(bodyTags[0], "yui-skin-sam");
|
||||
}
|
||||
|
||||
//
|
||||
// Setout the layout...
|
||||
//
|
||||
var docDiv = document.getElementById("doc");
|
||||
var mainDiv = document.getElementById("Main");
|
||||
|
||||
trc.util.dom.setClassName (docDiv, "yui-t1");
|
||||
docDiv.setAttribute ("id", "doc3");
|
||||
mainDiv.setAttribute ("id", "yui-main");
|
||||
|
||||
//
|
||||
// Old IE browser hacks...
|
||||
//
|
||||
switch (trc.util.browser.detectIEVersion())
|
||||
{
|
||||
//
|
||||
// IE 6 does not support fixed positioning. The
|
||||
// following is a little hack to get it to work.
|
||||
//
|
||||
//
|
||||
case 6:
|
||||
var controllerDiv = document.getElementById("Controller");
|
||||
controllerDiv.style.position="absolute";
|
||||
window.setInterval((function(){
|
||||
/* avoid leak by constantly querying for the
|
||||
* controller. */
|
||||
var ctrlDiv = document.getElementById("Controller");
|
||||
ctrlDiv.style.top = document.documentElement.scrollTop+10;
|
||||
}), 1000);
|
||||
break;
|
||||
|
||||
//
|
||||
// The controler doesn't work **at all** in IE 7
|
||||
// don't even show it.
|
||||
//
|
||||
case 7:
|
||||
var controllerDiv = document.getElementById("Controller");
|
||||
controllerDiv.style.display = "none";
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
//
|
||||
// Adds appropriate classes for subElements...
|
||||
//
|
||||
_adjustSubElements : function()
|
||||
{
|
||||
var divs = document.getElementsByTagName("div");
|
||||
for (var i=0;i<divs.length;i++)
|
||||
{
|
||||
var currentClass = divs[i].getAttribute ("class");
|
||||
var newClassName = currentClass;
|
||||
switch (currentClass)
|
||||
{
|
||||
case "SubItem" :
|
||||
newClassName += " yui-gd";
|
||||
break;
|
||||
case "SubItemProps" :
|
||||
newClassName += " yui-gd first";
|
||||
break;
|
||||
case "SubName" :
|
||||
newClassName += " yui-u first";
|
||||
break;
|
||||
case "SubAttributes" :
|
||||
case "SubDocumentation" :
|
||||
newClassName += " yui-u";
|
||||
break;
|
||||
}
|
||||
if (currentClass != newClassName)
|
||||
{
|
||||
trc.util.dom.setClassName (divs[i], newClassName);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
})();
|
342
doc/src/docbkx/quantum-api-2.0/js/trc/schema/sampleManager.js
Normal file
342
doc/src/docbkx/quantum-api-2.0/js/trc/schema/sampleManager.js
Normal file
@ -0,0 +1,342 @@
|
||||
/**
|
||||
schemaManager.js:
|
||||
|
||||
(C) 2009 Rackspace Hosting, All Rights Reserved
|
||||
|
||||
This file defines a single object in global scope:
|
||||
|
||||
trc.schema.sampleManager
|
||||
|
||||
The object is responsible for loading, formatting, and displaying
|
||||
samples in schema files. It expects trc.util to be defined which is
|
||||
provided in trc/util.js.
|
||||
|
||||
Code highlighting is provided by SHJS
|
||||
(http://shjs.sourceforge.net/). It should also be loaded before
|
||||
this code is initialized.
|
||||
|
||||
All methods/properties prepended with an underscore (_) are meant
|
||||
for internal use.
|
||||
**/
|
||||
|
||||
//
|
||||
// Initialization code...
|
||||
//
|
||||
(function()
|
||||
{
|
||||
//
|
||||
// Make sure dependecies are defined in the global scope, throw
|
||||
// an error if they are not.
|
||||
//
|
||||
if ((!window.trc) ||
|
||||
(!trc.util))
|
||||
{
|
||||
throw new Error("Require trc/util.js to be loaded.");
|
||||
}
|
||||
|
||||
//
|
||||
// Make sure syntax highlighter scripts are loaded, if not then
|
||||
// load them.
|
||||
//
|
||||
if (!window.sh_highlightDocument)
|
||||
{
|
||||
trc.util.dom.addStyle ("../style/shjs/sh_darkblue.css");
|
||||
|
||||
trc.util.dom.addScript ("../js/shjs/sh_main.js");
|
||||
trc.util.dom.addScript ("../js/shjs/sh_xml.js");
|
||||
trc.util.dom.addScript ("../js/shjs/sh_javascript.js");
|
||||
trc.util.dom.addScript ("../js/shjs/sh_java.js");
|
||||
}
|
||||
|
||||
function InitSchemaSampleManager()
|
||||
{
|
||||
trc.schema.sampleManager._init();
|
||||
}
|
||||
|
||||
trc.util.browser.addInitFunction(InitSchemaSampleManager);
|
||||
})();
|
||||
|
||||
//
|
||||
// Define trc.schema.sampleManager...
|
||||
//
|
||||
if (!trc.schema)
|
||||
{
|
||||
trc.schema = new Object();
|
||||
}
|
||||
trc.schema.sampleManager = {
|
||||
//
|
||||
// All sample data in an associative array:
|
||||
//
|
||||
// Select Element ID -> Array of sample ids.
|
||||
//
|
||||
samples : new Object(),
|
||||
|
||||
//
|
||||
// An array of code data..
|
||||
//
|
||||
// Code data is defined as an object with the following
|
||||
// properties:
|
||||
//
|
||||
// type: The mimetype of the code...href: The location of the code
|
||||
// or null if it's inline
|
||||
//
|
||||
// id: The id of the pre that contains the code.
|
||||
//
|
||||
// The initial object is the source code for the current document.
|
||||
//
|
||||
codes : new Array({
|
||||
id : "SrcContentCode",
|
||||
type : "application/xml",
|
||||
href : (function() {
|
||||
var ret = location.href;
|
||||
if (location.hash && (location.hash.length != 0))
|
||||
{
|
||||
ret = ret.replace (location.hash, "");
|
||||
}
|
||||
return ret;
|
||||
})()
|
||||
}),
|
||||
|
||||
//
|
||||
// Sets up the manager, begins the loading process...
|
||||
//
|
||||
_init : function() {
|
||||
//
|
||||
// Setup an array to hold data items to load, this is used by
|
||||
// the loadSample method.
|
||||
//
|
||||
this._toLoad = new Array();
|
||||
|
||||
for (var i=0;i<this.codes.length;i++)
|
||||
{
|
||||
if ((this.codes[i] != null) &&
|
||||
(this.codes[i].href != null))
|
||||
{
|
||||
this._toLoad.push (this.codes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Loads the code text
|
||||
//
|
||||
this._loadCode();
|
||||
},
|
||||
|
||||
//
|
||||
// Loads the next sample in the toLoad array.
|
||||
//
|
||||
_loadCode : function() {
|
||||
if (this._toLoad.length == 0)
|
||||
{
|
||||
//
|
||||
// All samples have been loaded, fire the loadComplete
|
||||
// method.
|
||||
//
|
||||
this._loadComplete();
|
||||
return;
|
||||
}
|
||||
|
||||
var codeData = this._toLoad.pop();
|
||||
var request = trc.util.net.getHTTPRequest();
|
||||
var manager = this;
|
||||
|
||||
request.onreadystatechange = function() {
|
||||
if (request.readyState == 4 /* Ready */) {
|
||||
if (request.status == 200 /* OKAY */) {
|
||||
manager._setCodeText (codeData, request.responseText);
|
||||
}
|
||||
else
|
||||
{
|
||||
manager._setCodeText (codeData, "Could not load sample ("+request.status+") "+request.responseText);
|
||||
}
|
||||
manager._loadCode();
|
||||
}
|
||||
};
|
||||
|
||||
request.open ("GET", codeData.href);
|
||||
request.send(null);
|
||||
},
|
||||
|
||||
//
|
||||
// Called after all samples are loaded into the DOM.
|
||||
//
|
||||
_loadComplete : function()
|
||||
{
|
||||
//
|
||||
// Normalize all code samples..
|
||||
//
|
||||
this._normalizeCodeText(1, 1, 5);
|
||||
|
||||
//
|
||||
// Perform syntax highlighting...
|
||||
//
|
||||
sh_highlightDocument();
|
||||
|
||||
//
|
||||
// All samples are initially hidden, show the selected
|
||||
// samples...
|
||||
//
|
||||
for (var optionID in this.samples)
|
||||
{
|
||||
this.showSample(optionID);
|
||||
}
|
||||
|
||||
//
|
||||
// We've adjusted the document, we need to setup the view so
|
||||
// that we're still pointing to the hash target.
|
||||
//
|
||||
if (window.location.hash &&
|
||||
(window.location.hash.length != 0))
|
||||
{
|
||||
window.location.href = window.location.hash;
|
||||
}
|
||||
},
|
||||
|
||||
//
|
||||
// Sets code text replacing any text already existing there.
|
||||
//
|
||||
_setCodeText : function ( codeData /* Info of the code to set (code object) */,
|
||||
code /* Code text to set (string) */)
|
||||
{
|
||||
//
|
||||
// Preprocess the txt if nessesary...
|
||||
//
|
||||
var ieVersion = trc.util.browser.detectIEVersion();
|
||||
if ((ieVersion > -1) &&
|
||||
(ieVersion < 8))
|
||||
{
|
||||
code = trc.util.text.unix2dos (code);
|
||||
}
|
||||
|
||||
var pre = document.getElementById(codeData.id);
|
||||
var preNodes = pre.childNodes;
|
||||
//
|
||||
// Remove placeholder data...
|
||||
//
|
||||
while (preNodes.length != 0)
|
||||
{
|
||||
pre.removeChild (preNodes[0]);
|
||||
}
|
||||
|
||||
//
|
||||
// Set the correct class type...
|
||||
//
|
||||
switch (codeData.type)
|
||||
{
|
||||
/*
|
||||
Javascript mimetypes
|
||||
*/
|
||||
case 'application/json':
|
||||
case 'application/javascript':
|
||||
case 'application/x-javascript':
|
||||
case 'application/ecmascript':
|
||||
case 'text/ecmascript':
|
||||
case 'text/javascript':
|
||||
trc.util.dom.setClassName (pre, "sh_javascript");
|
||||
break;
|
||||
/*
|
||||
Not real mimetypes but this is what we'll use for Java.
|
||||
*/
|
||||
case 'application/java':
|
||||
case 'text/java':
|
||||
trc.util.dom.setClassName (pre, "sh_java");
|
||||
break;
|
||||
default:
|
||||
trc.util.dom.setClassName (pre, "sh_xml");
|
||||
break;
|
||||
}
|
||||
|
||||
//
|
||||
// Add new code...
|
||||
//
|
||||
pre.appendChild (document.createTextNode (code));
|
||||
},
|
||||
|
||||
//
|
||||
// Retrives source code text
|
||||
//
|
||||
_getCodeText : function (codeData /* Info for the code to get*/)
|
||||
{
|
||||
var pre = document.getElementById(codeData.id);
|
||||
pre.normalize();
|
||||
//
|
||||
// Should be a single text node after pre...
|
||||
//
|
||||
return pre.firstChild.nodeValue;
|
||||
},
|
||||
|
||||
|
||||
//
|
||||
// Normalizes text by ensuring that top, bottom, right indent
|
||||
// levels are equal for all samples.
|
||||
//
|
||||
_normalizeCodeText : function (top, /* integer, top indent in lines */
|
||||
bottom, /* integer, bottom indent in lines */
|
||||
right /* integer, right indent in spaces */
|
||||
)
|
||||
{
|
||||
for (var i=0;i<this.codes.length;i++)
|
||||
{
|
||||
if (this.codes[i] != null)
|
||||
{
|
||||
var code = this._getCodeText (this.codes[i]);
|
||||
code = trc.util.text.setIndent (code, top, bottom, right);
|
||||
this._setCodeText (this.codes[i], code);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
//
|
||||
// This event handler shows the appropriate sample given an ID
|
||||
// to the select element.
|
||||
//
|
||||
showSample : function (selectID) /* ID of the Select element */
|
||||
{
|
||||
//
|
||||
// Get the selected value
|
||||
//
|
||||
var selected = document.getElementById(selectID);
|
||||
var selectedValue = selected.options[selected.selectedIndex].value;
|
||||
var samples = this.samples[selectID];
|
||||
|
||||
//
|
||||
// Undisplay old samples, display selected ones.
|
||||
//
|
||||
for (var i=0;i<samples.length;i++)
|
||||
{
|
||||
if (samples[i] != null)
|
||||
{
|
||||
var sample = document.getElementById (samples[i]);
|
||||
if (samples[i] == selectedValue)
|
||||
{
|
||||
sample.style.display = "block";
|
||||
}
|
||||
else
|
||||
{
|
||||
sample.style.display = "none";
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
//
|
||||
// Toggles the current source view. If the source is displayed it
|
||||
// undisplays it and vice versa.
|
||||
//
|
||||
toggleSrcView : function()
|
||||
{
|
||||
var content = document.getElementById ("Content");
|
||||
var src = document.getElementById ("SrcContent");
|
||||
|
||||
if (content.style.display != "none")
|
||||
{
|
||||
content.style.display = "none";
|
||||
src.style.display = "block";
|
||||
}
|
||||
else
|
||||
{
|
||||
content.style.display = "block";
|
||||
src.style.display = "none";
|
||||
}
|
||||
}
|
||||
};
|
564
doc/src/docbkx/quantum-api-2.0/js/trc/util.js
Normal file
564
doc/src/docbkx/quantum-api-2.0/js/trc/util.js
Normal file
@ -0,0 +1,564 @@
|
||||
/**
|
||||
util.js:
|
||||
|
||||
(C) 2009 Rackspace Hosting, All Rights Reserved
|
||||
|
||||
This file defines a single object in global scope:
|
||||
|
||||
trc.util
|
||||
|
||||
The util object contains internal objects which contain useful
|
||||
utility properties and methods.
|
||||
|
||||
trc.util.browser: contains methods for browser detection.
|
||||
|
||||
trc.util.dom: contains methods for manipulating the DOM.
|
||||
|
||||
trc.util.text: contains methods and properties useful when working
|
||||
with plain text.
|
||||
|
||||
trc.util.net: contains methods for creating HTTP requests.
|
||||
|
||||
trc.util.yui : contains methods for working with the YUI toolkit.
|
||||
|
||||
All methods/properties prepended with an underscore (_) are meant
|
||||
for internal use.
|
||||
**/
|
||||
|
||||
//
|
||||
// Define TRC
|
||||
//
|
||||
if (!window.trc)
|
||||
{
|
||||
trc= new Object();
|
||||
}
|
||||
trc.util = new Object();
|
||||
trc.util.browser = {
|
||||
//
|
||||
// Returns the current version of IE, or -1 if it's not an IE
|
||||
// browser. This is one of the recomended ways of detecting IE
|
||||
// see:
|
||||
//
|
||||
// http://msdn.microsoft.com/en-us/library/ms537509%28VS.85%29.aspx
|
||||
//
|
||||
detectIEVersion : function() {
|
||||
var rv = -1; // Return value assumes failure.
|
||||
if (navigator.appName == 'Microsoft Internet Explorer')
|
||||
{
|
||||
var ua = navigator.userAgent;
|
||||
var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
|
||||
if (re.exec(ua) != null)
|
||||
rv = parseFloat( RegExp.$1 );
|
||||
}
|
||||
return rv;
|
||||
},
|
||||
|
||||
//
|
||||
// A list of functions to execute on init.
|
||||
//
|
||||
_initFuns : new Array(),
|
||||
|
||||
//
|
||||
// Has the init function event been set?
|
||||
//
|
||||
_initFunSet: false,
|
||||
|
||||
//
|
||||
// Function called when the DOM has loaded. It launches all init
|
||||
// functions.
|
||||
//
|
||||
_onInit : function()
|
||||
{
|
||||
//
|
||||
// Sort by order...
|
||||
//
|
||||
this._initFuns.sort(function(a, b){ return a.order - b.order; });
|
||||
for (var i=0;i<this._initFuns.length;i++)
|
||||
{
|
||||
this._initFuns[i]();
|
||||
}
|
||||
},
|
||||
|
||||
//
|
||||
// Adds a function that should be executed when the dom is
|
||||
// loaded.
|
||||
//
|
||||
addInitFunction : function(init, /*Function to call after dom
|
||||
* is loaded*/
|
||||
|
||||
order /* An optional it specifing
|
||||
* order. The bigger the int the
|
||||
* later it will run. Default is
|
||||
* 1.*/
|
||||
) {
|
||||
if (arguments.length < 2)
|
||||
{
|
||||
init.order = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
init.order = order;
|
||||
}
|
||||
this._initFuns.push (init);
|
||||
|
||||
if (!this._initFunSet)
|
||||
{
|
||||
var butil = this;
|
||||
function initFun()
|
||||
{
|
||||
return (function(){ butil._onInit(); });
|
||||
}
|
||||
|
||||
//
|
||||
// Try event listeners, attachEvent and if that fails use
|
||||
// window.onload...
|
||||
//
|
||||
if (window.addEventListener)
|
||||
{
|
||||
window.addEventListener("load", initFun(), false);
|
||||
} else if (window.attachEvent)
|
||||
{
|
||||
window.attachEvent ("onload", initFun());
|
||||
} else
|
||||
{
|
||||
window.onload = initFun();
|
||||
}
|
||||
|
||||
this._initFunSet = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
trc.util.dom = {
|
||||
//
|
||||
// Adds a new script tag to the current DOM.
|
||||
//
|
||||
addScript : function (src /* Script href */)
|
||||
{
|
||||
var scriptElement = document.createElement ("script");
|
||||
scriptElement.setAttribute ("type", "text/javascript");
|
||||
scriptElement.setAttribute ("src", src);
|
||||
|
||||
this.addToHead (scriptElement);
|
||||
},
|
||||
|
||||
//
|
||||
// Adds a new stylesheet to the current DOM.
|
||||
//
|
||||
addStyle : function (src /* Stylesheet href */)
|
||||
{
|
||||
var linkElement = document.createElement ("link");
|
||||
linkElement.setAttribute ("rel", "stylesheet");
|
||||
linkElement.setAttribute ("type", "text/css");
|
||||
linkElement.setAttribute ("href", src);
|
||||
|
||||
this.addToHead (linkElement);
|
||||
},
|
||||
|
||||
//
|
||||
// Adds a DOM node to the HTTP head element. The element is
|
||||
// always added as the last child an error is thrown if the
|
||||
// head element can't be found.
|
||||
//
|
||||
addToHead : function (node /* A DOM node */)
|
||||
{
|
||||
var headArray = document.getElementsByTagName("head");
|
||||
if (headArray.length == 0)
|
||||
{
|
||||
throw new Error("Couldn't find head element, bad DOM?");
|
||||
}
|
||||
else
|
||||
{
|
||||
headArray[0].appendChild (node);
|
||||
}
|
||||
},
|
||||
|
||||
//
|
||||
// Dum utility function for setting the class name of an
|
||||
// element. Eventually we'll move completely to XHTML, but
|
||||
// this will never work in IE 6, so for now we need this
|
||||
// method for setting the class name.
|
||||
//
|
||||
setClassName : function (element, /* DOM Element*/
|
||||
name /* Class name to use */
|
||||
)
|
||||
{
|
||||
var ieVersion = trc.util.browser.detectIEVersion();
|
||||
|
||||
if ((ieVersion > -1) &&
|
||||
(ieVersion < 7))
|
||||
{
|
||||
element.className = name;
|
||||
}
|
||||
else
|
||||
{
|
||||
element.setAttribute ("class",name);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
trc.util.text = {
|
||||
//
|
||||
// Useful RegExps
|
||||
//
|
||||
blank : new RegExp ("^\\s*$"), /* A blank string */
|
||||
indent : new RegExp ("^\\s+"), /* Line indent */
|
||||
lines : new RegExp ("$","m"), /* All lines */
|
||||
linechars : new RegExp ("(\n|\r)"), /* EOL line characters */
|
||||
tabs : new RegExp ("\t","g"), /* All tabs */
|
||||
|
||||
//
|
||||
// We need this because microsoft browsers before IE 7, connot
|
||||
// display pre-formatted text correctly win unix style line
|
||||
// endings.
|
||||
//
|
||||
unix2dos : function(txt /* String */) {
|
||||
//if already DOS...
|
||||
if (txt.search(/\r\n/) != -1)
|
||||
{
|
||||
return txt;
|
||||
}
|
||||
return txt.replace (/\n/g, "\r\n");
|
||||
},
|
||||
|
||||
//
|
||||
// Useful to normalize text.
|
||||
//
|
||||
dos2unix : function(txt /* String */) {
|
||||
//if already unix...
|
||||
if (txt.search(/\r\n/) == -1)
|
||||
{
|
||||
return txt;
|
||||
}
|
||||
|
||||
return txt.replace(/\r/g, "");
|
||||
},
|
||||
|
||||
//
|
||||
// Create a string with a character repeated x times.
|
||||
//
|
||||
repString : function (length, /* integer, size of the string to create */
|
||||
ch /* string, The character to set the string to */
|
||||
)
|
||||
{
|
||||
var ret = new String();
|
||||
for (var i=0;i<length;i++) {ret=ret.concat(ch);}
|
||||
|
||||
return ret;
|
||||
},
|
||||
|
||||
//
|
||||
// Replace tabs in a text with strings.
|
||||
//
|
||||
replaceTabs : function (txt, /* String to modify */
|
||||
length /* integer, tab length in spaces */
|
||||
)
|
||||
{
|
||||
var tabs = this.repString(length, " ");
|
||||
return txt.replace (this.tabs, tabs);
|
||||
},
|
||||
|
||||
//
|
||||
// Given multi-line text returns Adjust top and bottom indent
|
||||
// (in lines) and right indent (in spaces)
|
||||
//
|
||||
setIndent : function (txt, /* String */
|
||||
top, /* integer, top indent in lines */
|
||||
bottom, /* integer, bottom indent in lines */
|
||||
right /* integer, right indent in spaces */
|
||||
)
|
||||
{
|
||||
//
|
||||
// Can't indent an empty string..
|
||||
//
|
||||
if (txt.length == 0)
|
||||
{
|
||||
return txt;
|
||||
}
|
||||
|
||||
//
|
||||
// If not 0, bottom will be off by one...
|
||||
//
|
||||
if (bottom != 0)
|
||||
{
|
||||
bottom++;
|
||||
}
|
||||
|
||||
var head=this.repString (top, "\n");
|
||||
var tail=this.repString (bottom, "\n");
|
||||
var marg=this.repString (right, " ");
|
||||
var ntxt = this.dos2unix(txt);
|
||||
var ntxt = this.replaceTabs (ntxt, 8);
|
||||
var lines = ntxt.split (this.lines);
|
||||
var origIndent=Number.MAX_VALUE;
|
||||
var origIndentStr;
|
||||
|
||||
//
|
||||
// Look up indent.
|
||||
//
|
||||
for (var i=0;i<lines.length;i++)
|
||||
{
|
||||
//
|
||||
// Remove EOL characters...
|
||||
//
|
||||
lines[i] = lines[i].replace (this.linechars, "");
|
||||
|
||||
//
|
||||
// Ignore blank lines
|
||||
//
|
||||
if (lines[i].match(this.blank) != null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
// Detect the indent if any...
|
||||
//
|
||||
var result = lines[i].match(this.indent);
|
||||
if (result == null)
|
||||
{
|
||||
origIndent = 0;
|
||||
origIndentStr = "";
|
||||
}
|
||||
else if (result[0].length < origIndent)
|
||||
{
|
||||
origIndent = result[0].length;
|
||||
origIndentStr = result[0];
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// This implys all line are blank...can't indent.
|
||||
//
|
||||
if (origIndent == Number.MAX_VALUE)
|
||||
{
|
||||
return txt;
|
||||
}
|
||||
|
||||
if (origIndent != 0)
|
||||
{
|
||||
var regExStr = "^";
|
||||
for (var i=0;i<origIndent;i++)
|
||||
{
|
||||
regExStr=regExStr.concat("\\s");
|
||||
}
|
||||
var indent = new RegExp(regExStr);
|
||||
for (var i=0;i<lines.length;i++)
|
||||
{
|
||||
lines[i] = lines[i].replace(indent,marg);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (var i=0;i<lines.length;i++)
|
||||
{
|
||||
lines[i] = marg.concat (lines[i]);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Remove top...
|
||||
//
|
||||
while (lines.length != 0)
|
||||
{
|
||||
if (lines[0].match(this.blank))
|
||||
{
|
||||
lines.shift();
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Remove bottom...
|
||||
//
|
||||
while (lines.length != 0)
|
||||
{
|
||||
if (lines[lines.length-1].match(this.blank))
|
||||
{
|
||||
lines.pop();
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var indented = lines.join("\n");
|
||||
indented=head.concat(indented, tail);
|
||||
|
||||
return indented;
|
||||
}
|
||||
};
|
||||
|
||||
trc.util.net = {
|
||||
//
|
||||
// A list of possible factories for creating an XMLHTTPRequest
|
||||
//
|
||||
_HTTPReqFactories :
|
||||
[
|
||||
function() { return new XMLHttpRequest(); },
|
||||
function() { return new ActiveXObject("Msxml2.XMLHTTP"); },
|
||||
function() { return new ActiveXObject("Microsoft.XMLHTTP"); }
|
||||
],
|
||||
|
||||
//
|
||||
// A cached XMLHTTPRequest factory that we know works in this
|
||||
// browser
|
||||
//
|
||||
_HTTPReqFactory : null,
|
||||
|
||||
//
|
||||
// Provides a way of getting an HTTPRequest object in a
|
||||
// platform independent manner
|
||||
//
|
||||
getHTTPRequest : function()
|
||||
{
|
||||
//
|
||||
// Use cache if available..
|
||||
//
|
||||
if (this._HTTPReqFactory != null) return this._HTTPReqFactory();
|
||||
|
||||
//
|
||||
// Search for a factory..
|
||||
//
|
||||
for (var i=0; i< this._HTTPReqFactories.length; i++)
|
||||
{
|
||||
try {
|
||||
var factory = this._HTTPReqFactories[i];
|
||||
var request = factory();
|
||||
if (request != null)
|
||||
{
|
||||
this._HTTPReqFactory = factory;
|
||||
return request;
|
||||
}
|
||||
} catch (e) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Looks like we don't have support for XMLHttpRequest...
|
||||
//
|
||||
this._HTTPReqFactory = function() {throw new Error("XMLHttpRequest not supported");}
|
||||
this._HTTPReqFactory();
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// Init code for trc.util.yui...
|
||||
//
|
||||
(function()
|
||||
{
|
||||
//
|
||||
// Menu make sure we have the YUI loader as it's used by our
|
||||
// init function to load YUI components.
|
||||
//
|
||||
if (!window.YAHOO)
|
||||
{
|
||||
//
|
||||
// We are currently using YUI on YAHOO!'s servers we may
|
||||
// want to change this.
|
||||
//
|
||||
var YUI_BASE="http://yui.yahooapis.com/2.7.0/";
|
||||
|
||||
trc.util.dom.addScript (YUI_BASE+"build/yuiloader/yuiloader-min.js");
|
||||
}
|
||||
|
||||
function InitYUIUtil()
|
||||
{
|
||||
trc.util.yui._init();
|
||||
}
|
||||
trc.util.browser.addInitFunction (InitYUIUtil);
|
||||
})();
|
||||
|
||||
trc.util.yui = {
|
||||
//
|
||||
// A list of dependecies to be passed to the YUI loader. This is
|
||||
// essentially a hash set: dep->dep.
|
||||
//
|
||||
_deps : new Object(),
|
||||
|
||||
//
|
||||
// An array of callback functions, these should be called when all
|
||||
// dependecies are loaded.
|
||||
//
|
||||
_callbacks : new Array(),
|
||||
|
||||
//
|
||||
// The init function simply calls the YUI loader...
|
||||
//
|
||||
_init : function() {
|
||||
var yuiUtil = this;
|
||||
|
||||
//
|
||||
// It takes safari a while to load the YUI Loader if it hasn't
|
||||
// loaded yet keep trying at 1/4 second intervals
|
||||
//
|
||||
if (!window.YAHOO)
|
||||
{
|
||||
window.setTimeout (function() {
|
||||
yuiUtil._init();
|
||||
}, 250);
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Collect requirements...
|
||||
//
|
||||
var required = new Array();
|
||||
for (var req in this._deps)
|
||||
{
|
||||
required.push (req);
|
||||
}
|
||||
|
||||
//
|
||||
// Load YUI dependecies...
|
||||
//
|
||||
var loader = new YAHOO.util.YUILoader({
|
||||
require: required,
|
||||
loadOptional: true,
|
||||
filter: "RAW",
|
||||
onSuccess: function() {
|
||||
yuiUtil._depsLoaded();
|
||||
},
|
||||
timeout: 10000,
|
||||
combine: true
|
||||
});
|
||||
loader.insert();
|
||||
},
|
||||
|
||||
//
|
||||
// Called after all dependecies have been loaded
|
||||
//
|
||||
_depsLoaded : function() {
|
||||
//
|
||||
// Dependecies are loaded let everyone know.
|
||||
//
|
||||
for (var i=0;i<this._callbacks.length;i++)
|
||||
{
|
||||
this._callbacks[i]();
|
||||
}
|
||||
},
|
||||
|
||||
//
|
||||
// Request that one or more YUI dependecies are loaded.
|
||||
//
|
||||
loadYUIDeps : function (deps, /*An array of dep strings */
|
||||
callback /*A function to call when deps are loaded*/
|
||||
)
|
||||
{
|
||||
for (var i=0;i<deps.length;i++)
|
||||
{
|
||||
this._deps[deps[i]] = deps[i];
|
||||
}
|
||||
if (callback != null)
|
||||
{
|
||||
this._callbacks.push (callback);
|
||||
}
|
||||
}
|
||||
};
|
2586
doc/src/docbkx/quantum-api-2.0/quantum-api-guide.xml
Normal file
2586
doc/src/docbkx/quantum-api-2.0/quantum-api-guide.xml
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,3 @@
|
||||
{
|
||||
"attachment": {}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<attachment />
|
6
doc/src/docbkx/quantum-api-2.0/samples/att-get-res.json
Normal file
6
doc/src/docbkx/quantum-api-2.0/samples/att-get-res.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"attachment":
|
||||
{
|
||||
"id": "test_interface_identifier"
|
||||
}
|
||||
}
|
1
doc/src/docbkx/quantum-api-2.0/samples/att-get-res.xml
Normal file
1
doc/src/docbkx/quantum-api-2.0/samples/att-get-res.xml
Normal file
@ -0,0 +1 @@
|
||||
<attachment id="test_interface_identifier"/>
|
6
doc/src/docbkx/quantum-api-2.0/samples/att-put-req.json
Normal file
6
doc/src/docbkx/quantum-api-2.0/samples/att-put-req.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"attachment":
|
||||
{
|
||||
"id": "test_interface_identifier"
|
||||
}
|
||||
}
|
2
doc/src/docbkx/quantum-api-2.0/samples/att-put-req.xml
Normal file
2
doc/src/docbkx/quantum-api-2.0/samples/att-put-req.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<attachment
|
||||
id="test_interface_identifier"/>
|
19
doc/src/docbkx/quantum-api-2.0/samples/extensions.json
Normal file
19
doc/src/docbkx/quantum-api-2.0/samples/extensions.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"extensions": [
|
||||
{
|
||||
"name": "Cisco Port Profile",
|
||||
"namespace": "http://docs.ciscocloud.com/api/ext/portprofile/v1.0",
|
||||
"alias": "Cisco Port Profile",
|
||||
"updated": "2011-07-23T13:25:27-06:00",
|
||||
"description": "Portprofile include QoS information",
|
||||
},
|
||||
{
|
||||
"name": "Cisco qos",
|
||||
"namespace": "http://docs.ciscocloud.com/api/ext/qos/v1.0",
|
||||
"alias": "Cisco qos",
|
||||
"updated": "2011-07-25T13:25:27-06:00",
|
||||
"description": "qos include qos_name and qos_desc",
|
||||
},
|
||||
|
||||
]
|
||||
}
|
21
doc/src/docbkx/quantum-api-2.0/samples/extensions.xml
Normal file
21
doc/src/docbkx/quantum-api-2.0/samples/extensions.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<extensions>
|
||||
|
||||
<extension
|
||||
name="Cisco Port Profile"
|
||||
namespace="http://docs.ciscocloud.com/api/ext/portprofile/v1.0"
|
||||
alias="Cisco Port Profile"
|
||||
updated="2011-07-23T13:25:27-06:00">
|
||||
<description>Portprofile include QoS information</description>
|
||||
</extension>
|
||||
|
||||
<extension
|
||||
name="Cisco qos"
|
||||
namespace="http://docs.ciscocloud.com/api/ext/qos/v1.0"
|
||||
alias="Cisco qos"
|
||||
updated="2011-07-25T13:25:27-06:00">
|
||||
<description>qos include qos_name and qos_desc</description>
|
||||
</extension>
|
||||
|
||||
</extensions>
|
7
doc/src/docbkx/quantum-api-2.0/samples/fault.json
Normal file
7
doc/src/docbkx/quantum-api-2.0/samples/fault.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"networkNotFound": {
|
||||
"message": "Unable to find a network with the specified identifier.",
|
||||
"code": 420,
|
||||
"detail": "Network 8de6af7c-ef95-4ac1-9d37-172f8df33a1f could not be found"
|
||||
}
|
||||
}
|
8
doc/src/docbkx/quantum-api-2.0/samples/fault.xml
Normal file
8
doc/src/docbkx/quantum-api-2.0/samples/fault.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<networkNotFound code="420" xmlns="http://netstack.org/quantum/api/v1.0">
|
||||
<message>
|
||||
Unable to find a network with the specified identifier.
|
||||
</message>
|
||||
<detail>
|
||||
Network 8de6af7c-ef95-4ac1-9d37-172f8df33a1f could not be found
|
||||
</detail>
|
||||
</networkNotFound
|
@ -0,0 +1,22 @@
|
||||
{
|
||||
"network":
|
||||
{
|
||||
"id": "8bec1293-16bd-4568-ba75-1f58bec0b4c3",
|
||||
"name": "test_network"
|
||||
"ports":
|
||||
[
|
||||
{
|
||||
"id": "98017ddc-efc8-4c25-a915-774b2a633855",
|
||||
"state": "DOWN"
|
||||
},
|
||||
{
|
||||
"id": b832be00-6553-4f69-af33-acd554e36d08",
|
||||
"state": "ACTIVE",
|
||||
"attachment":
|
||||
{
|
||||
"id": "test_interface_identifier"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
<network
|
||||
id="8bec1293-16bd-4568-ba75-1f58bec0b4c3"
|
||||
name="test_network">
|
||||
<ports>
|
||||
<port
|
||||
id="98017ddc-efc8-4c25-a915-774b2a633855"
|
||||
status="DOWN"/>
|
||||
<port
|
||||
id="b832be00-6553-4f69-af33-acd554e36d08"
|
||||
status="ACTIVE">
|
||||
<attachment id="test_interface_identifier"/>
|
||||
</port>
|
||||
</ports>
|
||||
</network>
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"network":
|
||||
{
|
||||
"id": "8bec1293-16bd-4568-ba75-1f58bec0b4c3",
|
||||
"name": "test_network"
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
<network
|
||||
id="8bec1293-16bd-4568-ba75-1f58bec0b4c3"
|
||||
name="test_network"/>
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"network":
|
||||
{
|
||||
"name": "sample_network",
|
||||
"admin_state_up": false
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
<network
|
||||
name="test_create_network"/>
|
15
doc/src/docbkx/quantum-api-2.0/samples/network-post-res.json
Normal file
15
doc/src/docbkx/quantum-api-2.0/samples/network-post-res.json
Normal file
@ -0,0 +1,15 @@
|
||||
'status': '201'
|
||||
'content-length': '194'
|
||||
'content-type': 'application/json;
|
||||
|
||||
{
|
||||
"network":
|
||||
{
|
||||
"status": "ACTIVE",
|
||||
"subnets": [],
|
||||
"name": "sample_network",
|
||||
"admin_state_up": false,
|
||||
"tenant_id": "c1210485b2424d48804aad5d39c61b8f",
|
||||
"id": "fc68ea2c-b60b-4b4f-bd82-94ec81110766"
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
<network
|
||||
id="158233b0-ca9a-40b4-8614-54a4a99d47d1"/>
|
@ -0,0 +1,11 @@
|
||||
{
|
||||
"network":
|
||||
{
|
||||
"status": "ACTIVE",
|
||||
"subnets": ["e12f0c45-46e3-446a-b207-9474b27687a6"],
|
||||
"name": "network_3",
|
||||
"admin_state_up": true,
|
||||
"tenant_id": "ed680f49ff714162ab3612d7876ffce5",
|
||||
"id": "afc75773-640e-403c-9fff-62ba98db1f19"
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
<networks>
|
||||
<network
|
||||
id="8bec1293-16bd-4568-ba75-1f58bec0b4c3"
|
||||
name="network_1"/>
|
||||
<network
|
||||
id="2a39409c-7146-4501-8429-3579e03e9b56"
|
||||
name="network_2"/>
|
||||
</networks>
|
31
doc/src/docbkx/quantum-api-2.0/samples/networks-get-res.json
Normal file
31
doc/src/docbkx/quantum-api-2.0/samples/networks-get-res.json
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"networks": [
|
||||
{
|
||||
"status": "ACTIVE",
|
||||
"subnets": [],
|
||||
"name": "network_1",
|
||||
"admin_state_up": true,
|
||||
"tenant_id": "c1210485b2424d48804aad5d39c61b8f",
|
||||
"id": "3a06dfc7-d239-4aad-9a57-21cd171c72e5",
|
||||
"shared": false
|
||||
},
|
||||
{
|
||||
"status": "ACTIVE",
|
||||
"subnets": [],
|
||||
"name": "network-2",
|
||||
"admin_state_up": true,
|
||||
"tenant_id": "c1210485b2424d48804aad5d39c61b8f",
|
||||
"id": "7db8c5a4-6eb0-478d-856b-7cfda2b25e13",
|
||||
"shared": false
|
||||
},
|
||||
{
|
||||
"status": "ACTIVE",
|
||||
"subnets": ["e12f0c45-46e3-446a-b207-9474b27687a6"],
|
||||
"name": "network_3",
|
||||
"admin_state_up": true,
|
||||
"tenant_id": "ed680f49ff714162ab3612d7876ffce5",
|
||||
"id": "afc75773-640e-403c-9fff-62ba98db1f19",
|
||||
"shared": true
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
<networks>
|
||||
<network id="8bec1293-16bd-4568-ba75-1f58bec0b4c3"/>
|
||||
<network id="2a39409c-7146-4501-8429-3579e03e9b56"/>
|
||||
</networks>
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"network":
|
||||
{
|
||||
"name": "net-name",
|
||||
"admin_state_up": true
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<network name="test"/>
|
@ -0,0 +1,11 @@
|
||||
{
|
||||
"network":
|
||||
{
|
||||
"status": "ACTIVE",
|
||||
"subnets": [],
|
||||
"name": "net-name",
|
||||
"admin_state_up": true,
|
||||
"tenant_id": "388a70781bae4ca895f17b7f6293eb70",
|
||||
"shared": false, "id": "2a4017ef-31ff-496a-9294-e96ecc3bc9c9"
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<network id="e1150d1c-e953-402d-aa75-e35d803d914b"/>
|
7
doc/src/docbkx/quantum-api-2.0/samples/notfound.json
Normal file
7
doc/src/docbkx/quantum-api-2.0/samples/notfound.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"itemNotFound" : {
|
||||
"code" : 404,
|
||||
"message" : "Not Found",
|
||||
"details" : "Error Details..."
|
||||
}
|
||||
}
|
7
doc/src/docbkx/quantum-api-2.0/samples/notfound.xml
Normal file
7
doc/src/docbkx/quantum-api-2.0/samples/notfound.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<itemNotFound
|
||||
xmlns="http://docs.openstack.org/compute/api/v1.1"
|
||||
code="404">
|
||||
<message>Not Found</message>
|
||||
<details>Error Details...</details>
|
||||
</itemNotFound>
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"notImplemented" : {
|
||||
"code" : 501,
|
||||
"message" : "Not Implemented",
|
||||
"details" : "Error Details..."
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<notImplemented xmlns="http://docs.openstack.org/compute/api/v1.1" code="501">
|
||||
<message>Not Implemented</message>
|
||||
<details>Error Details...</details>
|
||||
</notImplemented>
|
@ -0,0 +1,12 @@
|
||||
{
|
||||
"port":
|
||||
{
|
||||
"state": "DOWN",
|
||||
"id": "98017ddc-efc8-4c25-a915-774b2a633855"
|
||||
"attachment":
|
||||
{
|
||||
"id": "test_interface_identifier"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,6 @@
|
||||
<port
|
||||
id="98017ddc-efc8-4c25-a915-774b2a633855"
|
||||
state="DOWN">
|
||||
<attachment
|
||||
id="test_interface_identifier"/>
|
||||
</port>
|
22
doc/src/docbkx/quantum-api-2.0/samples/port-get-res.json
Normal file
22
doc/src/docbkx/quantum-api-2.0/samples/port-get-res.json
Normal file
@ -0,0 +1,22 @@
|
||||
Status: 200
|
||||
Content-Type: application/json
|
||||
Content-Length: 410
|
||||
|
||||
{
|
||||
"port": {
|
||||
"admin_state_up": true,
|
||||
"device_id": "d6b4d3a5-c700-476f-b609-1493dd9dadc0",
|
||||
"fixed_ips": [
|
||||
{
|
||||
"ip_address": "192.168.111.4",
|
||||
"subnet_id": "22b44fc2-4ffb-4de4-b0f9-69d58b37ae27"
|
||||
}
|
||||
],
|
||||
"id": "ebe69f1e-bc26-4db5-bed0-c0afb4afe3db",
|
||||
"mac_address": "fa:16:3e:a6:50:c1",
|
||||
"name": "port1",
|
||||
"network_id": "6aeaf34a-c482-4bd3-9dc3-7faf36412f12",
|
||||
"status": "ACTIVE",
|
||||
"tenant_id": "cf1a5775e766426cb1968766d0191908"
|
||||
}
|
||||
}
|
3
doc/src/docbkx/quantum-api-2.0/samples/port-get-res.xml
Normal file
3
doc/src/docbkx/quantum-api-2.0/samples/port-get-res.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<port
|
||||
id="98017ddc-efc8-4c25-a915-774b2a633855"
|
||||
state="DOWN"/>
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"port": {
|
||||
"admin_state_up": true,
|
||||
"device_id": "d6b4d3a5-c700-476f-b609-1493dd9dadc0",
|
||||
"name": "port1",
|
||||
"network_id": "6aeaf34a-c482-4bd3-9dc3-7faf36412f12"
|
||||
}
|
||||
}
|
2
doc/src/docbkx/quantum-api-2.0/samples/port-post-req.xml
Normal file
2
doc/src/docbkx/quantum-api-2.0/samples/port-post-req.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<port
|
||||
state="ACTIVE"/>
|
22
doc/src/docbkx/quantum-api-2.0/samples/port-post-res.json
Normal file
22
doc/src/docbkx/quantum-api-2.0/samples/port-post-res.json
Normal file
@ -0,0 +1,22 @@
|
||||
Status: 201
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Content-Length: 410
|
||||
|
||||
{
|
||||
"port": {
|
||||
"admin_state_up": true,
|
||||
"device_id": "d6b4d3a5-c700-476f-b609-1493dd9dadc0",
|
||||
"fixed_ips": [
|
||||
{
|
||||
"ip_address": "192.168.111.4",
|
||||
"subnet_id": "22b44fc2-4ffb-4de4-b0f9-69d58b37ae27"
|
||||
}
|
||||
],
|
||||
"id": "ebe69f1e-bc26-4db5-bed0-c0afb4afe3db",
|
||||
"mac_address": "fa:16:3e:a6:50:c1",
|
||||
"name": "port1",
|
||||
"network_id": "6aeaf34a-c482-4bd3-9dc3-7faf36412f12",
|
||||
"status": "ACTIVE",
|
||||
"tenant_id": "cf1a5775e766426cb1968766d0191908"
|
||||
}
|
||||
}
|
2
doc/src/docbkx/quantum-api-2.0/samples/port-post-res.xml
Normal file
2
doc/src/docbkx/quantum-api-2.0/samples/port-post-res.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<port
|
||||
id="98017ddc-efc8-4c25-a915-774b2a633855"/>
|
@ -0,0 +1,12 @@
|
||||
{
|
||||
"ports": [
|
||||
{
|
||||
"id": "98017ddc-efc8-4c25-a915-774b2a633855",
|
||||
"state": "ACTIVE",
|
||||
},
|
||||
{
|
||||
"id": "b832be00-6553-4f69-af33-acd554e36d08",
|
||||
"state": "ACTIVE",
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
<ports>
|
||||
<port
|
||||
id="98017ddc-efc8-4c25-a915-774b2a633855"
|
||||
state="ACTIVE"/>
|
||||
<port
|
||||
id="b832be00-6553-4f69-af33-acd554e36d08"
|
||||
state="ACTIVE"/>
|
||||
</ports>
|
40
doc/src/docbkx/quantum-api-2.0/samples/ports-get-res.json
Normal file
40
doc/src/docbkx/quantum-api-2.0/samples/ports-get-res.json
Normal file
@ -0,0 +1,40 @@
|
||||
Status: 200
|
||||
Content-Type: application/json
|
||||
Content-Length: 805
|
||||
|
||||
{
|
||||
"ports": [
|
||||
{
|
||||
"admin_state_up": true,
|
||||
"device_id": "257614cc-e178-4c92-9c61-3b28d40eca44",
|
||||
"fixed_ips": [
|
||||
{
|
||||
"ip_address": "192.168.111.3",
|
||||
"subnet_id": "22b44fc2-4ffb-4de4-b0f9-69d58b37ae27"
|
||||
}
|
||||
],
|
||||
"id": "24e6637e-c521-45fc-8b8b-d7331aa3c99f",
|
||||
"mac_address": "fa:16:3e:0f:3f:b5",
|
||||
"name": "",
|
||||
"network_id": "6aeaf34a-c482-4bd3-9dc3-7faf36412f12",
|
||||
"status": "ACTIVE",
|
||||
"tenant_id": "cf1a5775e766426cb1968766d0191908"
|
||||
},
|
||||
{
|
||||
"admin_state_up": true,
|
||||
"device_id": "d266f9de-fe2c-4705-93b3-9da71168c93b",
|
||||
"fixed_ips": [
|
||||
{
|
||||
"ip_address": "192.168.111.2",
|
||||
"subnet_id": "22b44fc2-4ffb-4de4-b0f9-69d58b37ae27"
|
||||
}
|
||||
],
|
||||
"id": "e54dfd9b-ce6e-47f7-af47-1609cfd1cdb0",
|
||||
"mac_address": "fa:16:3e:f5:41:7f",
|
||||
"name": "",
|
||||
"network_id": "6aeaf34a-c482-4bd3-9dc3-7faf36412f12",
|
||||
"status": "ACTIVE",
|
||||
"tenant_id": "cf1a5775e766426cb1968766d0191908"
|
||||
}
|
||||
]
|
||||
}
|
6
doc/src/docbkx/quantum-api-2.0/samples/ports-get-res.xml
Normal file
6
doc/src/docbkx/quantum-api-2.0/samples/ports-get-res.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<ports>
|
||||
<port
|
||||
id="98017ddc-efc8-4c25-a915-774b2a633855"/>
|
||||
<port
|
||||
id="b832be00-6553-4f69-af33-acd554e36d08"/>
|
||||
</ports>
|
9
doc/src/docbkx/quantum-api-2.0/samples/private.json
Normal file
9
doc/src/docbkx/quantum-api-2.0/samples/private.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"network" {
|
||||
"id" : "private",
|
||||
"ip" : [
|
||||
{"version" : 4, "addr" : "10.176.42.16"},
|
||||
{"version" : 6, "addr" : "::babe:10.176.42.16"}
|
||||
]
|
||||
}
|
||||
}
|
6
doc/src/docbkx/quantum-api-2.0/samples/private.xml
Normal file
6
doc/src/docbkx/quantum-api-2.0/samples/private.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<network xmlns="http://docs.openstack.org/compute/api/v1.1"
|
||||
id="private">
|
||||
<ip version="4" addr="10.176.42.16"/>
|
||||
<ip version="6" addr="::babe:10.176.42.16"/>
|
||||
</network>
|
11
doc/src/docbkx/quantum-api-2.0/samples/public.json
Normal file
11
doc/src/docbkx/quantum-api-2.0/samples/public.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"network" {
|
||||
"id" : "public",
|
||||
"ip" : [
|
||||
{"version" : 4, "addr" : "67.23.10.132"},
|
||||
{"version" : 6, "addr" : "::babe:67.23.10.132"},
|
||||
{"version" : 4, "addr" : "67.23.10.131"},
|
||||
{"version" : 6, "addr" : "::babe:4317:0A83"}
|
||||
]
|
||||
}
|
||||
}
|
8
doc/src/docbkx/quantum-api-2.0/samples/public.xml
Normal file
8
doc/src/docbkx/quantum-api-2.0/samples/public.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<network xmlns="http://docs.openstack.org/compute/api/v1.1"
|
||||
id="public">
|
||||
<ip version="4" addr="67.23.10.132"/>
|
||||
<ip version="6" addr="::babe:67.23.10.132"/>
|
||||
<ip version="4" addr="67.23.10.131"/>
|
||||
<ip version="6" addr="::babe:4317:0A83"/>
|
||||
</network>
|
@ -0,0 +1,12 @@
|
||||
{
|
||||
"port":
|
||||
{
|
||||
"state": "DOWN",
|
||||
"id": "98017ddc-efc8-4c25-a915-774b2a633855"
|
||||
"attachment":
|
||||
{
|
||||
"id": "test_interface_identifier"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,6 @@
|
||||
<port
|
||||
id="98017ddc-efc8-4c25-a915-774b2a633855"
|
||||
state="DOWN">
|
||||
<attachment
|
||||
id="test_interface_identifier"/>
|
||||
</port>
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"port":
|
||||
{
|
||||
"state": "DOWN",
|
||||
"id": "98017ddc-efc8-4c25-a915-774b2a633855"
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,3 @@
|
||||
<port
|
||||
id="98017ddc-efc8-4c25-a915-774b2a633855"
|
||||
state="DOWN"/>
|
16
doc/src/docbkx/quantum-api-2.0/samples/subnet-post-req.json
Normal file
16
doc/src/docbkx/quantum-api-2.0/samples/subnet-post-req.json
Normal file
@ -0,0 +1,16 @@
|
||||
status: 201,
|
||||
content-length: 306,
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"subnet": {
|
||||
"name": "",
|
||||
"network_id": "ed2e3c10-2e43-4297-9006-2863a2d1abbc",
|
||||
"tenant_id": "c1210485b2424d48804aad5d39c61b8f",
|
||||
"allocation_pools": [{"start": "10.0.3.20", "end": "10.0.3.150"}],
|
||||
"gateway_ip": "10.0.3.1",
|
||||
"ip_version": 4,
|
||||
"cidr": "10.0.3.0/24",
|
||||
"id": "9436e561-47bf-436a-b1f1-fe23a926e031",
|
||||
"enable_dhcp": true}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
<port
|
||||
state="ACTIVE"/>
|
17
doc/src/docbkx/quantum-api-2.0/samples/subnet-post-res.json
Normal file
17
doc/src/docbkx/quantum-api-2.0/samples/subnet-post-res.json
Normal file
@ -0,0 +1,17 @@
|
||||
status: 200
|
||||
content-length: 316
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"subnet":
|
||||
{
|
||||
"name": "new_name",
|
||||
"network_id": "ed2e3c10-2e43-4297-9006-2863a2d1abbc",
|
||||
"tenant_id": "c1210485b2424d48804aad5d39c61b8f",
|
||||
"allocation_pools": [{"start": "10.0.3.20", "end": "10.0.3.150"}],
|
||||
"gateway_ip": "10.0.3.254",
|
||||
"ip_version": 4,
|
||||
"cidr": "10.0.3.0/24",
|
||||
"id": "9436e561-47bf-436a-b1f1-fe23a926e031"
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
<port
|
||||
id="98017ddc-efc8-4c25-a915-774b2a633855"/>
|
@ -0,0 +1,18 @@
|
||||
status: 200
|
||||
content-length: 309
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"subnet":
|
||||
{
|
||||
"name": "",
|
||||
"network_id": "ed2e3c10-2e43-4297-9006-2863a2d1abbc",
|
||||
"tenant_id": "c1210485b2424d48804aad5d39c61b8f",
|
||||
"allocation_pools": [{"start": "10.10.0.2", "end": "10.10.0.254"}],
|
||||
"gateway_ip": "10.10.0.1",
|
||||
"ip_version": 4,
|
||||
"cidr": "10.10.0.0/24",
|
||||
"id": "4156c7a5-e8c4-4aff-a6e1-8f3c7bc83861",
|
||||
"enable_dhcp": false,
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
<ports>
|
||||
<port
|
||||
id="98017ddc-efc8-4c25-a915-774b2a633855"
|
||||
state="ACTIVE"/>
|
||||
<port
|
||||
id="b832be00-6553-4f69-af33-acd554e36d08"
|
||||
state="ACTIVE"/>
|
||||
</ports>
|
23
doc/src/docbkx/quantum-api-2.0/samples/subnets-get-res.json
Normal file
23
doc/src/docbkx/quantum-api-2.0/samples/subnets-get-res.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"subnets": [
|
||||
{
|
||||
"name": "",
|
||||
"network_id": "ed2e3c10-2e43-4297-9006-2863a2d1abbc",
|
||||
"tenant_id": "c1210485b2424d48804aad5d39c61b8f",
|
||||
"allocation_pools": [{"start": "10.10.0.2", "end": "10.10.0.254"}],
|
||||
"gateway_ip": "10.10.0.1",
|
||||
"ip_version": 4,
|
||||
"cidr": "10.10.0.0/24",
|
||||
"id": "4156c7a5-e8c4-4aff-a6e1-8f3c7bc83861"
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"network_id": "afc75773-640e-403c-9fff-62ba98db1f19",
|
||||
"tenant_id": "ed680f49ff714162ab3612d7876ffce5",
|
||||
"allocation_pools": [{"start": "10.0.0.2", "end": "10.0.0.254"}],
|
||||
"gateway_ip": "10.0.0.1",
|
||||
"ip_version": 4,
|
||||
"cidr": "10.0.0.0/24",
|
||||
"id": "e12f0c45-46e3-446a-b207-9474b27687a6"
|
||||
}]
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
<ports>
|
||||
<port
|
||||
id="98017ddc-efc8-4c25-a915-774b2a633855"/>
|
||||
<port
|
||||
id="b832be00-6553-4f69-af33-acd554e36d08"/>
|
||||
</ports>
|
29
doc/src/docbkx/quantum-api-2.0/samples/subnets_get_resp.json
Normal file
29
doc/src/docbkx/quantum-api-2.0/samples/subnets_get_resp.json
Normal file
@ -0,0 +1,29 @@
|
||||
status: 200
|
||||
content-length: 607
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"subnets": [
|
||||
{
|
||||
"name": "",
|
||||
"network_id": "ed2e3c10-2e43-4297-9006-2863a2d1abbc",
|
||||
"tenant_id": "c1210485b2424d48804aad5d39c61b8f",
|
||||
"allocation_pools": [{"start": "10.10.0.2", "end": "10.10.0.254"}],
|
||||
"gateway_ip": "10.10.0.1",
|
||||
"ip_version": 4,
|
||||
"cidr": "10.10.0.0/24",
|
||||
"id": "4156c7a5-e8c4-4aff-a6e1-8f3c7bc83861",
|
||||
"enable_dhcp": true
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"network_id": "afc75773-640e-403c-9fff-62ba98db1f19",
|
||||
"tenant_id": "ed680f49ff714162ab3612d7876ffce5",
|
||||
"allocation_pools": [{"start": "10.0.0.2", "end": "10.0.0.254"}],
|
||||
"gateway_ip": "10.0.0.1",
|
||||
"ip_version": 4,
|
||||
"cidr": "10.0.0.0/24",
|
||||
"id": "e12f0c45-46e3-446a-b207-9474b27687a6",
|
||||
"enable_dhcp": true
|
||||
}]
|
||||
}
|
22
doc/src/docbkx/quantum-api-2.0/samples/versions-atom.xml
Normal file
22
doc/src/docbkx/quantum-api-2.0/samples/versions-atom.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<title type="text">Available API Versions</title>
|
||||
<updated>2010-12-12T18:30:02.25Z</updated>
|
||||
<id>http://servers.api.openstack.org/</id>
|
||||
<author><name>Rackspace</name><uri>http://www.rackspace.com/</uri></author>
|
||||
<link rel="self" href="http://servers.api.openstack.org/"/>
|
||||
<entry>
|
||||
<id>http://servers.api.openstack.org/v1.1/</id>
|
||||
<title type="text">Version v1.1</title>
|
||||
<updated>2010-12-12T18:30:02.25Z</updated>
|
||||
<link rel="self" href="http://servers.api.openstack.org/v1.1/"/>
|
||||
<content type="text">Version v1.1 CURRENT (2010-12-12T18:30:02.25Z)</content>
|
||||
</entry>
|
||||
<entry>
|
||||
<id>http://servers.api.openstack.org/v1.0/</id>
|
||||
<title type="text">Version v1.0</title>
|
||||
<updated>2009-10-09T11:30:00Z</updated>
|
||||
<link rel="self" href="http://servers.api.openstack.org/v1.0/"/>
|
||||
<content type="text">Version v1.0 DEPRECATED (2009-10-09T11:30:00Z)</content>
|
||||
</entry>
|
||||
</feed>
|
24
doc/src/docbkx/quantum-api-2.0/samples/versions.json
Normal file
24
doc/src/docbkx/quantum-api-2.0/samples/versions.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"status": "CURRENT",
|
||||
"id": "v1.0",
|
||||
"links": [
|
||||
{
|
||||
"href": "http://127.0.0.1:9696/v1.0",
|
||||
"rel": "self"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"status": "FUTURE",
|
||||
"id": "v1.1",
|
||||
"links": [
|
||||
{
|
||||
"href": "http://127.0.0.1:9696/v1.1",
|
||||
"rel": "self"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
12
doc/src/docbkx/quantum-api-2.0/samples/versions.xml
Normal file
12
doc/src/docbkx/quantum-api-2.0/samples/versions.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<versions>
|
||||
<version id="v1.0" status="CURRENT">
|
||||
<links>
|
||||
<link href="http://127.0.0.1:9696/v1.0" rel="self"/>
|
||||
</links>
|
||||
</version>
|
||||
<version id="v1.1" status="FUTURE">
|
||||
<links>
|
||||
<link href="http://127.0.0.1:9696/v1.1" rel="self"/>
|
||||
</links>
|
||||
</version>
|
||||
</versions>
|
82
doc/src/docbkx/quantum-api-2.0/style/schema.css
Normal file
82
doc/src/docbkx/quantum-api-2.0/style/schema.css
Normal file
@ -0,0 +1,82 @@
|
||||
/*
|
||||
* (C) 2009 Rackspace Hosting, All Rights Reserved.
|
||||
*/
|
||||
body, div, dl, dt, dd, ul, ol, li, h2, h3,
|
||||
h4, h5, h6, pre, code, form, fieldset, legend,
|
||||
input, button, textarea, p, blockquote, th, td {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 350%;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#Content {
|
||||
border: 1px solid;
|
||||
padding: 0px 40px 40px;
|
||||
margin-left: 155px;
|
||||
}
|
||||
|
||||
#SrcContent {
|
||||
padding: 0px 40px 40px;
|
||||
display: none;
|
||||
margin-left: 155px;
|
||||
}
|
||||
|
||||
#Controller {
|
||||
position: fixed;
|
||||
width: 145px;
|
||||
left: 10px;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.Sample {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.EnumValue{
|
||||
padding: 10px 0px;
|
||||
}
|
||||
|
||||
.EnumDoc{
|
||||
padding: 10px 10px 10px 0px;
|
||||
}
|
||||
|
||||
.ExternHref{
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.ExternDoc{
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
pre {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 0px 0px 0px 10px;
|
||||
width: 50%;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:link {
|
||||
color: #000090;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #000090;
|
||||
}
|
151
doc/src/docbkx/quantum-api-2.0/style/shjs/sh_acid.css
Normal file
151
doc/src/docbkx/quantum-api-2.0/style/shjs/sh_acid.css
Normal file
@ -0,0 +1,151 @@
|
||||
pre.sh_sourceCode {
|
||||
background-color: #eeeeee;
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_keyword {
|
||||
color: #bb7977;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_type {
|
||||
color: #8080c0;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_string {
|
||||
color: #a68500;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_regexp {
|
||||
color: #a68500;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_specialchar {
|
||||
color: #ff00ff;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_comment {
|
||||
color: #ff8000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_number {
|
||||
color: #800080;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_preproc {
|
||||
color: #0080c0;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_symbol {
|
||||
color: #ff0080;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_function {
|
||||
color: #004466;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_cbracket {
|
||||
color: #ff0080;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_url {
|
||||
color: #a68500;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_date {
|
||||
color: #bb7977;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_time {
|
||||
color: #bb7977;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_file {
|
||||
color: #bb7977;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_ip {
|
||||
color: #a68500;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_name {
|
||||
color: #a68500;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_variable {
|
||||
color: #0080c0;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_oldfile {
|
||||
color: #ff00ff;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_newfile {
|
||||
color: #a68500;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_difflines {
|
||||
color: #bb7977;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_selector {
|
||||
color: #0080c0;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_property {
|
||||
color: #bb7977;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_value {
|
||||
color: #a68500;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
151
doc/src/docbkx/quantum-api-2.0/style/shjs/sh_darkblue.css
Normal file
151
doc/src/docbkx/quantum-api-2.0/style/shjs/sh_darkblue.css
Normal file
@ -0,0 +1,151 @@
|
||||
pre.sh_sourceCode {
|
||||
background-color: #000040;
|
||||
color: #C7C7C7;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_keyword {
|
||||
color: #ffff60;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_type {
|
||||
color: #60ff60;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_string {
|
||||
color: #ffa0a0;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_regexp {
|
||||
color: #ffa0a0;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_specialchar {
|
||||
color: #ffa500;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_comment {
|
||||
color: #80a0ff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_number {
|
||||
color: #42cad9;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_preproc {
|
||||
color: #ff80ff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_symbol {
|
||||
color: #d8e91b;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_function {
|
||||
color: #ffffff;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_cbracket {
|
||||
color: #d8e91b;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_url {
|
||||
color: #ffa0a0;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_date {
|
||||
color: #ffff60;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_time {
|
||||
color: #ffff60;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_file {
|
||||
color: #ffff60;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_ip {
|
||||
color: #ffa0a0;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_name {
|
||||
color: #ffa0a0;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_variable {
|
||||
color: #26e0e7;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_oldfile {
|
||||
color: #ffa500;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_newfile {
|
||||
color: #ffa0a0;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_difflines {
|
||||
color: #ffff60;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_selector {
|
||||
color: #26e0e7;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_property {
|
||||
color: #ffff60;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_value {
|
||||
color: #ffa0a0;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
139
doc/src/docbkx/quantum-api-2.0/style/shjs/sh_emacs.css
Normal file
139
doc/src/docbkx/quantum-api-2.0/style/shjs/sh_emacs.css
Normal file
@ -0,0 +1,139 @@
|
||||
pre.sh_sourceCode {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_keyword {
|
||||
color: #9c20ee;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_type {
|
||||
color: #208920;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_string {
|
||||
color: #bd8d8b;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_regexp {
|
||||
color: #bd8d8b;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_specialchar {
|
||||
color: #bd8d8b;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_comment {
|
||||
color: #ac2020;
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_number {
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_preproc {
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_function {
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_url {
|
||||
color: #bd8d8b;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_date {
|
||||
color: #9c20ee;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_time {
|
||||
color: #9c20ee;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_file {
|
||||
color: #9c20ee;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_ip {
|
||||
color: #bd8d8b;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_name {
|
||||
color: #bd8d8b;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_variable {
|
||||
color: #0000ff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_oldfile {
|
||||
color: #bd8d8b;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_newfile {
|
||||
color: #bd8d8b;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_difflines {
|
||||
color: #9c20ee;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_selector {
|
||||
color: #0000ff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_property {
|
||||
color: #9c20ee;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_value {
|
||||
color: #bd8d8b;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
151
doc/src/docbkx/quantum-api-2.0/style/shjs/sh_night.css
Normal file
151
doc/src/docbkx/quantum-api-2.0/style/shjs/sh_night.css
Normal file
@ -0,0 +1,151 @@
|
||||
pre.sh_sourceCode {
|
||||
background-color: #000044;
|
||||
color: #dd00ff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_keyword {
|
||||
color: #ffffff;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_type {
|
||||
color: #f1157c;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_string {
|
||||
color: #ffffff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_regexp {
|
||||
color: #ffffff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_specialchar {
|
||||
color: #82d66d;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_comment {
|
||||
color: #bfbfbf;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_number {
|
||||
color: #8ee119;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_preproc {
|
||||
color: #00bb00;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_symbol {
|
||||
color: #e7ee5c;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_function {
|
||||
color: #ff06cd;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_cbracket {
|
||||
color: #e7ee5c;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_url {
|
||||
color: #ffffff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_date {
|
||||
color: #ffffff;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_time {
|
||||
color: #ffffff;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_file {
|
||||
color: #ffffff;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_ip {
|
||||
color: #ffffff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_name {
|
||||
color: #ffffff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_variable {
|
||||
color: #7aec27;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_oldfile {
|
||||
color: #82d66d;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_newfile {
|
||||
color: #ffffff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_difflines {
|
||||
color: #ffffff;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_selector {
|
||||
color: #7aec27;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_property {
|
||||
color: #ffffff;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_value {
|
||||
color: #ffffff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
151
doc/src/docbkx/quantum-api-2.0/style/shjs/sh_pablo.css
Normal file
151
doc/src/docbkx/quantum-api-2.0/style/shjs/sh_pablo.css
Normal file
@ -0,0 +1,151 @@
|
||||
pre.sh_sourceCode {
|
||||
background-color: #000000;
|
||||
color: #ffffff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_keyword {
|
||||
color: #c0c000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_type {
|
||||
color: #00c000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_string {
|
||||
color: #00ffff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_regexp {
|
||||
color: #00ffff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_specialchar {
|
||||
color: #0000ff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_comment {
|
||||
color: #808080;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_number {
|
||||
color: #00ffff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_preproc {
|
||||
color: #00ff00;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_symbol {
|
||||
color: #ff0000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_function {
|
||||
color: #ff22b9;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_cbracket {
|
||||
color: #ff0000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_url {
|
||||
color: #00ffff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_date {
|
||||
color: #c0c000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_time {
|
||||
color: #c0c000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_file {
|
||||
color: #c0c000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_ip {
|
||||
color: #00ffff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_name {
|
||||
color: #00ffff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_variable {
|
||||
color: #0000c0;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_oldfile {
|
||||
color: #0000ff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_newfile {
|
||||
color: #00ffff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_difflines {
|
||||
color: #c0c000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_selector {
|
||||
color: #0000c0;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_property {
|
||||
color: #c0c000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_value {
|
||||
color: #00ffff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
145
doc/src/docbkx/quantum-api-2.0/style/shjs/sh_print.css
Normal file
145
doc/src/docbkx/quantum-api-2.0/style/shjs/sh_print.css
Normal file
@ -0,0 +1,145 @@
|
||||
pre.sh_sourceCode {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_keyword {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_type {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_string {
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_regexp {
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_specialchar {
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_comment {
|
||||
color: #666666;
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_number {
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_preproc {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_symbol {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_cbracket {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_url {
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_date {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_time {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_file {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_ip {
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_name {
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_variable {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_oldfile {
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_newfile {
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_difflines {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_selector {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_property {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_value {
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
66
doc/src/docbkx/quantum-api-2.0/style/shjs/sh_style.css
Normal file
66
doc/src/docbkx/quantum-api-2.0/style/shjs/sh_style.css
Normal file
@ -0,0 +1,66 @@
|
||||
pre.sh_sourceCode {
|
||||
background-color: white;
|
||||
color: black;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_keyword { color: blue; font-weight: bold; } /* language keywords */
|
||||
pre.sh_sourceCode .sh_type { color: darkgreen; } /* basic types */
|
||||
pre.sh_sourceCode .sh_usertype { color: teal; } /* user defined types */
|
||||
pre.sh_sourceCode .sh_string { color: red; font-family: monospace; } /* strings and chars */
|
||||
pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; } /* regular expressions */
|
||||
pre.sh_sourceCode .sh_specialchar { color: pink; font-family: monospace; } /* e.g., \n, \t, \\ */
|
||||
pre.sh_sourceCode .sh_comment { color: brown; font-style: italic; } /* comments */
|
||||
pre.sh_sourceCode .sh_number { color: purple; } /* literal numbers */
|
||||
pre.sh_sourceCode .sh_preproc { color: darkblue; font-weight: bold; } /* e.g., #include, import */
|
||||
pre.sh_sourceCode .sh_symbol { color: darkred; } /* e.g., <, >, + */
|
||||
pre.sh_sourceCode .sh_function { color: black; font-weight: bold; } /* function calls and declarations */
|
||||
pre.sh_sourceCode .sh_cbracket { color: red; } /* block brackets (e.g., {, }) */
|
||||
pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: cyan; } /* TODO and FIXME */
|
||||
|
||||
/* Predefined variables and functions (for instance glsl) */
|
||||
pre.sh_sourceCode .sh_predef_var { color: darkblue; }
|
||||
pre.sh_sourceCode .sh_predef_func { color: darkblue; font-weight: bold; }
|
||||
|
||||
/* for OOP */
|
||||
pre.sh_sourceCode .sh_classname { color: teal; }
|
||||
|
||||
/* line numbers (not yet implemented) */
|
||||
pre.sh_sourceCode .sh_linenum { color: black; font-family: monospace; }
|
||||
|
||||
/* Internet related */
|
||||
pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
|
||||
|
||||
/* for ChangeLog and Log files */
|
||||
pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
|
||||
pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: darkblue; font-weight: bold; }
|
||||
pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: darkgreen; }
|
||||
|
||||
/* for Prolog, Perl... */
|
||||
pre.sh_sourceCode .sh_variable { color: darkgreen; }
|
||||
|
||||
/* for LaTeX */
|
||||
pre.sh_sourceCode .sh_italics { color: darkgreen; font-style: italic; }
|
||||
pre.sh_sourceCode .sh_bold { color: darkgreen; font-weight: bold; }
|
||||
pre.sh_sourceCode .sh_underline { color: darkgreen; text-decoration: underline; }
|
||||
pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
|
||||
pre.sh_sourceCode .sh_argument { color: darkgreen; }
|
||||
pre.sh_sourceCode .sh_optionalargument { color: purple; }
|
||||
pre.sh_sourceCode .sh_math { color: orange; }
|
||||
pre.sh_sourceCode .sh_bibtex { color: blue; }
|
||||
|
||||
/* for diffs */
|
||||
pre.sh_sourceCode .sh_oldfile { color: orange; }
|
||||
pre.sh_sourceCode .sh_newfile { color: darkgreen; }
|
||||
pre.sh_sourceCode .sh_difflines { color: blue; }
|
||||
|
||||
/* for css */
|
||||
pre.sh_sourceCode .sh_selector { color: purple; }
|
||||
pre.sh_sourceCode .sh_property { color: blue; }
|
||||
pre.sh_sourceCode .sh_value { color: darkgreen; font-style: italic; }
|
||||
|
||||
/* other */
|
||||
pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
|
||||
pre.sh_sourceCode .sh_paren { color: red; }
|
||||
pre.sh_sourceCode .sh_attribute { color: darkgreen; }
|
139
doc/src/docbkx/quantum-api-2.0/style/shjs/sh_whitengrey.css
Normal file
139
doc/src/docbkx/quantum-api-2.0/style/shjs/sh_whitengrey.css
Normal file
@ -0,0 +1,139 @@
|
||||
pre.sh_sourceCode {
|
||||
background-color: #ffffff;
|
||||
color: #696969;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_keyword {
|
||||
color: #696969;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_type {
|
||||
color: #696969;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_string {
|
||||
color: #008800;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_regexp {
|
||||
color: #008800;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_specialchar {
|
||||
color: #008800;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_comment {
|
||||
color: #1326a2;
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_number {
|
||||
color: #bb00ff;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_preproc {
|
||||
color: #470000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_function {
|
||||
color: #000000;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_url {
|
||||
color: #008800;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_date {
|
||||
color: #696969;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_time {
|
||||
color: #696969;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_file {
|
||||
color: #696969;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_ip {
|
||||
color: #008800;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_name {
|
||||
color: #008800;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_variable {
|
||||
color: #696969;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_oldfile {
|
||||
color: #008800;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_newfile {
|
||||
color: #008800;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_difflines {
|
||||
color: #696969;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_selector {
|
||||
color: #696969;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_property {
|
||||
color: #696969;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
pre.sh_sourceCode .sh_value {
|
||||
color: #008800;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
6
doc/src/docbkx/quantum-api-2.0/xsd/.htaccess
Normal file
6
doc/src/docbkx/quantum-api-2.0/xsd/.htaccess
Normal file
@ -0,0 +1,6 @@
|
||||
<Directory />
|
||||
DirectoryIndex api.xsd
|
||||
AddType application/xml wadl
|
||||
AddType application/xml xsd
|
||||
AddType application/xml xslt
|
||||
</Directory>
|
439
doc/src/docbkx/quantum-api-2.0/xsd/actions.xsd
Normal file
439
doc/src/docbkx/quantum-api-2.0/xsd/actions.xsd
Normal file
@ -0,0 +1,439 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml-stylesheet type="text/xsl" href="../xslt/schema.xsl"?>
|
||||
|
||||
<!-- (C) 2011 OpenStack LLC., All Rights Reserved -->
|
||||
|
||||
<schema
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified"
|
||||
xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:csapi="http://docs.openstack.org/compute/api/v1.1"
|
||||
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="http://docs.openstack.org/compute/api/v1.1"
|
||||
>
|
||||
<annotation>
|
||||
<xsd:appinfo
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<xsdxt:title>Server Actions</xsdxt:title>
|
||||
<xsdxt:link rel="index" href="api.xsd" />
|
||||
</xsd:appinfo>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
This schema file defines actions that can be performed on a
|
||||
cloud server. All cloud server actions are derived from the <a
|
||||
href="#type_Action" title="See definition of
|
||||
Action">Action</a> type.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
|
||||
<include schemaLocation="server.xsd">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Types related to servers.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
</include>
|
||||
|
||||
<element name="reboot" type="csapi:Reboot">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Performs a HARD or SOFT reboot.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<xsdxt:samples>
|
||||
<xsdxt:sample>
|
||||
<xsdxt:code type="application/xml" href="../samples/reboot.xml" />
|
||||
</xsdxt:sample>
|
||||
<xsdxt:sample>
|
||||
<xsdxt:code type="application/json" href="../samples/reboot.json" />
|
||||
</xsdxt:sample>
|
||||
</xsdxt:samples>
|
||||
</xsd:appinfo>
|
||||
</annotation>
|
||||
</element>
|
||||
<element name="rebuild" type="csapi:Rebuild">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Rebuilds a server.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<xsdxt:samples>
|
||||
<xsdxt:sample>
|
||||
<xsdxt:code type="application/xml" href="../samples/rebuild.xml" />
|
||||
</xsdxt:sample>
|
||||
<xsdxt:sample>
|
||||
<xsdxt:code type="application/json" href="../samples/rebuild.json" />
|
||||
</xsdxt:sample>
|
||||
</xsdxt:samples>
|
||||
</xsd:appinfo>
|
||||
</annotation>
|
||||
</element>
|
||||
<element name="resize" type="csapi:Resize">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Resizes a server.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<xsdxt:samples>
|
||||
<xsdxt:sample>
|
||||
<xsdxt:code type="application/xml" href="../samples/resize.xml" />
|
||||
</xsdxt:sample>
|
||||
<xsdxt:sample>
|
||||
<xsdxt:code type="application/json" href="../samples/resize.json" />
|
||||
</xsdxt:sample>
|
||||
</xsdxt:samples>
|
||||
</xsd:appinfo>
|
||||
</annotation>
|
||||
</element>
|
||||
<element name="confirmResize" type="csapi:ConfirmResize">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Confirms a resize action.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<xsdxt:samples>
|
||||
<xsdxt:sample>
|
||||
<xsdxt:code type="application/xml" href="../samples/confirmresize.xml" />
|
||||
</xsdxt:sample>
|
||||
<xsdxt:sample>
|
||||
<xsdxt:code type="application/json" href="../samples/confirmresize.json" />
|
||||
</xsdxt:sample>
|
||||
</xsdxt:samples>
|
||||
</xsd:appinfo>
|
||||
</annotation>
|
||||
</element>
|
||||
<element name="revertResize" type="csapi:RevertResize">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Reverts a resize action.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<xsdxt:samples>
|
||||
<xsdxt:sample>
|
||||
<xsdxt:code type="application/xml" href="../samples/revertresize.xml" />
|
||||
</xsdxt:sample>
|
||||
<xsdxt:sample>
|
||||
<xsdxt:code type="application/json" href="../samples/revertresize.json" />
|
||||
</xsdxt:sample>
|
||||
</xsdxt:samples>
|
||||
</xsd:appinfo>
|
||||
</annotation>
|
||||
</element>
|
||||
<element name="changePassword" type="csapi:ChangePassword">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Changes a server's password.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<xsdxt:samples>
|
||||
<xsdxt:sample>
|
||||
<xsdxt:code type="application/xml" href="../samples/changepassword.xml" />
|
||||
</xsdxt:sample>
|
||||
<xsdxt:sample>
|
||||
<xsdxt:code type="application/json" href="../samples/changepassword.json" />
|
||||
</xsdxt:sample>
|
||||
</xsdxt:samples>
|
||||
</xsd:appinfo>
|
||||
</annotation>
|
||||
</element>
|
||||
<element name="createImage" type="csapi:CreateImage">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The action creates a new image for the server.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<xsdxt:samples>
|
||||
<xsdxt:sample>
|
||||
<xsdxt:code type="application/xml" href="../samples/createimage.xml" />
|
||||
</xsdxt:sample>
|
||||
<xsdxt:sample>
|
||||
<xsdxt:code type="application/json" href="../samples/createimage.json" />
|
||||
</xsdxt:sample>
|
||||
</xsdxt:samples>
|
||||
</xsd:appinfo>
|
||||
</annotation>
|
||||
</element>
|
||||
|
||||
<!-- Complex Types -->
|
||||
|
||||
<complexType abstract="true" name="Action">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
This is the base type for all server actions. It is simply
|
||||
a marker abstract type used to differentiate an Action
|
||||
element from other elements.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
<anyAttribute namespace="##other" processContents="lax"/>
|
||||
</complexType>
|
||||
|
||||
<complexType name="Reboot">
|
||||
<complexContent>
|
||||
<extension base="csapi:Action">
|
||||
<sequence>
|
||||
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
|
||||
</sequence>
|
||||
<attribute name="type" type="csapi:RebootType" use="required">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The <a href="#type_RebootType" title="See definition
|
||||
of RebootType">type</a> of reboot to perform.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
</extension>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
|
||||
<complexType name="Rebuild">
|
||||
<complexContent>
|
||||
<extension base="csapi:Action">
|
||||
<sequence>
|
||||
<element name="metadata" type="csapi:Metadata" minOccurs="0">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
A collection of meta data items
|
||||
associated with the server. If not
|
||||
specified the original server metadata
|
||||
will be kept.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
</element>
|
||||
<element name="personality" type="csapi:Personality" minOccurs="0">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
A collection of small <a
|
||||
href="#type_File" title="See definition
|
||||
of file">files</a> used to personalize a
|
||||
new server instance. Exisiting server
|
||||
personality files are deleted by the
|
||||
rebuild process.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
</element>
|
||||
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
|
||||
</sequence>
|
||||
<attribute type="xsd:string" name="name" use="optional">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The name of the server. If not specified the
|
||||
original server name will be kept.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute type="xsd:string" name="adminPass" use="optional">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The server's administration password.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="imageRef" type="xsd:anyURI" use="required">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
A reference to an image to use for the
|
||||
rebuild. A local image need contain only an
|
||||
Image ID. External images must contian a
|
||||
link that provides the full path to the
|
||||
image resource. You must supply an image
|
||||
when rebuilding.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
</extension>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
|
||||
<complexType name="Resize">
|
||||
<complexContent>
|
||||
<extension base="csapi:Action">
|
||||
<sequence>
|
||||
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
|
||||
</sequence>
|
||||
<attribute name="flavorRef" type="xsd:anyURI" use="required">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
A reference to the flavor to convert to.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
</extension>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
|
||||
<complexType name="ConfirmResize">
|
||||
<complexContent>
|
||||
<extension base="csapi:Action">
|
||||
<sequence>
|
||||
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
|
||||
</sequence>
|
||||
</extension>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
|
||||
<complexType name="RevertResize">
|
||||
<complexContent>
|
||||
<extension base="csapi:Action" >
|
||||
<sequence>
|
||||
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
|
||||
</sequence>
|
||||
</extension>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
|
||||
<complexType name="ChangePassword">
|
||||
<complexContent>
|
||||
<extension base="csapi:Action" >
|
||||
<sequence>
|
||||
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
|
||||
</sequence>
|
||||
<attribute type="xsd:string" name="adminPass" use="required">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The server's administration password.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
</extension>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
|
||||
<complexType name="CreateImage">
|
||||
<complexContent>
|
||||
<extension base="csapi:Action" >
|
||||
<sequence>
|
||||
<element name="metadata" type="csapi:Metadata" minOccurs="0">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
A collection of meta data items
|
||||
associated with the image.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
</element>
|
||||
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
|
||||
</sequence>
|
||||
<attribute type="xsd:string" name="name" use="required">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
The name of the image to create.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
</extension>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
|
||||
<!-- Simple Types -->
|
||||
<simpleType name="RebootType">
|
||||
<restriction base="xsd:string">
|
||||
<enumeration value="HARD">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
A HARD reboot is equivalent to power cycling the server.
|
||||
The operating system is not allowed to gracefully
|
||||
shutdown.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
</enumeration>
|
||||
<enumeration value="SOFT">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
With a SOFT reboot, the operating system is signaled to
|
||||
restart. This allows for a graceful shutdown of all
|
||||
processes.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
</enumeration>
|
||||
</restriction>
|
||||
</simpleType>
|
||||
</schema>
|
||||
|
11
doc/src/docbkx/quantum-api-2.0/xsd/affinity-id.xjb
Normal file
11
doc/src/docbkx/quantum-api-2.0/xsd/affinity-id.xjb
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<bindings xmlns="http://java.sun.com/xml/ns/jaxb" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
version="2.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd"
|
||||
schemaLocation="affinity-id.xsd">
|
||||
<schemaBindings>
|
||||
<package name="com.rackspace.cloud.servers.api.extension.beans"/>
|
||||
</schemaBindings>
|
||||
</bindings>
|
39
doc/src/docbkx/quantum-api-2.0/xsd/affinity-id.xsd
Normal file
39
doc/src/docbkx/quantum-api-2.0/xsd/affinity-id.xsd
Normal file
@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?>
|
||||
|
||||
<schema
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:rsaide="http://docs.rackspacecloud.com/servers/api/ext/aide/v1.0"
|
||||
targetNamespace="http://docs.rackspacecloud.com/servers/api/ext/aide/v1.0"
|
||||
>
|
||||
|
||||
<element name="affinityId" type="rsaide:affinityId" />
|
||||
|
||||
<simpleType name="affinityId">
|
||||
<annotation>
|
||||
<documentation>
|
||||
An ID that identifies the proximity of customer slices.
|
||||
</documentation>
|
||||
</annotation>
|
||||
<restriction base="xsd:string" />
|
||||
</simpleType>
|
||||
|
||||
<simpleType name="ipv6AddressRangeValue">
|
||||
<annotation>
|
||||
<documentation>
|
||||
The IPv6 address range in CIDR notation of the server.
|
||||
</documentation>
|
||||
</annotation>
|
||||
<restriction base="xsd:string" />
|
||||
</simpleType>
|
||||
|
||||
<element name="ipv6AddressRange" type="rsaide:ipv6AddressRange" />
|
||||
|
||||
<complexType name="ipv6AddressRange">
|
||||
<attribute name="value" type="rsaide:ipv6AddressRangeValue"/>
|
||||
</complexType>
|
||||
|
||||
</schema>
|
11
doc/src/docbkx/quantum-api-2.0/xsd/api-common.xjb
Normal file
11
doc/src/docbkx/quantum-api-2.0/xsd/api-common.xjb
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<bindings xmlns="http://java.sun.com/xml/ns/jaxb" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:capi="http://docs.openstack.org/common/api/v1.0" version="2.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd"
|
||||
schemaLocation="api-common.xsd">
|
||||
<schemaBindings>
|
||||
<package name="com.rackspace.cloud.common.api.beans" />
|
||||
</schemaBindings>
|
||||
</bindings>
|
66
doc/src/docbkx/quantum-api-2.0/xsd/api-common.xsd
Normal file
66
doc/src/docbkx/quantum-api-2.0/xsd/api-common.xsd
Normal file
@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml-stylesheet type="text/xsl" href="../xslt/schema.xsl"?>
|
||||
|
||||
<!-- (C) 2011 OpenStack LLC., All Rights Reserved -->
|
||||
|
||||
<schema
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified"
|
||||
xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:capi="http://docs.openstack.org/common/api/v1.0"
|
||||
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="http://docs.openstack.org/common/api/v1.0"
|
||||
>
|
||||
<annotation>
|
||||
<xsd:appinfo
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<xsdxt:title>Open Stack Common API Schema Types 1.0</xsdxt:title>
|
||||
<xsdxt:link rev="index" href="extensions.xsd" />
|
||||
<xsdxt:link rev="index" href="limits.xsd" />
|
||||
<xsdxt:link rev="index" href="version.xsd" />
|
||||
</xsd:appinfo>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
This is the main index XML Schema document
|
||||
for Common API Schema Types Version 1.0.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
<include schemaLocation="extensions.xsd">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Types related to extensions.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
</include>
|
||||
<include schemaLocation="limits.xsd">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Types related to rate and absolute limits.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
</include>
|
||||
<include schemaLocation="version.xsd">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Types related to API version details.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
</include>
|
||||
</schema>
|
21
doc/src/docbkx/quantum-api-2.0/xsd/api.xjb
Normal file
21
doc/src/docbkx/quantum-api-2.0/xsd/api.xjb
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<bindings xmlns="http://java.sun.com/xml/ns/jaxb" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:csapi="http://docs.openstack.org/compute/api/v1.1"
|
||||
version="2.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd"
|
||||
schemaLocation="api.xsd">
|
||||
<globalBindings>
|
||||
<serializable />
|
||||
<javaType name="java.util.Calendar" xmlType="xsd:dateTime"
|
||||
parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime"
|
||||
printMethod="javax.xml.bind.DatatypeConverter.printDateTime"/>
|
||||
<javaType name="java.lang.Integer" xmlType="csapi:UUID"
|
||||
parseMethod="com.rackspace.cloud.servers.api.jaxb.TypeConverter.parseUUID"
|
||||
printMethod="com.rackspace.cloud.servers.api.jaxb.TypeConverter.printUUID"/>
|
||||
</globalBindings>
|
||||
<schemaBindings>
|
||||
<package name="com.rackspace.cloud.servers.api.beans" />
|
||||
</schemaBindings>
|
||||
</bindings>
|
103
doc/src/docbkx/quantum-api-2.0/xsd/api.xsd
Normal file
103
doc/src/docbkx/quantum-api-2.0/xsd/api.xsd
Normal file
@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml-stylesheet type="text/xsl" href="../xslt/schema.xsl"?>
|
||||
|
||||
<!-- (C) 2011 OpenStack LLC., All Rights Reserved -->
|
||||
|
||||
<schema
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified"
|
||||
xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:csapi="http://docs.openstack.org/compute/api/v1.1"
|
||||
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="http://docs.openstack.org/compute/api/v1.1"
|
||||
>
|
||||
<annotation>
|
||||
<xsd:appinfo
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<xsdxt:title>Open Stack Compute™ API Schema Types 1.1</xsdxt:title>
|
||||
<xsdxt:link rev="index" href="actions.xsd" />
|
||||
<xsdxt:link rev="index" href="common.xsd" />
|
||||
<xsdxt:link rev="index" href="faults.xsd" />
|
||||
<xsdxt:link rev="index" href="flavor.xsd" />
|
||||
<xsdxt:link rev="index" href="image.xsd" />
|
||||
<xsdxt:link rev="index" href="server.xsd" />
|
||||
</xsd:appinfo>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
This is the main index XML Schema document
|
||||
for the Open Stack Compute API Version 1.1.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
<include schemaLocation="server.xsd">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Servers and all internal Entities including Addresses and
|
||||
Files.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
</include>
|
||||
<include schemaLocation="image.xsd">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Types related to images.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
</include>
|
||||
<include schemaLocation="flavor.xsd">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Types related to flavors.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
</include>
|
||||
<include schemaLocation="actions.xsd">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Defines server actions: reboot, rebuild, resize...
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
</include>
|
||||
<include schemaLocation="metadata.xsd">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
Metadata for Server and Image.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
</include>
|
||||
<include schemaLocation="faults.xsd">
|
||||
<annotation>
|
||||
<xsd:documentation
|
||||
xml:lang="EN"
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>
|
||||
All fault types.
|
||||
</p>
|
||||
</xsd:documentation>
|
||||
</annotation>
|
||||
</include>
|
||||
</schema>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user