diff --git a/.travis.yml b/.travis.yml index 92dcd25..c1dc8ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,4 +7,6 @@ install: - pip install flake8 script: - - flake8 . + - flake8 . --exclude docs +notifications: + flowdock: a73d66c41c6e4406e1c47e042dfd2b59 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..838b2e6 --- /dev/null +++ b/Makefile @@ -0,0 +1,39 @@ +.PHONY: release dev instdev install files test docs prepare publish + +all: + @echo "make release - prepares a release and publishes it" + @echo "make test - run tox" + @echo "make dev - installs module and builds docs" + @echo "make instdev - installs module" + @echo "make install - install on local system" + @echo "make files - update changelog and todo files" + @echo "make docs - build docs" + @echo "make prepare - prepare module for release" + @echo "make publish - upload to pypi" + +release: test docs prepare publish + +dev: instdev docs + +instdev: + python setup.py develop + +install: + python setup.py install + +files: + grep '# TODO' -rn * --exclude-dir=docs --exclude-dir=build --exclude-dir=*.egg --exclude=TODO.md | sed 's/: \+#/: # /g;s/:#/: # /g' | sed -e 's/^/- /' | grep -v Makefile > TODO.md + git log --oneline --decorate --color > CHANGELOG + +test: + tox + +docs: + cd docs && make html + pandoc README.md -f markdown -t rst -s -o README.rst + +prepare: + python scripts/make-release.py + +publish: + python setup.py sdist upload \ No newline at end of file diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..56e3b2d --- /dev/null +++ b/README.rst @@ -0,0 +1,4 @@ +Cloudify REST Client +==================== + +Client for interacting with Cloudify's management machine. diff --git a/cloudify_rest_client/deployments.py b/cloudify_rest_client/deployments.py index 7249560..9dacaa0 100644 --- a/cloudify_rest_client/deployments.py +++ b/cloudify_rest_client/deployments.py @@ -122,7 +122,7 @@ def delete(self, deployment_id, ignore_live_nodes=False): """ Deletes the deployment whose id matches the provided deployment id. By default, deployment with live nodes deletion is not allowed and - this behavior can be changed using the ignore_live_nodes argument. + this behavior can be changed using the ignore_live_nodes argument. :param deployment_id: The deployment's to be deleted id. :param ignore_live_nodes: Determines whether to ignore live nodes. @@ -166,7 +166,7 @@ def execute(self, deployment_id, workflow_id, force=False): :param workflow_id: The workflow to be executed id. :param force: Determines whether to force the execution of the workflow in a case where there's an already running execution for this - deployment. + deployment. :return: The created execution. """ assert deployment_id diff --git a/cloudify_rest_client/node_instances.py b/cloudify_rest_client/node_instances.py index 2f25c24..06dbbb9 100644 --- a/cloudify_rest_client/node_instances.py +++ b/cloudify_rest_client/node_instances.py @@ -132,6 +132,7 @@ def list(self, deployment_id=None): """ Returns a list of node instances which belong to the deployment identified by the provided deployment id. + :param deployment_id: The deployment's id to list node instances for. :return: Node instances. :rtype: list diff --git a/cloudify_rest_client/nodes.py b/cloudify_rest_client/nodes.py index cf0bc3d..58ababc 100644 --- a/cloudify_rest_client/nodes.py +++ b/cloudify_rest_client/nodes.py @@ -119,6 +119,7 @@ def list(self, deployment_id=None): """ Returns a list of nodes which belong to the deployment identified by the provided deployment id. + :param deployment_id: The deployment's id to list nodes for. :return: Nodes. :rtype: list diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..61d9813 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,177 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# User-friendly check for sphinx-build +ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) +$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) +endif + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/cloudify-rest-client.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/cloudify-rest-client.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/cloudify-rest-client" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/cloudify-rest-client" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +xml: + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml + @echo + @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + +pseudoxml: + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml + @echo + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/docs/_build/doctrees/environment.pickle b/docs/_build/doctrees/environment.pickle new file mode 100644 index 0000000..1d095b5 Binary files /dev/null and b/docs/_build/doctrees/environment.pickle differ diff --git a/docs/_build/doctrees/index.doctree b/docs/_build/doctrees/index.doctree new file mode 100644 index 0000000..c559a87 Binary files /dev/null and b/docs/_build/doctrees/index.doctree differ diff --git a/docs/_build/html/.buildinfo b/docs/_build/html/.buildinfo new file mode 100644 index 0000000..bb56544 --- /dev/null +++ b/docs/_build/html/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. +config: 8a84c95186b9e00127fdb245dd06aff9 +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_build/html/_modules/cloudify_rest_client/blueprints.html b/docs/_build/html/_modules/cloudify_rest_client/blueprints.html new file mode 100644 index 0000000..089a313 --- /dev/null +++ b/docs/_build/html/_modules/cloudify_rest_client/blueprints.html @@ -0,0 +1,344 @@ + + + + + + + + + + cloudify_rest_client.blueprints — cloudify-rest-client 3.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+
+ +
+
+
+ +

Source code for cloudify_rest_client.blueprints

+########
+# Copyright (c) 2014 GigaSpaces Technologies Ltd. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+#    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    * See the License for the specific language governing permissions and
+#    * limitations under the License.
+
+__author__ = 'idanmo'
+
+
+import os
+import tempfile
+import shutil
+import requests
+import tarfile
+import urllib
+
+from os.path import expanduser
+
+
+
[docs]class Blueprint(dict): + + def __init__(self, blueprint): + self.update(blueprint) + + @property +
[docs] def id(self): + """ + :return: The identifier of the blueprint. + """ + return self['id'] + +
+
[docs]class BlueprintsClient(object): + + CONTENT_DISPOSITION_HEADER = 'content-disposition' + + def __init__(self, api): + self.api = api + + @staticmethod + def _tar_blueprint(blueprint_path, tempdir): + blueprint_path = expanduser(blueprint_path) + blueprint_name = os.path.basename(os.path.splitext(blueprint_path)[0]) + blueprint_directory = os.path.dirname(blueprint_path) + if not blueprint_directory: + # blueprint path only contains a file name from the local directory + blueprint_directory = os.getcwd() + tar_path = '{0}/{1}.tar.gz'.format(tempdir, blueprint_name) + with tarfile.open(tar_path, "w:gz") as tar: + tar.add(blueprint_directory, + arcname=os.path.basename(blueprint_directory)) + return tar_path + + def _upload(self, tar_file_obj, + application_file_name=None, + blueprint_id=None): + query_params = {} + if application_file_name is not None: + query_params['application_file_name'] = \ + urllib.quote(application_file_name) + + def file_gen(): + buffer_size = 8192 + while True: + read_bytes = tar_file_obj.read(buffer_size) + yield read_bytes + if len(read_bytes) < buffer_size: + return + + if blueprint_id is not None: + uri = '/blueprints/{0}'.format(blueprint_id) + url = '{0}{1}'.format(self.api.url, uri) + response = requests.put(url, params=query_params, data=file_gen()) + else: + url = '{0}/blueprints'.format(self.api.url) + response = requests.post(url, params=query_params, data=file_gen()) + self.api.verify_response_status(response, 201) + return response.json() + +
[docs] def list(self): + """ + Returns a list of currently stored blueprints. + + :return: Blueprints list. + """ + response = self.api.get('/blueprints') + return [Blueprint(item) for item in response] +
+
[docs] def upload(self, blueprint_path, blueprint_id): + """ + Uploads a blueprint to Cloudify's manager. + + :param blueprint_path: Main blueprint yaml file path. + :param blueprint_id: Id of the uploaded blueprint (optional). + :return: Created blueprint. + + Blueprint path should point to the main yaml file of the blueprint + to be uploaded. Its containing folder will be packed to an archive + and get uploaded to the manager. + An optional blueprint_id parameter is available for specifying the + blueprint's unique Id. If not specified, blueprint id will be + determined after parsing the blueprint's yaml file. + + """ + tempdir = tempfile.mkdtemp() + try: + tar_path = self._tar_blueprint(blueprint_path, tempdir) + application_file = os.path.basename(blueprint_path) + + with open(tar_path, 'rb') as f: + blueprint = self._upload( + f, + application_file_name=application_file, + blueprint_id=blueprint_id) + return Blueprint(blueprint) + finally: + shutil.rmtree(tempdir) +
+
[docs] def get(self, blueprint_id): + """ + Gets a blueprint by its id. + + :param blueprint_id: Blueprint's id to get. + :return: The blueprint. + """ + assert blueprint_id + response = self.api.get('/blueprints/{0}'.format(blueprint_id)) + return Blueprint(response) +
+
[docs] def get_source(self, blueprint_id): + """ + Gets a blueprint's source by the blueprint's id. + + :param blueprint_id: Blueprint's id to get the source for. + :return: The blueprint's source. + """ + assert blueprint_id + return self.api.get('/blueprints/{0}/source'.format(blueprint_id)) +
+
[docs] def delete(self, blueprint_id): + """ + Deletes the blueprint whose id matches the provided blueprint id. + + :param blueprint_id: The id of the blueprint to be deleted. + :return: Deleted blueprint. + """ + assert blueprint_id + response = self.api.delete('/blueprints/{0}'.format(blueprint_id)) + return Blueprint(response) +
+
[docs] def download(self, blueprint_id, output_file=None): + """ + Downloads a previously uploaded blueprint from Cloudify's manager. + + :param blueprint_id: The Id of the blueprint to be downloaded. + :param output_file: The file path of the downloaded blueprint file + (optional) + :return: The file path of the downloaded blueprint. + """ + url = '{0}{1}'.format(self.api.url, + '/blueprints/{0}/archive'.format(blueprint_id)) + response = requests.get(url, stream=True) + self.api.verify_response_status(response, 200) + + if not output_file: + if self.CONTENT_DISPOSITION_HEADER not in response.headers: + raise RuntimeError( + 'Cannot determine attachment filename: {0} header not' + ' found in response headers'.format( + self.CONTENT_DISPOSITION_HEADER)) + output_file = response.headers[ + self.CONTENT_DISPOSITION_HEADER].split('filename=')[1] + + if os.path.exists(output_file): + raise OSError("Output file '%s' already exists" % output_file) + + with open(output_file, 'wb') as f: + for chunk in response.iter_content(chunk_size=8096): + if chunk: + f.write(chunk) + f.flush() + + return output_file
+
+ +
+ +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/_modules/cloudify_rest_client/client.html b/docs/_build/html/_modules/cloudify_rest_client/client.html new file mode 100644 index 0000000..774c969 --- /dev/null +++ b/docs/_build/html/_modules/cloudify_rest_client/client.html @@ -0,0 +1,277 @@ + + + + + + + + + + cloudify_rest_client.client — cloudify-rest-client 3.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+
+ +
+
+
+ +

Source code for cloudify_rest_client.client

+########
+# Copyright (c) 2014 GigaSpaces Technologies Ltd. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+#    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    * See the License for the specific language governing permissions and
+#    * limitations under the License.
+
+__author__ = 'idanmo'
+
+import requests
+import json
+
+from cloudify_rest_client.blueprints import BlueprintsClient
+from cloudify_rest_client.deployments import DeploymentsClient
+from cloudify_rest_client.executions import ExecutionsClient
+from cloudify_rest_client.nodes import NodesClient
+from cloudify_rest_client.node_instances import NodeInstancesClient
+from cloudify_rest_client.events import EventsClient
+from cloudify_rest_client.exceptions import CloudifyClientError
+
+
+
[docs]class HTTPClient(object): + + def __init__(self, host, port=80): + self.port = port + self.host = host + self.url = 'http://{0}:{1}'.format(host, port) + + @staticmethod + def _raise_client_error(response, url=None): + try: + message = response.json()['message'] + except Exception: + message = response.content + if url: + message = '{0} [{1}]'.format(message, url) + error_msg = '{0}: {1}'.format(response.status_code, message) + raise CloudifyClientError(error_msg) + +
[docs] def verify_response_status(self, response, expected_code=200): + if response.status_code != expected_code: + self._raise_client_error(response) +
+
[docs] def do_request(self, + requests_method, + uri, + data=None, + params=None, + expected_status_code=200): + request_url = '{0}{1}'.format(self.url, uri) + body = json.dumps(data) if data else None + response = requests_method(request_url, + data=body, + params=params, + headers={ + 'Content-type': 'application/json' + }) + if response.status_code != expected_status_code: + self._raise_client_error(response, request_url) + return response.json() +
+
[docs] def get(self, uri, data=None, params=None, expected_status_code=200): + return self.do_request(requests.get, + uri, + data=data, + params=params, + expected_status_code=expected_status_code) +
+
[docs] def put(self, uri, data=None, params=None, expected_status_code=200): + return self.do_request(requests.put, + uri, + data=data, + params=params, + expected_status_code=expected_status_code) +
+
[docs] def patch(self, uri, data=None, params=None, expected_status_code=200): + return self.do_request(requests.patch, + uri, + data=data, + params=params, + expected_status_code=expected_status_code) +
+
[docs] def post(self, uri, data=None, params=None, expected_status_code=200): + return self.do_request(requests.post, + uri, + data=data, + params=params, + expected_status_code=expected_status_code) +
+
[docs] def delete(self, uri, data=None, params=None, expected_status_code=200): + return self.do_request(requests.delete, + uri, + data=data, + params=params, + expected_status_code=expected_status_code) + +
+
[docs]class CloudifyClient(object): + """ + Cloudify's management client. + + """ + def __init__(self, host, port=80): + """ + Creates a Cloudify client with the provided host and optional port. + + :param host: Host of Cloudify's management machine. + :param port: Port of REST API service on management machine. + :return: Cloudify client instance. + """ + self._client = HTTPClient(host, port) + self.blueprints = BlueprintsClient(self._client) + self.deployments = DeploymentsClient(self._client) + self.executions = ExecutionsClient(self._client) + self.nodes = NodesClient(self._client) + self.node_instances = NodeInstancesClient(self._client) + self.events = EventsClient(self._client)
+
+ +
+ +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/_modules/cloudify_rest_client/deployments.html b/docs/_build/html/_modules/cloudify_rest_client/deployments.html new file mode 100644 index 0000000..fa53ef2 --- /dev/null +++ b/docs/_build/html/_modules/cloudify_rest_client/deployments.html @@ -0,0 +1,337 @@ + + + + + + + + + + cloudify_rest_client.deployments — cloudify-rest-client 3.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+
+
    +
  • Docs »
  • + +
  • Module code »
  • + +
  • cloudify_rest_client.deployments
  • +
  • + +
  • +
+
+
+
+ +

Source code for cloudify_rest_client.deployments

+########
+# Copyright (c) 2014 GigaSpaces Technologies Ltd. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+#    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    * See the License for the specific language governing permissions and
+#    * limitations under the License.
+
+__author__ = 'idanmo'
+
+
+from cloudify_rest_client.executions import Execution
+
+
+
[docs]class Deployment(dict): + """ + Cloudify deployment. + """ + + def __init__(self, deployment): + self.update(deployment) + + @property +
[docs] def id(self): + """ + :return: The identifier of the deployment. + """ + return self['id'] +
+ @property +
[docs] def blueprint_id(self): + """ + :return: The identifier of the blueprint this deployment belongs to. + """ + return self['blueprint_id'] + +
+
[docs]class Workflows(dict): + + def __init__(self, workflows): + self.update(workflows) + self['workflows'] = [Workflow(item) for item in self['workflows']] + + @property +
[docs] def blueprint_id(self): + return self['blueprint_id'] +
+ @property +
[docs] def deployment_id(self): + return self['deployment_id'] +
+ @property +
[docs] def workflows(self): + return self['workflows'] + +
+
[docs]class Workflow(dict): + + def __init__(self, workflow): + self.update(workflow) + + @property +
[docs] def id(self): + return self['name'] +
+ @property +
[docs] def name(self): + return self['name'] + +
+
[docs]class DeploymentsClient(object): + + def __init__(self, api): + self.api = api + +
[docs] def list(self): + """ + Returns a list of all deployments. + + :return: Deployments list. + """ + response = self.api.get('/deployments') + return [Deployment(item) for item in response] +
+
[docs] def get(self, deployment_id): + """ + Returns a deployment by its id. + + :param deployment_id: Id of the deployment to get. + :return: Deployment. + """ + assert deployment_id + response = self.api.get('/deployments/{0}'.format(deployment_id)) + return Deployment(response) +
+
[docs] def create(self, blueprint_id, deployment_id): + """ + Creates a new deployment for the provided blueprint id and + deployment id. + + :param blueprint_id: Blueprint id to create a deployment of. + :param deployment_id: Deployment id of the new created deployment. + :return: The created deployment. + """ + assert blueprint_id + assert deployment_id + data = { + 'blueprint_id': blueprint_id + } + uri = '/deployments/{0}'.format(deployment_id) + response = self.api.put(uri, data, expected_status_code=201) + return Deployment(response) +
+
[docs] def delete(self, deployment_id, ignore_live_nodes=False): + """ + Deletes the deployment whose id matches the provided deployment id. + By default, deployment with live nodes deletion is not allowed and + this behavior can be changed using the ignore_live_nodes argument. + + :param deployment_id: The deployment's to be deleted id. + :param ignore_live_nodes: Determines whether to ignore live nodes. + :return: The deleted deployment. + """ + assert deployment_id + params = {'ignore_live_nodes': 'true'} if ignore_live_nodes else None + response = self.api.delete('/deployments/{0}'.format(deployment_id), + params=params) + return Deployment(response) +
+
[docs] def list_executions(self, deployment_id): + """ + Returns a list of executions for the provided deployment's id. + + :param deployment_id: Deployment id to get a list of executions for. + :return: List of executions. + """ + assert deployment_id + uri = '/deployments/{0}/executions'.format(deployment_id) + response = self.api.get(uri) + return [Execution(item) for item in response] +
+
[docs] def list_workflows(self, deployment_id): + """ + Returns a list of available workflows for the provided deployment's id. + + :param deployment_id: Deployment id to get a list of workflows for. + :return: Workflows list. + """ + assert deployment_id + uri = '/deployments/{0}/workflows'.format(deployment_id) + response = self.api.get(uri) + return Workflows(response) +
+
[docs] def execute(self, deployment_id, workflow_id, force=False): + """ + Executes a deployment's workflow whose id is provided. + + :param deployment_id: The deployment's id to execute a workflow for. + :param workflow_id: The workflow to be executed id. + :param force: Determines whether to force the execution of the workflow + in a case where there's an already running execution for this + deployment. + :return: The created execution. + """ + assert deployment_id + assert workflow_id + data = { + 'workflow_id': workflow_id + } + params = { + 'force': str(force).lower() + } + uri = '/deployments/{0}/executions'.format(deployment_id) + response = self.api.post(uri, + data=data, + params=params, + expected_status_code=201) + return Execution(response)
+
+ +
+ +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/_modules/cloudify_rest_client/events.html b/docs/_build/html/_modules/cloudify_rest_client/events.html new file mode 100644 index 0000000..6ef1fc9 --- /dev/null +++ b/docs/_build/html/_modules/cloudify_rest_client/events.html @@ -0,0 +1,219 @@ + + + + + + + + + + cloudify_rest_client.events — cloudify-rest-client 3.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+
+ +
+
+
+ +

Source code for cloudify_rest_client.events

+########
+# Copyright (c) 2014 GigaSpaces Technologies Ltd. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+#    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    * See the License for the specific language governing permissions and
+#    * limitations under the License.
+
+__author__ = 'idanmo'
+
+
+
[docs]class EventsClient(object): + + def __init__(self, api): + self.api = api + + @staticmethod + def _create_events_query(execution_id, include_logs): + query = { + "bool": { + "must": [ + {"match": {"context.execution_id": execution_id}}, + ] + } + } + match_cloudify_event = {"match": {"type": "cloudify_event"}} + if include_logs: + match_cloudify_log = {"match": {"type": "cloudify_log"}} + query['bool']['should'] = [ + match_cloudify_event, match_cloudify_log + ] + else: + query['bool']['must'].append(match_cloudify_event) + return query + +
[docs] def get(self, + execution_id, + from_event=0, + batch_size=100, + include_logs=False): + """ + Returns event for the provided execution id. + + :param execution_id: Id of execution to get events for. + :param from_event: Index of first event to retrieve on pagination. + :param batch_size: Maximum number of events to retrieve per call. + :param include_logs: Whether to also get logs. + :return: Events list and total number of currently available + events (tuple). + """ + body = { + "from": from_event, + "size": batch_size, + "sort": [{"@timestamp": {"order": "asc"}}], + "query": self._create_events_query(execution_id, include_logs) + } + response = self.api.get('/events', data=body) + events = map(lambda x: x['_source'], response['hits']['hits']) + total_events = response['hits']['total'] + return events, total_events
+
+ +
+ +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/_modules/cloudify_rest_client/exceptions.html b/docs/_build/html/_modules/cloudify_rest_client/exceptions.html new file mode 100644 index 0000000..fef5d1a --- /dev/null +++ b/docs/_build/html/_modules/cloudify_rest_client/exceptions.html @@ -0,0 +1,177 @@ + + + + + + + + + + cloudify_rest_client.exceptions — cloudify-rest-client 3.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+
+ +
+
+
+ +

Source code for cloudify_rest_client.exceptions

+########
+# Copyright (c) 2014 GigaSpaces Technologies Ltd. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+#    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    * See the License for the specific language governing permissions and
+#    * limitations under the License.
+
+__author__ = 'idanmo'
+
+
+
[docs]class CloudifyClientError(Exception): + + def __init__(self, message): + self.message = message + + def __str__(self): + return self.message
+
+ +
+ +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/_modules/cloudify_rest_client/executions.html b/docs/_build/html/_modules/cloudify_rest_client/executions.html new file mode 100644 index 0000000..8dd0a03 --- /dev/null +++ b/docs/_build/html/_modules/cloudify_rest_client/executions.html @@ -0,0 +1,264 @@ + + + + + + + + + + cloudify_rest_client.executions — cloudify-rest-client 3.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+
+ +
+
+
+ +

Source code for cloudify_rest_client.executions

+########
+# Copyright (c) 2014 GigaSpaces Technologies Ltd. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+#    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    * See the License for the specific language governing permissions and
+#    * limitations under the License.
+
+__author__ = 'idanmo'
+
+
+
[docs]class Execution(dict): + """ + Cloudify workflow execution. + """ + + def __init__(self, execution): + self.update(execution) + + @property +
[docs] def id(self): + """ + :return: The execution's id. + """ + return self['id'] +
+ @property +
[docs] def status(self): + """ + :return: The execution's status. + """ + return self['status'] +
+ @property +
[docs] def error(self): + """ + :return: The execution error in a case of failure, otherwise None. + """ + return self['error'] +
+ @property +
[docs] def workflow_id(self): + """ + :return: The id of the workflow this execution represents. + """ + return self['workflow_id'] + +
+
[docs]class ExecutionsClient(object): + + def __init__(self, api): + self.api = api + +
[docs] def list(self, deployment_id): + """ + Returns a list of executions for the provided deployment's id. + + :param deployment_id: Deployment id to get a list of executions for. + :return: Executions list. + """ + assert deployment_id + uri = '/deployments/{0}/executions'.format(deployment_id) + response = self.api.get(uri) + return [Execution(item) for item in response] +
+
[docs] def get(self, execution_id): + """ + Get execution by its id. + + :param execution_id: Id of the execution to get. + :return: Execution. + """ + assert execution_id + uri = '/executions/{0}'.format(execution_id) + response = self.api.get(uri) + return Execution(response) +
+
[docs] def update(self, execution_id, status, error=None): + """ + Update execution with the provided status and optional error. + + :param execution_id: Id of the execution to update. + :param status: Updated execution status. + :param error: Updated execution error (optional). + :return: Updated execution. + """ + + uri = '/executions/{0}'.format(execution_id) + params = {'status': status} + if error: + params['error'] = error + response = self.api.patch(uri, data=params) + return Execution(response) +
+
[docs] def cancel(self, execution_id): + """ + Cancels the execution who matches the provided execution id. + :param execution_id: Id of the execution to cancel. + :return: Cancelled execution. + """ + uri = '/executions/{0}'.format(execution_id) + response = self.api.post(uri, + data={'action': 'cancel'}, + expected_status_code=201) + return Execution(response)
+
+ +
+ +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/_modules/cloudify_rest_client/node_instances.html b/docs/_build/html/_modules/cloudify_rest_client/node_instances.html new file mode 100644 index 0000000..b1e1b72 --- /dev/null +++ b/docs/_build/html/_modules/cloudify_rest_client/node_instances.html @@ -0,0 +1,294 @@ + + + + + + + + + + cloudify_rest_client.node_instances — cloudify-rest-client 3.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+
+
    +
  • Docs »
  • + +
  • Module code »
  • + +
  • cloudify_rest_client.node_instances
  • +
  • + +
  • +
+
+
+
+ +

Source code for cloudify_rest_client.node_instances

+########
+# Copyright (c) 2014 GigaSpaces Technologies Ltd. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+#    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    * See the License for the specific language governing permissions and
+#    * limitations under the License.
+
+__author__ = 'idanmo'
+
+
+
[docs]class NodeInstance(dict): + """ + Cloudify node instance. + """ + + def __init__(self, node_instance): + self.update(node_instance) + + @property +
[docs] def id(self): + """ + :return: The identifier of the node instance. + """ + return self['id'] +
+ @property +
[docs] def node_id(self): + """ + :return: The identifier of the node whom this is in instance of. + """ + return self['node_id'] +
+ @property +
[docs] def relationships(self): + """ + :return: The node instance relationships. + """ + return self['relationships'] +
+ @property +
[docs] def host_id(self): + """ + :return: The node instance host_id. + """ + return self['host_id'] +
+ @property +
[docs] def deployment_id(self): + """ + :return: The deployment id the node instance belongs to. + """ + return self['deployment_id'] +
+ @property +
[docs] def runtime_properties(self): + """ + :return: The runtime properties of the node instance. + """ + return self['runtime_properties'] +
+ @property +
[docs] def state(self): + """ + :return: The current state of the node instance. + """ + return self['state'] +
+ @property +
[docs] def version(self): + """ + :return: The current version of the node instance + (used for optimistic locking on update) + """ + return self['version'] + +
+
[docs]class NodeInstancesClient(object): + + def __init__(self, api): + self.api = api + + @staticmethod + def _get_node_instance_uri(node_instance_id): + return '/node-instances/{0}'.format(node_instance_id) + +
[docs] def get(self, node_instance_id): + """ + Returns the node instance for the provided node instance id. + + :param node_instance_id: The identifier of the node instance to get. + :return: The retrieved node instance. + """ + assert node_instance_id + uri = self._get_node_instance_uri(node_instance_id) + response = self.api.get(uri) + return NodeInstance(response) +
+
[docs] def update(self, + node_instance_id, + state=None, + runtime_properties=None, + version=0): + """ + Update node instance with the provided state & runtime_properties. + + :param node_instance_id: The identifier of the node instance to update. + :param state: The updated state. + :param runtime_properties: The updated runtime properties. + :param version: Current version value of this node instance in + Cloudify's storage (used for optimistic locking). + :return: The updated node instance. + """ + assert node_instance_id + uri = self._get_node_instance_uri(node_instance_id) + data = {'version': version} + if runtime_properties: + data['runtime_properties'] = runtime_properties + if state: + data['state'] = state + response = self.api.patch(uri, data=data) + return NodeInstance(response) +
+
[docs] def list(self, deployment_id=None): + """ + Returns a list of node instances which belong to the deployment + identified by the provided deployment id. + + :param deployment_id: The deployment's id to list node instances for. + :return: Node instances. + :rtype: list + """ + params = {'deployment_id': deployment_id} if deployment_id else None + response = self.api.get('/node-instances', params=params) + return [NodeInstance(item) for item in response]
+
+ +
+ +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/_modules/cloudify_rest_client/nodes.html b/docs/_build/html/_modules/cloudify_rest_client/nodes.html new file mode 100644 index 0000000..343e260 --- /dev/null +++ b/docs/_build/html/_modules/cloudify_rest_client/nodes.html @@ -0,0 +1,281 @@ + + + + + + + + + + cloudify_rest_client.nodes — cloudify-rest-client 3.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+
+ +
+
+
+ +

Source code for cloudify_rest_client.nodes

+########
+# Copyright (c) 2014 GigaSpaces Technologies Ltd. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+#    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    * See the License for the specific language governing permissions and
+#    * limitations under the License.
+
+__author__ = 'idanmo'
+
+
+
[docs]class Node(dict): + """ + Cloudify node. + """ + + def __init__(self, node_instance): + self.update(node_instance) + + @property +
[docs] def id(self): + """ + :return: The identifier of the node. + """ + return self['id'] +
+ @property +
[docs] def deployment_id(self): + """ + :return: The deployment id the node belongs to. + """ + return self['deployment_id'] +
+ @property +
[docs] def properties(self): + """ + :return: The static properties of the node. + """ + return self['properties'] +
+ @property +
[docs] def operations(self): + """ + :return: The node operations mapped to plugins. + :rtype: dict + """ + return self['operations'] +
+ @property +
[docs] def relationships(self): + """ + :return: The node relationships with other nodes. + :rtype: list + """ + return self['relationships'] +
+ @property +
[docs] def blueprint_id(self): + """ + :return: The id of the blueprint this node belongs to. + :rtype: str + """ + return self['blueprint_id'] +
+ @property +
[docs] def plugins(self): + """ + :return: The plugins this node has operations mapped to. + :rtype: dict + """ + return self['plugins'] +
+ @property +
[docs] def number_of_instances(self): + """ + :return: The number of instances this node has. + :rtype: int + """ + return int(self['number_of_instances']) +
+ @property +
[docs] def host_id(self): + """ + :return: The id of the node instance which hosts this node. + :rtype: str + """ + return self['host_id'] +
+ @property +
[docs] def type_hierarchy(self): + """ + :return: The type hierarchy of this node. + :rtype: list + """ + return self['type_hierarchy'] +
+ @property +
[docs] def type(self): + """ + :return: The type of this node. + :rtype: str + """ + return self['type'] + +
+
[docs]class NodesClient(object): + + def __init__(self, api): + self.api = api + +
[docs] def list(self, deployment_id=None): + """ + Returns a list of nodes which belong to the deployment identified + by the provided deployment id. + + :param deployment_id: The deployment's id to list nodes for. + :return: Nodes. + :rtype: list + """ + params = {'deployment_id': deployment_id} if deployment_id else None + response = self.api.get('/nodes', params=params) + return [Node(item) for item in response]
+
+ +
+ +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/_modules/cosmo_cli/cosmo_cli.html b/docs/_build/html/_modules/cosmo_cli/cosmo_cli.html new file mode 100644 index 0000000..73b6977 --- /dev/null +++ b/docs/_build/html/_modules/cosmo_cli/cosmo_cli.html @@ -0,0 +1,1843 @@ + + + + + + + + + + cosmo_cli.cosmo_cli — cloudify-rest-client 3.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+
+ +
+
+
+ +

Source code for cosmo_cli.cosmo_cli

+########
+# Copyright (c) 2013 GigaSpaces Technologies Ltd. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+############
+
+import messages
+
+__author__ = 'ran'
+
+# Standard
+import argparse
+import argcomplete
+import imp
+import sys
+import os
+import traceback
+import yaml
+import json
+import urlparse
+import urllib
+import shutil
+from copy import deepcopy
+from contextlib import contextmanager
+import logging
+import logging.config
+import config
+from fabric.api import env, local
+from fabric.context_managers import settings
+
+# Project
+from cosmo_manager_rest_client.cosmo_manager_rest_client \
+    import CosmoManagerRestClient
+from cosmo_manager_rest_client.cosmo_manager_rest_client \
+    import (CosmoManagerRestCallError,
+            CosmoManagerRestCallTimeoutError,
+            CosmoManagerRestCallHTTPError)
+from dsl_parser.parser import parse_from_path, DSLParsingException
+
+
+output_level = logging.INFO
+CLOUDIFY_WD_SETTINGS_FILE_NAME = '.cloudify'
+
+CONFIG_FILE_NAME = 'cloudify-config.yaml'
+DEFAULTS_CONFIG_FILE_NAME = 'cloudify-config.defaults.yaml'
+
+AGENT_MIN_WORKERS = 2
+AGENT_MAX_WORKERS = 5
+AGENT_KEY_PATH = '~/.ssh/cloudify-agents-kp.pem'
+REMOTE_EXECUTION_PORT = 22
+
+# http://stackoverflow.com/questions/8144545/turning-off-logging-in-paramiko
+logging.getLogger("paramiko").setLevel(logging.WARNING)
+logging.getLogger("requests.packages.urllib3.connectionpool").setLevel(
+    logging.ERROR)
+
+
+
[docs]def init_logger(): + """ + initializes a logger to be used throughout the cli + can be used by provider codes. + + :rtype: `tupel` with 2 loggers, one for users (writes to console and file), + and the other for archiving (writes to file only). + """ + if os.path.isfile(config.LOG_DIR): + sys.exit('file {0} exists - cloudify log directory cannot be created ' + 'there. please remove the file and try again.' + .format(config.LOG_DIR)) + try: + logfile = config.LOGGER['handlers']['file']['filename'] + d = os.path.dirname(logfile) + if not os.path.exists(d): + os.makedirs(d) + logging.config.dictConfig(config.LOGGER) + lgr = logging.getLogger('main') + lgr.setLevel(logging.INFO) + flgr = logging.getLogger('file') + flgr.setLevel(logging.DEBUG) + return (lgr, flgr) + except ValueError: + sys.exit('could not initialize logger.' + ' verify your logger config' + ' and permissions to write to {0}' + .format(logfile)) + +# initialize logger
+lgr, flgr = init_logger() + + +
[docs]def main(): + args = _parse_args(sys.argv[1:]) + args.handler(args) + +
+def _parse_args(args): + """ + Parses the arguments using the Python argparse library. + Generates shell autocomplete using the argcomplete library. + + :param list args: arguments from cli + :rtype: `python argument parser` + """ + # main parser + parser = argparse.ArgumentParser( + description='Manages Cloudify in different Cloud Environments') + + subparsers = parser.add_subparsers() + parser_status = subparsers.add_parser( + 'status', + help='Show a management server\'s status' + ) + parser_use = subparsers.add_parser( + 'use', + help='Use/switch to the specified management server' + ) + parser_init = subparsers.add_parser( + 'init', + help='Initialize configuration files for a specific cloud provider' + + ) + parser_bootstrap = subparsers.add_parser( + 'bootstrap', + help='Bootstrap Cloudify on the currently active provider' + ) + parser_teardown = subparsers.add_parser( + 'teardown', + help='Teardown Cloudify' + ) + parser_blueprints = subparsers.add_parser( + 'blueprints', + help='Manages Cloudify\'s Blueprints' + ) + parser_deployments = subparsers.add_parser( + 'deployments', + help='Manages and Executes Cloudify\'s Deployments' + ) + parser_executions = subparsers.add_parser( + 'executions', + help='Manages Cloudify Executions' + ) + parser_workflows = subparsers.add_parser( + 'workflows', + help='Manages Deployment Workflows' + ) + parser_events = subparsers.add_parser( + 'events', + help='Displays Events for different executions' + ) + parser_dev = subparsers.add_parser( + 'dev' + ) + + # status subparser + _add_management_ip_optional_argument_to_parser(parser_status) + _set_handler_for_command(parser_status, _status) + + # use subparser + parser_use.add_argument( + 'management_ip', + metavar='MANAGEMENT_IP', + type=str, + help='The cloudify management server ip address' + ) + parser_use.add_argument( + '-a', '--alias', + dest='alias', + metavar='ALIAS', + type=str, + help='An alias for the management server' + ) + _add_force_optional_argument_to_parser( + parser_use, + 'A flag indicating authorization to overwrite the alias if it ' + 'already exists' + ) + _set_handler_for_command(parser_use, _use_management_server) + + # init subparser + parser_init.add_argument( + 'provider', + metavar='PROVIDER', + type=str, + help='Command for initializing configuration files for a' + ' specific provider' + ) + parser_init.add_argument( + '-t', '--target-dir', + dest='target_dir', + metavar='TARGET_DIRECTORY', + type=str, + default=os.getcwd(), + help='The target directory to be initialized for the given provider' + ) + parser_init.add_argument( + '-r', '--reset-config', + dest='reset_config', + action='store_true', + help='A flag indicating overwriting existing configuration is allowed' + ) + parser_init.add_argument( + '--install', + dest='install', + metavar='PROVIDER_MODULE_URL', + type=str, + help='url to provider module' + ) + parser_init.add_argument( + '--creds', + dest='creds', + metavar='PROVIDER_CREDENTIALS', + type=str, + help='a comma separated list of key=value credentials' + ) + _set_handler_for_command(parser_init, _init_cosmo) + + # bootstrap subparser + parser_bootstrap.add_argument( + '-c', '--config-file', + dest='config_file_path', + metavar='CONFIG_FILE', + default=None, + type=str, + help='Path to a provider configuration file' + ) + parser_bootstrap.add_argument( + '--keep-up-on-failure', + dest='keep_up', + action='store_true', + help='A flag indicating that even if bootstrap fails,' + ' the instance will remain running' + ) + parser_bootstrap.add_argument( + '--dev-mode', + dest='dev_mode', + action='store_true', + help='A flag indicating that bootstrap will be run in dev-mode,' + ' allowing to choose specific branches to run with' + ) + parser_bootstrap.add_argument( + '--skip-validations', + dest='skip_validations', + action='store_true', + help='A flag indicating that bootstrap will be run without,' + ' validating resources prior to bootstrapping the manager' + ) + parser_bootstrap.add_argument( + '--validate-only', + dest='validate_only', + action='store_true', + help='A flag indicating that validations will run without,' + ' actually performing the bootstrap process.' + ) + _set_handler_for_command(parser_bootstrap, _bootstrap_cosmo) + + # teardown subparser + parser_teardown.add_argument( + '-c', '--config-file', + dest='config_file_path', + metavar='CONFIG_FILE', + default=None, + type=str, + help='Path to a provider configuration file' + ) + parser_teardown.add_argument( + '--ignore-deployments', + dest='ignore_deployments', + action='store_true', + help='A flag indicating confirmation for teardown even if there ' + 'exist active deployments' + ) + parser_teardown.add_argument( + '--ignore-validation', + dest='ignore_validation', + action='store_true', + help='A flag indicating confirmation for teardown even if there ' + 'are validation conflicts' + ) + _add_force_optional_argument_to_parser( + parser_teardown, + 'A flag indicating confirmation for the teardown request') + _add_management_ip_optional_argument_to_parser(parser_teardown) + _set_handler_for_command(parser_teardown, _teardown_cosmo) + + # blueprints subparser + blueprints_subparsers = parser_blueprints.add_subparsers() + + parser_blueprints_upload = blueprints_subparsers.add_parser( + 'upload', + help='command for uploading a blueprint to the management server' + ) + parser_blueprints_download = blueprints_subparsers.add_parser( + 'download', + help='command for downloading a blueprint from the management server' + ) + parser_blueprints_list = blueprints_subparsers.add_parser( + 'list', + help='command for listing all uploaded blueprints' + ) + parser_blueprints_delete = blueprints_subparsers.add_parser( + 'delete', + help='command for deleting an uploaded blueprint' + ) + parser_blueprints_validate = blueprints_subparsers.add_parser( + 'validate', + help='command for validating a blueprint' + ) + parser_blueprints_validate.add_argument( + 'blueprint_file', + metavar='BLUEPRINT_FILE', + type=argparse.FileType(), + help='Path to blueprint file to be validated' + ) + _set_handler_for_command(parser_blueprints_validate, _validate_blueprint) + + parser_blueprints_upload.add_argument( + 'blueprint_path', + metavar='BLUEPRINT_FILE', + type=str, + help="Path to the application's blueprint file" + ) + parser_blueprints_upload.add_argument( + '-b', '--blueprint-id', + dest='blueprint_id', + metavar='BLUEPRINT_ID', + type=str, + default=None, + required=False, + help="Set the id of the uploaded blueprint" + ) + _add_management_ip_optional_argument_to_parser(parser_blueprints_upload) + _set_handler_for_command(parser_blueprints_upload, _upload_blueprint) + + _add_management_ip_optional_argument_to_parser(parser_blueprints_list) + _set_handler_for_command(parser_blueprints_list, _list_blueprints) + + _add_management_ip_optional_argument_to_parser(parser_blueprints_download) + _set_handler_for_command(parser_blueprints_download, _download_blueprint) + + parser_blueprints_download.add_argument( + '-b', '--blueprint-id', + dest='blueprint_id', + metavar='BLUEPRINT_ID', + type=str, + required=True, + help="The id fo the blueprint to download" + ) + parser_blueprints_download.add_argument( + '-o', '--output', + dest='output', + metavar='OUTPUT', + type=str, + required=False, + help="The output file path of the blueprint to be downloaded" + ) + + parser_blueprints_delete.add_argument( + '-b', '--blueprint-id', + dest='blueprint_id', + metavar='BLUEPRINT_ID', + type=str, + required=True, + help="The id of the blueprint meant for deletion" + ) + _add_management_ip_optional_argument_to_parser(parser_blueprints_delete) + _set_handler_for_command(parser_blueprints_delete, _delete_blueprint) + + # deployments subparser + deployments_subparsers = parser_deployments.add_subparsers() + parser_deployments_create = deployments_subparsers.add_parser( + 'create', + help='command for creating a deployment of a blueprint' + ) + parser_deployments_delete = deployments_subparsers.add_parser( + 'delete', + help='command for deleting a deployment' + ) + parser_deployments_execute = deployments_subparsers.add_parser( + 'execute', + help='command for executing a deployment of a blueprint' + ) + parser_deployments_list = deployments_subparsers.add_parser( + 'list', + help='command for listing all deployments or all deployments' + 'of a blueprint' + ) + parser_deployments_create.add_argument( + '-b', '--blueprint-id', + dest='blueprint_id', + metavar='BLUEPRINT_ID', + type=str, + required=True, + help="The id of the blueprint meant for deployment" + ) + parser_deployments_create.add_argument( + '-d', '--deployment-id', + dest='deployment_id', + metavar='DEPLOYMENT_ID', + type=str, + required=True, + help="A unique id that will be assigned to the created deployment" + ) + _add_management_ip_optional_argument_to_parser(parser_deployments_create) + _set_handler_for_command(parser_deployments_create, _create_deployment) + + parser_deployments_delete.add_argument( + '-d', '--deployment-id', + dest='deployment_id', + metavar='DEPLOYMENT_ID', + type=str, + required=True, + help="The deployment's id" + ) + parser_deployments_delete.add_argument( + '-f', '--ignore-live-nodes', + dest='ignore_live_nodes', + action='store_true', + default=False, + help='A flag indicating whether or not to delete the deployment even ' + 'if there exist live nodes for it' + ) + _add_management_ip_optional_argument_to_parser(parser_deployments_delete) + _set_handler_for_command(parser_deployments_delete, _delete_deployment) + + parser_deployments_execute.add_argument( + 'operation', + metavar='OPERATION', + type=str, + help='The operation to execute' + ) + parser_deployments_execute.add_argument( + '-d', '--deployment-id', + dest='deployment_id', + metavar='DEPLOYMENT_ID', + type=str, + required=True, + help='The id of the deployment to execute the operation on' + ) + parser_deployments_execute.add_argument( + '--timeout', + dest='timeout', + metavar='TIMEOUT', + type=int, + required=False, + default=900, + help='Operation timeout in seconds (The execution itself will keep ' + 'going, it is the CLI that will stop waiting for it to terminate)' + ) + parser_deployments_execute.add_argument( + '--force', + dest='force', + action='store_true', + default=False, + help='Whether the workflow should execute even if there is an ongoing' + ' execution for the provided deployment' + ) + _add_management_ip_optional_argument_to_parser(parser_deployments_execute) + _add_include_logs_argument_to_parser(parser_deployments_execute) + _set_handler_for_command(parser_deployments_execute, + _execute_deployment_operation) + + parser_deployments_list.add_argument( + '-b', '--blueprint-id', + dest='blueprint_id', + metavar='BLUEPRINT_ID', + type=str, + required=False, + help='The id of a blueprint to list deployments for' + ) + _add_management_ip_optional_argument_to_parser(parser_deployments_list) + _set_handler_for_command(parser_deployments_list, + _list_blueprint_deployments) + + # workflows subparser + workflows_subparsers = parser_workflows.add_subparsers() + parser_workflows_list = workflows_subparsers.add_parser( + 'list', + help='command for listing workflows for a deployment') + parser_workflows_list.add_argument( + '-d', '--deployment-id', + dest='deployment_id', + metavar='DEPLOYMENT_ID', + type=str, + required=True, + help='The id of the deployment whose workflows to list' + ) + _add_management_ip_optional_argument_to_parser(parser_workflows_list) + _set_handler_for_command(parser_workflows_list, _list_workflows) + + # Executions list sub parser + executions_subparsers = parser_executions.add_subparsers() + parser_executions_list = executions_subparsers.add_parser( + 'list', + help='command for listing all executions of a deployment' + ) + parser_executions_list.add_argument( + '-d', '--deployment-id', + dest='deployment_id', + metavar='DEPLOYMENT_ID', + type=str, + required=True, + help='The id of the deployment whose executions to list' + ) + _add_management_ip_optional_argument_to_parser(parser_executions_list) + _set_handler_for_command(parser_executions_list, + _list_deployment_executions) + + parser_executions_cancel = executions_subparsers.add_parser( + 'cancel', + help='Cancel an execution by its id' + ) + parser_executions_cancel.add_argument( + '-e', '--execution-id', + dest='execution_id', + metavar='EXECUTION_ID', + type=str, + required=True, + help='The id of the execution to cancel' + ) + _add_management_ip_optional_argument_to_parser(parser_executions_cancel) + _set_handler_for_command(parser_executions_cancel, + _cancel_execution) + + parser_events.add_argument( + '-e', '--execution-id', + dest='execution_id', + metavar='EXECUTION_ID', + type=str, + required=True, + help='The id of the execution to get events for' + ) + _add_include_logs_argument_to_parser(parser_events) + _add_management_ip_optional_argument_to_parser(parser_events) + _set_handler_for_command(parser_events, _get_events) + + # dev subparser + parser_dev.add_argument( + 'run', + metavar='RUN', + type=str, + help='Command for running tasks.' + ) + parser_dev.add_argument( + '--tasks', + dest='tasks', + metavar='TASKS_LIST', + type=str, + help='A comma separated list of fabric tasks to run.' + ) + parser_dev.add_argument( + '--tasks-file', + dest='tasks_file', + metavar='TASKS_FILE', + type=str, + help='Path to a tasks file' + ) + _add_management_ip_optional_argument_to_parser(parser_dev) + _set_handler_for_command(parser_dev, _run_dev) + + argcomplete.autocomplete(parser) + return parser.parse_args(args) + + +def _get_provider_module(provider_name, is_verbose_output=False): + try: + module_or_pkg_desc = imp.find_module(provider_name) + if not module_or_pkg_desc[1]: + # module_or_pkg_desc[1] is the pathname of found module/package, + # if it's empty none were found + msg = ('Provider {0} not found.'.format(provider_name)) + flgr.error(msg) + raise CosmoCliError(msg) if is_verbose_output else sys.exit(msg) + + module = imp.load_module(provider_name, *module_or_pkg_desc) + + if not module_or_pkg_desc[0]: + # module_or_pkg_desc[0] is None and module_or_pkg_desc[1] is not + # empty only when we've loaded a package rather than a module. + # Re-searching for the module inside the now-loaded package + # with the same name. + module = imp.load_module( + provider_name, + *imp.find_module(provider_name, module.__path__)) + return module + except ImportError, ex: + msg = ('Could not import module {0} ' + 'maybe {0} provider module was not installed?' + .format(provider_name)) + flgr.warning(msg) + raise CosmoCliError(str(ex)) if is_verbose_output else sys.exit(msg) + + +def _add_include_logs_argument_to_parser(parser): + parser.add_argument( + '-l', '--include-logs', + dest='include_logs', + action='store_true', + help='A flag whether to include logs in returned events' + ) + + +def _add_force_optional_argument_to_parser(parser, help_message): + parser.add_argument( + '-f', '--force', + dest='force', + action='store_true', + help=help_message + ) + + +def _add_management_ip_optional_argument_to_parser(parser): + parser.add_argument( + '-t', '--management-ip', + dest='management_ip', + metavar='MANAGEMENT_IP', + type=str, + help='The cloudify management server ip address' + ) + + +def _set_handler_for_command(parser, handler): + _add_verbosity_argument_to_parser(parser) + + def verbosity_aware_handler(args): + global output_level + if args.verbosity: + lgr.setLevel(logging.DEBUG) + output_level = logging.DEBUG + handler(args) + + parser.set_defaults(handler=verbosity_aware_handler) + + +def _add_verbosity_argument_to_parser(parser): + parser.add_argument( + '-v', '--verbosity', + dest='verbosity', + action='store_true', + help='A flag for setting verbose output' + ) + + +
[docs]def set_global_verbosity_level(is_verbose_output=False): + """ + sets the global verbosity level for console and the lgr logger. + + :param bool is_verbose_output: should be output be verbose + :rtype: `None` + """ + # we need both lgr.setLevel and the verbose_output parameter + # since not all output is generated at the logger level. + # verbose_output can help us control that. + global verbose_output + verbose_output = is_verbose_output + if verbose_output: + lgr.setLevel(logging.DEBUG) + # print 'level is: ' + str(lgr.getEffectiveLevel()) + +
+def _read_config(config_file_path, provider_dir, is_verbose_output=False): + + def _deep_merge_dictionaries(overriding_dict, overridden_dict): + merged_dict = deepcopy(overridden_dict) + for k, v in overriding_dict.iteritems(): + if k in merged_dict and isinstance(v, dict): + if isinstance(merged_dict[k], dict): + merged_dict[k] = \ + _deep_merge_dictionaries(v, merged_dict[k]) + else: + raise RuntimeError('type conflict at key {0}'.format(k)) + else: + merged_dict[k] = deepcopy(v) + return merged_dict + + set_global_verbosity_level(is_verbose_output) + if not config_file_path: + config_file_path = CONFIG_FILE_NAME + defaults_config_file_path = os.path.join( + provider_dir, + DEFAULTS_CONFIG_FILE_NAME) + + if not os.path.exists(config_file_path) or not os.path.exists( + defaults_config_file_path): + if not os.path.exists(defaults_config_file_path): + raise ValueError('Missing the defaults configuration file; ' + 'expected to find it at {0}'.format( + defaults_config_file_path)) + raise ValueError('Missing the configuration file; expected to find ' + 'it at {0}'.format(config_file_path)) + + lgr.debug('reading provider config files') + with open(config_file_path, 'r') as config_file, \ + open(defaults_config_file_path, 'r') as defaults_config_file: + + lgr.debug('safe loading user config') + user_config = yaml.safe_load(config_file.read()) + + lgr.debug('safe loading default config') + defaults_config = yaml.safe_load(defaults_config_file.read()) + + lgr.debug('merging configs') + merged_config = _deep_merge_dictionaries(user_config, defaults_config) \ + if user_config else defaults_config + return merged_config + + +def _init_cosmo(args): + set_global_verbosity_level(args.verbosity) + target_directory = os.path.expanduser(args.target_dir) + provider = args.provider + if not os.path.isdir(target_directory): + msg = "Target directory doesn't exist." + flgr.error(msg) + raise CosmoCliError(msg) if args.verbosity else sys.exit(msg) + + if os.path.exists(os.path.join(target_directory, + CLOUDIFY_WD_SETTINGS_FILE_NAME)): + if not args.reset_config: + msg = ('Target directory is already initialized. ' + 'Use the "-r" flag to force ' + 'reinitialization (might overwrite ' + 'provider configuration files if exist).') + flgr.error(msg) + raise CosmoCliError(msg) if args.verbosity else sys.exit(msg) + + else: # resetting provider configuration + lgr.debug('resetting configuration...') + init(provider, target_directory, + args.reset_config, + creds=args.creds, + is_verbose_output=args.verbosity) + lgr.info("Configuration reset complete") + return + + lgr.info("Initializing Cloudify") + provider_module_name = init(provider, target_directory, + args.reset_config, + args.install, + args.creds, + args.verbosity) + # creating .cloudify file + _dump_cosmo_working_dir_settings(CosmoWorkingDirectorySettings(), + target_directory) + with _update_wd_settings(args.verbosity) as wd_settings: + wd_settings.set_provider(provider_module_name) + lgr.info("Initialization complete") + + +
[docs]def init(provider, target_directory, reset_config, install=False, + creds=None, is_verbose_output=False): + """ + iniatializes a provider by copying its config files to the cwd. + First, will look for a module named cloudify_#provider#. + If not found, will look for #provider#. + If install is True, will install the supplied provider and perform + the search again. + + :param string provider: the provider's name + :param string target_directory: target directory for the config files + :param bool reset_config: if True, overrides the current config. + :param bool install: if supplied, will also install the desired + provider according to the given url or module name (pypi). + :param creds: a comma separated key=value list of credential info. + this is specific to each provider. + :param bool is_verbose_output: if True, output will be verbose. + :rtype: `string` representing the provider's module name + """ + set_global_verbosity_level(is_verbose_output) + + def _get_provider_by_name(): + try: + # searching first for the standard name for providers + # (i.e. cloudify_XXX) + provider_module_name = 'cloudify_{0}'.format(provider) + # print provider_module_name + return (provider_module_name, + _get_provider_module(provider_module_name, + is_verbose_output)) + except CosmoCliError: + # if provider was not found, search for the exact literal the + # user requested instead + provider_module_name = provider + return (provider_module_name, + _get_provider_module(provider_module_name, + is_verbose_output)) + + try: + provider_module_name, provider = _get_provider_by_name() + except: + if install: + local('pip install {0} --process-dependency-links' + .format(install)) + provider_module_name, provider = _get_provider_by_name() + + if not reset_config and os.path.exists( + os.path.join(target_directory, CONFIG_FILE_NAME)): + msg = ('Target directory already contains a ' + 'provider configuration file; ' + 'use the "-r" flag to ' + 'reset it back to its default values.') + flgr.error(msg) + raise CosmoCliError(msg) if is_verbose_output else sys.exit(msg) + else: + # try to get the path if the provider is a module + try: + provider_dir = provider.__path__[0] + # if not, assume it's in the package's dir + except: + provider_dir = os.path.dirname(provider.__file__) + files_path = os.path.join(provider_dir, CONFIG_FILE_NAME) + lgr.debug('copying provider files from {0} to {1}' + .format(files_path, target_directory)) + shutil.copy(files_path, target_directory) + + if creds: + src_config_file = '{}/{}'.format(provider_dir, + DEFAULTS_CONFIG_FILE_NAME) + dst_config_file = '{}/{}'.format(target_directory, + CONFIG_FILE_NAME) + with open(src_config_file, 'r') as f: + provider_config = yaml.load(f.read()) + # print provider_config + # TODO: handle cases in which creds might contain ',' or '=' + if 'credentials' in provider_config.keys(): + for cred in creds.split(','): + key, value = cred.split('=') + if key in provider_config['credentials'].keys(): + provider_config['credentials'][key] = value + else: + lgr.error('could not find key "{0}" in config file' + .format(key)) + raise CosmoCliError('key not found') + else: + lgr.error('credentials section not found in config') + # print yaml.dump(provider_config) + with open(dst_config_file, 'w') as f: + f.write(yaml.dump(provider_config, default_flow_style=False)) + + return provider_module_name + +
+def _bootstrap_cosmo(args): + provider_name = _get_provider(args.verbosity) + provider = _get_provider_module(provider_name, args.verbosity) + try: + provider_dir = provider.__path__[0] + except: + provider_dir = os.path.dirname(provider.__file__) + provider_config = _read_config(args.config_file_path, + provider_dir, + args.verbosity) + pm = provider.ProviderManager(provider_config, args.verbosity) + + if args.skip_validations and args.validate_only: + sys.exit('please choose one of skip-validations or ' + 'validate-only flags, not both.') + lgr.info("bootstrapping using {0}".format(provider_name)) + if not args.skip_validations: + lgr.info('validating provider resources and configuration') + validation_errors = {} + if pm.schema is not None: + validation_errors = pm.validate_schema(validation_errors, + schema=pm.schema) + else: + lgr.debug('schema validation disabled') + # if the validation_errors dict return empty + if not pm.validate(validation_errors) and not validation_errors: + lgr.info('provider validations completed successfully') + else: + flgr.error('provider validations failed!') + raise CosmoValidationError('provider validations failed!') \ + if args.verbosity else sys.exit('provider validations failed!') + if args.validate_only: + return + with _protected_provider_call(args.verbosity): + lgr.info('provisioning resources for management server...') + params = pm.provision() + + provider_context = {} + if params is not None: + mgmt_ip, private_ip, ssh_key, ssh_user, provider_context = params + lgr.info('provisioning complete') + lgr.info('bootstrapping the management server...') + installed = pm.bootstrap(mgmt_ip, private_ip, ssh_key, + ssh_user, args.dev_mode) + lgr.info('bootstrapping complete') if installed else \ + lgr.error('bootstrapping failed!') + else: + lgr.error('provisioning failed!') + + if params is not None and installed: + _update_provider_context(provider_config, provider_context) + + mgmt_ip = mgmt_ip.encode('utf-8') + + with _update_wd_settings(args.verbosity) as wd_settings: + wd_settings.set_management_server(mgmt_ip) + wd_settings.set_management_key(ssh_key) + wd_settings.set_management_user(ssh_user) + wd_settings.set_provider_context(provider_context) + + # storing provider context on management server + _get_rest_client(mgmt_ip).post_provider_context(provider_name, + provider_context) + + lgr.info( + "management server is up at {0} (is now set as the default " + "management server)".format(mgmt_ip)) + else: + if args.keep_up: + lgr.info('topology will remain up') + else: + lgr.info('tearing down topology' + ' due to bootstrap failure') + pm.teardown(provider_context) + raise CosmoBootstrapError() if args.verbosity else sys.exit(1) + + +def _update_provider_context(provider_config, provider_context): + cloudify = provider_config.get('cloudify', {}) + agent = cloudify.get('cloudify_agent', {}) + min_workers = agent.get('min_workers', AGENT_MIN_WORKERS) + max_workers = agent.get('max_workers', AGENT_MAX_WORKERS) + user = agent.get('user') + remote_execution_port = agent.get('remote_execution_port', + REMOTE_EXECUTION_PORT) + compute = provider_config.get('compute', {}) + agent_servers = compute.get('agent_servers', {}) + agents_keypair = agent_servers.get('agents_keypair', {}) + auto_generated = agents_keypair.get('auto_generated', {}) + private_key_target_path = auto_generated.get('private_key_target_path', + AGENT_KEY_PATH) + provider_context['cloudify'] = { + 'cloudify_agent': { + 'min_workers': min_workers, + 'max_workers': max_workers, + 'agent_key_path': private_key_target_path, + 'remote_execution_port': remote_execution_port + } + } + + if user: + provider_context['cloudify']['cloudify_agent']['user'] = user + + +def _teardown_cosmo(args): + is_verbose_output = args.verbosity + if not args.force: + msg = ("This action requires additional " + "confirmation. Add the '-f' or '--force' " + "flags to your command if you are certain " + "this command should be executed.") + flgr.error(msg) + raise CosmoCliError(msg) if is_verbose_output else sys.exit(msg) + + mgmt_ip = _get_management_server_ip(args) + if not args.ignore_deployments and \ + len(_get_rest_client(mgmt_ip).list_deployments()) > 0: + msg = ("Management server {0} has active deployments. Add the " + "'--ignore-deployments' flag to your command to ignore " + "these deployments and execute topology teardown." + .format(mgmt_ip)) + flgr.error(msg) + raise CosmoCliError(msg) if is_verbose_output else sys.exit(msg) + + provider_name, provider_context = \ + _get_provider_name_and_context(mgmt_ip, args.verbosity) + provider = _get_provider_module(provider_name, args.verbosity) + try: + provider_dir = provider.__path__[0] + except: + provider_dir = os.path.dirname(provider.__file__) + provider_config = _read_config(args.config_file_path, + provider_dir, + args.verbosity) + pm = provider.ProviderManager(provider_config, args.verbosity) + + lgr.info("tearing down {0}".format(mgmt_ip)) + with _protected_provider_call(args.verbosity): + pm.teardown(provider_context, args.ignore_validation) + + # cleaning relevant data from working directory settings + with _update_wd_settings(args.verbosity) as wd_settings: + # wd_settings.set_provider_context(provider_context) + wd_settings.remove_management_server_context(mgmt_ip) + + lgr.info("teardown complete") + + +def _get_management_server_ip(args): + is_verbose_output = args.verbosity + cosmo_wd_settings = _load_cosmo_working_dir_settings(is_verbose_output) + if args.management_ip: + return cosmo_wd_settings.translate_management_alias( + args.management_ip) + if cosmo_wd_settings.get_management_server(): + return cosmo_wd_settings.get_management_server() + + msg = ("Must either first run 'cfy use' command for a " + "management server or provide a management " + "server ip explicitly") + flgr.error(msg) + raise CosmoCliError(msg) if is_verbose_output else sys.exit(msg) + + +def _get_provider(is_verbose_output=False): + cosmo_wd_settings = _load_cosmo_working_dir_settings(is_verbose_output) + if cosmo_wd_settings.get_provider(): + return cosmo_wd_settings.get_provider() + msg = "Provider is not set in working directory settings" + flgr.error(msg) + raise RuntimeError(msg) if is_verbose_output else sys.exit(msg) + + +def _get_mgmt_user(is_verbose_output=False): + cosmo_wd_settings = _load_cosmo_working_dir_settings(is_verbose_output) + if cosmo_wd_settings.get_management_user(): + return cosmo_wd_settings.get_management_user() + msg = "Management User is not set in working directory settings" + flgr.error(msg) + raise RuntimeError(msg) if is_verbose_output else sys.exit(msg) + + +def _get_mgmt_key(is_verbose_output=False): + cosmo_wd_settings = _load_cosmo_working_dir_settings(is_verbose_output) + if cosmo_wd_settings.get_management_key(): + return cosmo_wd_settings.get_management_key() + msg = "Management Key is not set in working directory settings" + flgr.error(msg) + raise RuntimeError(msg) if is_verbose_output else sys.exit(msg) + + +def _get_provider_name_and_context(mgmt_ip, is_verbose_output=False): + # trying to retrieve provider context from server + try: + response = _get_rest_client(mgmt_ip).get_provider_context() + return response['name'], response['context'] + except CosmoManagerRestCallError as e: + lgr.warn('Failed to get provider context from server: {0}'.format( + str(e))) + + # using the local provider context instead (if it's relevant for the + # target server) + cosmo_wd_settings = _load_cosmo_working_dir_settings(is_verbose_output) + if cosmo_wd_settings.get_provider_context(): + default_mgmt_server_ip = cosmo_wd_settings.get_management_server() + if default_mgmt_server_ip == mgmt_ip: + provider_name = _get_provider(is_verbose_output) + return provider_name, cosmo_wd_settings.get_provider_context() + else: + # the local provider context data is for a different server + msg = "Failed to get provider context from target server" + else: + msg = "Provider context is not set in working directory settings (" \ + "The provider is used during the bootstrap and teardown " \ + "process. This probably means that the manager was started " \ + "manually, without the bootstrap command therefore calling " \ + "teardown is not supported)." + flgr.error(msg) + raise RuntimeError(msg) if is_verbose_output else sys.exit(msg) + + +def _status(args): + management_ip = _get_management_server_ip(args) + lgr.info( + 'querying management server {0}'.format(management_ip)) + + status_result = _get_management_server_status(management_ip) + if status_result: + lgr.info( + "REST service at management server {0} is up and running" + .format(management_ip)) + + lgr.info('Services information:') + for service in status_result.services: + lgr.info('\t{0}\t{1}'.format( + service.display_name.ljust(20), + service.instances[0]['state'] if service.instances else + 'Unknown')) + return True + else: + lgr.info( + "REST service at management server {0} is not responding" + .format(management_ip)) + return False + + +def _get_management_server_status(management_ip): + client = _get_rest_client(management_ip) + try: + return client.status() + except CosmoManagerRestCallError: + return None + + +def _use_management_server(args): + if not os.path.exists(CLOUDIFY_WD_SETTINGS_FILE_NAME): + # Allowing the user to work with an existing management server + # even if "init" wasn't called prior to this. + _dump_cosmo_working_dir_settings(CosmoWorkingDirectorySettings()) + + if not _get_management_server_status(args.management_ip): + msg = ("Can't use management server {0}: No response.".format( + args.management_ip)) + flgr.error(msg) + raise CosmoCliError(msg) if args.verbosity else sys.exit(msg) + + try: + response = _get_rest_client(args.management_ip)\ + .get_provider_context() + provider_name = response['name'] + provider_context = response['context'] + except CosmoManagerRestCallError: + provider_name = None + provider_context = None + + with _update_wd_settings(args.verbosity) as wd_settings: + wd_settings.set_management_server( + wd_settings.translate_management_alias(args.management_ip)) + wd_settings.set_provider_context(provider_context) + wd_settings.set_provider(provider_name) + if args.alias: + wd_settings.save_management_alias(args.alias, + args.management_ip, + args.force, + args.verbosity) + lgr.info( + 'Using management server {0} (alias {1})'.format( + args.management_ip, args.alias)) + else: + lgr.info('Using management server {0}'.format( + args.management_ip)) + + +def _list_blueprints(args): + management_ip = _get_management_server_ip(args) + lgr.info('querying blueprints list from management ' + 'server {0}'.format(management_ip)) + client = _get_rest_client(management_ip) + blueprints_list = client.list_blueprints() + + if not blueprints_list: + lgr.info('There are no blueprints available on the ' + 'management server') + else: + lgr.info('Blueprints:') + for blueprint_state in blueprints_list: + blueprint_id = blueprint_state.id + lgr.info('\t' + blueprint_id) + + +def _delete_blueprint(args): + management_ip = _get_management_server_ip(args) + blueprint_id = args.blueprint_id + + lgr.info( + 'Deleting blueprint {0} from management server {1}'.format( + blueprint_id, management_ip)) + client = _get_rest_client(management_ip) + client.delete_blueprint(blueprint_id) + lgr.info("Deleted blueprint successfully") + + +def _delete_deployment(args): + management_ip = _get_management_server_ip(args) + deployment_id = args.deployment_id + ignore_live_nodes = args.ignore_live_nodes + + lgr.info( + 'Deleting deployment {0} from management server {1}'.format( + deployment_id, management_ip)) + client = _get_rest_client(management_ip) + client.delete_deployment(deployment_id, ignore_live_nodes) + lgr.info("Deleted deployment successfully") + + +def _upload_blueprint(args): + is_verbose_output = args.verbosity + blueprint_id = args.blueprint_id + blueprint_path = os.path.expanduser(args.blueprint_path) + if not os.path.isfile(blueprint_path): + msg = ("Path to blueprint doesn't exist: {0}." + .format(blueprint_path)) + flgr.error(msg) + raise CosmoCliError(msg) if is_verbose_output else sys.exit(msg) + + management_ip = _get_management_server_ip(args) + + lgr.info( + 'Uploading blueprint {0} to management server {1}'.format( + blueprint_path, management_ip)) + client = _get_rest_client(management_ip) + blueprint_state = client.publish_blueprint(blueprint_path, blueprint_id) + + lgr.info( + "Uploaded blueprint, blueprint's id is: {0}".format( + blueprint_state.id)) + + +def _create_deployment(args): + blueprint_id = args.blueprint_id + deployment_id = args.deployment_id + management_ip = _get_management_server_ip(args) + + lgr.info('Creating new deployment from blueprint {0} at ' + 'management server {1}'.format(blueprint_id, management_ip)) + client = _get_rest_client(management_ip) + deployment = client.create_deployment(blueprint_id, deployment_id) + lgr.info( + "Deployment created, deployment's id is: {0}".format( + deployment.id)) + + +def _create_event_message_prefix(event): + context = event['context'] + deployment_id = context['deployment_id'] + node_info = '' + operation = '' + if 'node_id' in context and context['node_id'] is not None: + node_id = context['node_id'] + if 'operation' in context and context['operation'] is not None: + operation = '.{0}'.format(context['operation'].split('.')[-1]) + node_info = '[{0}{1}] '.format(node_id, operation) + level = 'CFY' + message = event['message']['text'].encode('utf-8') + if 'cloudify_log' in event['type']: + level = 'LOG' + message = '{0}: {1}'.format(event['level'].upper(), message) + timestamp = event['@timestamp'].split('.')[0] + + return '{0} {1} <{2}> {3}{4}'.format(timestamp, + level, + deployment_id, + node_info, + message) + + +def _get_events_logger(args): + def verbose_events_logger(events): + for event in events: + lgr.info(json.dumps(event, indent=4)) + + def default_events_logger(events): + for event in events: + lgr.info(_create_event_message_prefix(event)) + + if args.verbosity: + return verbose_events_logger + return default_events_logger + + +def _execute_deployment_operation(args): + management_ip = _get_management_server_ip(args) + operation = args.operation + deployment_id = args.deployment_id + timeout = args.timeout + force = args.force + include_logs = args.include_logs + + lgr.info("Executing workflow '{0}' on deployment '{1}' at" + " management server {2} [timeout={3} seconds]" + .format(operation, args.deployment_id, management_ip, + timeout)) + + events_logger = _get_events_logger(args) + client = _get_rest_client(management_ip) + + events_message = "* Run 'cfy events --include-logs "\ + "--execution-id {0}' for retrieving the "\ + "execution's events/logs" + + try: + execution_id, error = client.execute_deployment( + deployment_id, + operation, + events_logger, + include_logs=include_logs, + timeout=timeout, + force=force) + if error is None: + lgr.info("Finished executing workflow '{0}' on deployment" + "'{1}'".format(operation, deployment_id)) + lgr.info(events_message.format(execution_id)) + else: + lgr.info("Execution of workflow '{0}' for deployment " + "'{1}' failed. " + "[error={2}]".format(operation, deployment_id, error)) + lgr.info(events_message.format(execution_id)) + raise SuppressedCosmoCliError() + except CosmoManagerRestCallTimeoutError, e: + lgr.info("Execution of workflow '{0}' for deployment '{1}' timed out. " + "* Run 'cfy executions cancel --execution-id {2}' to cancel" + " the running workflow.".format(operation, deployment_id, + e.execution_id)) + lgr.info(events_message.format(e.execution_id)) + raise SuppressedCosmoCliError() + + +# TODO implement blueprint deployments on server side +# because it is currently filter by the CLI +def _list_blueprint_deployments(args): + blueprint_id = args.blueprint_id + management_ip = _get_management_server_ip(args) + + message = 'Querying deployments list from management server {0}'\ + .format(management_ip) + if blueprint_id: + message += ' for blueprint {0}'.format(blueprint_id) + lgr.info(message) + + client = _get_rest_client(management_ip) + deployments = client.list_deployments() + if blueprint_id: + deployments = filter(lambda deployment: + deployment.blueprintId == blueprint_id, + deployments) + + if len(deployments) == 0: + if blueprint_id: + suffix = 'for blueprint {0}'.format(blueprint_id) + else: + suffix = '' + lgr.info('There are no deployments on the management server {0}' + .format(suffix)) + else: + lgr.info('Deployments:') + for deployment in deployments: + deployment_id = deployment.id + if blueprint_id: + blueprint_str = '' + else: + blueprint_str = ' [Blueprint: {0}]' \ + .format(deployment.blueprintId) + lgr.info( + '\t' + deployment_id + blueprint_str) + + +def _list_workflows(args): + management_ip = _get_management_server_ip(args) + deployment_id = args.deployment_id + + lgr.info( + 'Querying workflows list from management server {0} for ' + 'deployment {1}'.format(management_ip, args.deployment_id)) + client = _get_rest_client(management_ip) + workflow_names = [workflow.name for workflow in + client.list_workflows(deployment_id).workflows] + lgr.info("deployments workflows:") + for name in workflow_names: + lgr.info("\t{0}".format(name)) + + +def _cancel_execution(args): + management_ip = _get_management_server_ip(args) + client = _get_rest_client(management_ip) + execution_id = args.execution_id + lgr.info( + 'Canceling execution {0} on management server {1}' + .format(execution_id, management_ip)) + client.cancel_execution(execution_id) + lgr.info( + 'Cancelled execution {0} on management server {1}' + .format(execution_id, management_ip)) + + +def _list_deployment_executions(args): + is_verbose_output = args.verbosity + management_ip = _get_management_server_ip(args) + client = _get_rest_client(management_ip) + deployment_id = args.deployment_id + lgr.info( + 'Querying executions list from management server {0} for ' + 'deployment {1}'.format(management_ip, deployment_id)) + try: + executions = client.list_deployment_executions(deployment_id) + except CosmoManagerRestCallHTTPError, e: + if not e.status_code == 404: + raise + msg = ('Deployment {0} does not exist on management server' + .format(deployment_id)) + flgr.error(msg) + raise CosmoCliError(msg) if is_verbose_output else sys.exit(msg) + + if len(executions) == 0: + lgr.info( + 'There are no executions on the ' + 'management server for ' + 'deployment {0}'.format(deployment_id)) + else: + lgr.info( + 'Executions for deployment {0}:'.format(deployment_id)) + for execution in executions: + lgr.info( + '\t{0}{1}\t[deployment_id={2}, blueprint_id={3}]'.format( + execution.id, + '\t{0}'.format(execution.status), + execution.deploymentId, + execution.blueprintId)) + + +def _get_events(args): + management_ip = _get_management_server_ip(args) + lgr.info("Getting events from management server {0} for " + "execution id '{1}' " + "[include_logs={2}]".format(management_ip, + args.execution_id, + args.include_logs)) + client = _get_rest_client(management_ip) + try: + events = client.get_all_execution_events( + args.execution_id, + include_logs=args.include_logs) + events_logger = _get_events_logger(args) + events_logger(events) + lgr.info('\nTotal events: {0}'.format(len(events))) + except CosmoManagerRestCallHTTPError, e: + if e.status_code != 404: + raise + msg = ("Execution '{0}' not found on management server" + .format(args.execution_id)) + flgr.error(msg) + raise CosmoCliError(msg) if args.verbosity else sys.exit(msg) + + +def _run_dev(args): + # TODO: allow passing username and key path as params. + # env.user = args.user if args.user else _get_mgmt_user() + # env.key_filename = args.key if args.key else _get_mgmt_key() + env.user = _get_mgmt_user() + env.key_filename = _get_mgmt_key() + env.warn_only = True + env.abort_on_prompts = False + env.connection_attempts = 5 + env.keepalive = 0 + env.linewise = False + env.pool_size = 0 + env.skip_bad_hosts = False + env.timeout = 10 + env.forward_agent = True + env.status = False + env.disable_known_hosts = False + + mgmt_ip = args.management_ip if args.management_ip \ + else _get_management_server_ip(args) + # hmm... it's also possible to just pass the tasks string to fabric + # and let it run... need to think about it... + if args.run: + if args.tasks_file: + sys.path.append(os.path.dirname(args.tasks_file)) + tasks = __import__(os.path.basename(os.path.splitext( + args.tasks_file)[0])) + else: + sys.path.append(os.getcwd()) + try: + import tasks + except ImportError: + raise CosmoDevError('could not find a tasks file to import.' + ' either create a tasks.py file in your ' + 'cwd or use the --tasks-file flag to ' + 'point to one.') + with settings(host_string=mgmt_ip): + if args.tasks: + for task in args.tasks.split(','): + try: + getattr(tasks, task)() + except AttributeError: + raise CosmoDevError('task: "{0}" not found' + .format(task)) + except Exception as e: + raise CosmoDevError('failed to execute: "{0}" ' + '({1}) '.format(task, str(e))) + else: + for task in dir(tasks): + if task.startswith('task_'): + try: + getattr(tasks, task)() + except Exception as e: + raise CosmoDevError('failed to execute: "{0}" ' + '({1}) '.format(task, str(e))) + + +def _set_cli_except_hook(): + old_excepthook = sys.excepthook + + def new_excepthook(type, value, the_traceback): + if type == CosmoCliError: + lgr.error(str(value)) + if output_level <= logging.DEBUG: + print("Stack trace:") + traceback.print_tb(the_traceback) + elif type == CosmoManagerRestCallError: + lgr.error("Failed making a call to REST service: {0}".format( + str(value))) + if output_level <= logging.DEBUG: + print("Stack trace:") + traceback.print_tb(the_traceback) + elif type == SuppressedCosmoCliError: + # output is already generated elsewhere + # we only want and exit code that is not 0 + pass + else: + old_excepthook(type, value, the_traceback) + + sys.excepthook = new_excepthook + + +def _load_cosmo_working_dir_settings(is_verbose_output=False): + try: + with open('{0}'.format(CLOUDIFY_WD_SETTINGS_FILE_NAME), 'r') as f: + return yaml.load(f.read()) + except IOError: + msg = ('You must first initialize by running the ' + 'command "cfy init", or choose to work with ' + 'an existing management server by running the ' + 'command "cfy use".') + flgr.error(msg) + raise CosmoCliError(msg) if is_verbose_output else sys.exit(msg) + + +def _dump_cosmo_working_dir_settings(cosmo_wd_settings, target_dir=None): + target_file_path = '{0}'.format(CLOUDIFY_WD_SETTINGS_FILE_NAME) if \ + not target_dir else os.path.join(target_dir, + CLOUDIFY_WD_SETTINGS_FILE_NAME) + with open(target_file_path, 'w') as f: + f.write(yaml.dump(cosmo_wd_settings)) + + +def _download_blueprint(args): + lgr.info(messages.DOWNLOADING_BLUEPRINT.format(args.blueprint_id)) + rest_client = _get_rest_client(_get_management_server_ip(args)) + target_file = rest_client.download_blueprint(args.blueprint_id, + args.output) + lgr.info(messages.DOWNLOADING_BLUEPRINT_SUCCEEDED.format( + args.blueprint_id, + target_file)) + + +def _validate_blueprint(args): + is_verbose_output = args.verbosity + target_file = args.blueprint_file + + resources = _get_resource_base() + mapping = resources + "cloudify/alias-mappings.yaml" + + lgr.info( + messages.VALIDATING_BLUEPRINT.format(target_file.name)) + try: + parse_from_path(target_file.name, None, mapping, resources) + except DSLParsingException as ex: + msg = (messages.VALIDATING_BLUEPRINT_FAILED + .format(target_file, str(ex))) + flgr.error(msg) + raise CosmoCliError(msg) if is_verbose_output else sys.exit(msg) + lgr.info(messages.VALIDATING_BLUEPRINT_SUCCEEDED) + + +def _get_resource_base(): + script_directory = os.path.dirname(os.path.realpath(__file__)) + resource_directory = script_directory \ + + "/../../cloudify-manager/resources/rest-service/" + if os.path.isdir(resource_directory): + lgr.debug("Found resource directory") + + resource_directory_url = urlparse.urljoin('file:', urllib.pathname2url( + resource_directory)) + return resource_directory_url + lgr.debug("Using resources from github. Branch is develop") + return "https://raw.githubusercontent.com/cloudify-cosmo/" \ + "cloudify-manager/develop/resources/rest-service/" + + +def _get_rest_client(management_ip): + return CosmoManagerRestClient(management_ip) + + +@contextmanager +def _update_wd_settings(is_verbose_output=False): + cosmo_wd_settings = _load_cosmo_working_dir_settings(is_verbose_output) + yield cosmo_wd_settings + _dump_cosmo_working_dir_settings(cosmo_wd_settings) + + +@contextmanager +def _protected_provider_call(is_verbose_output=False): + try: + yield + except Exception, ex: + trace = sys.exc_info()[2] + msg = ('Exception occurred in provider: {0}' + .format(str(ex))) + flgr.error(msg) + raise CosmoCliError(msg), None, trace if is_verbose_output \ + else sys.exit(msg) + + +
[docs]class CosmoWorkingDirectorySettings(yaml.YAMLObject): + yaml_tag = u'!WD_Settings' + yaml_loader = yaml.Loader + + def __init__(self): + self._management_ip = None + self._management_key = None + self._management_user = None + self._provider = None + self._provider_context = None + self._mgmt_aliases = {} + self._mgmt_to_contextual_aliases = {} + +
[docs] def get_management_server(self): + return self._management_ip +
+
[docs] def set_management_server(self, management_ip): + self._management_ip = management_ip +
+
[docs] def get_management_key(self): + return self._management_key +
+
[docs] def set_management_key(self, management_key): + self._management_key = management_key +
+
[docs] def get_management_user(self): + return self._management_user +
+
[docs] def set_management_user(self, _management_user): + self._management_user = _management_user +
+
[docs] def get_provider_context(self): + return self._provider_context +
+
[docs] def set_provider_context(self, provider_context): + self._provider_context = provider_context +
+
[docs] def remove_management_server_context(self, management_ip): + # Clears management server context data. + if management_ip in self._mgmt_to_contextual_aliases: + del(self._mgmt_to_contextual_aliases[management_ip]) +
+
[docs] def get_provider(self): + return self._provider +
+
[docs] def set_provider(self, provider): + self._provider = provider +
+
[docs] def translate_management_alias(self, management_address_or_alias): + return self._mgmt_aliases[management_address_or_alias] if \ + management_address_or_alias in self._mgmt_aliases \ + else management_address_or_alias +
+
[docs] def save_management_alias(self, management_alias, management_address, + is_allow_overwrite, is_verbose_output=False): + if not is_allow_overwrite and management_alias in self._mgmt_aliases: + msg = ("management-server alias {0} is already in " + "use; use -f flag to allow overwrite." + .format(management_alias)) + flgr.error(msg) + raise CosmoCliError(msg) if is_verbose_output else sys.exit(msg) + self._mgmt_aliases[management_alias] = management_address + +
+
[docs]class CosmoDevError(Exception): + pass + +
+
[docs]class CosmoBootstrapError(Exception): + pass + +
+
[docs]class CosmoValidationError(Exception): + pass + +
+
[docs]class CosmoCliError(Exception): + pass + +
+
[docs]class SuppressedCosmoCliError(Exception): + pass +
+if __name__ == '__main__': + _set_cli_except_hook() # only enable hook when this is called directly. + main() +
+ +
+ +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/_modules/cosmo_cli/provider_common.html b/docs/_build/html/_modules/cosmo_cli/provider_common.html new file mode 100644 index 0000000..3d74fa7 --- /dev/null +++ b/docs/_build/html/_modules/cosmo_cli/provider_common.html @@ -0,0 +1,464 @@ + + + + + + + + + + cosmo_cli.provider_common — cloudify-rest-client 3.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+
+ +
+
+
+ +

Source code for cosmo_cli.provider_common

+import time
+import sys
+from abc import abstractmethod, ABCMeta
+from jsonschema import ValidationError, Draft4Validator
+from fabric.api import run, env
+from fabric.context_managers import settings, hide
+from cosmo_cli import set_global_verbosity_level
+from cosmo_cli import init_logger
+
+lgr, flgr = init_logger()
+
+CLOUDIFY_PACKAGES_PATH = '/cloudify'
+CLOUDIFY_COMPONENTS_PACKAGE_PATH = '/cloudify-components'
+CLOUDIFY_CORE_PACKAGE_PATH = '/cloudify-core'
+CLOUDIFY_UI_PACKAGE_PATH = '/cloudify-ui'
+CLOUDIFY_AGENT_PACKAGE_PATH = '/cloudify-agents'
+
+FABRIC_RETRIES = 3
+FABRIC_SLEEPTIME = 3
+
+
+
[docs]class BaseProviderClass(object): + """ + this is the basic provider class supplied with the CLI. it can be imported + by the provider's code by inheritence into the ProviderManager class. + each of the below methods can be overriden in favor of a different impl. + """ + __metaclass__ = ABCMeta + + def __init__(self, provider_config=None, is_verbose_output=False, + schema=None): + + set_global_verbosity_level(is_verbose_output) + self.provider_config = provider_config + self.is_verbose_output = is_verbose_output + self.schema = schema + + @abstractmethod +
[docs] def provision(self): + """ + provisions resources for the management server + """ + return +
+ @abstractmethod +
[docs] def validate(self, validation_errors={}): + """ + validations to be performed before provisioning and bootstrapping + the management server. + + :param dict validation_errors: dict to hold all validation errors. + :rtype: `dict` of validaiton_errors. + """ + lgr.debug("no resource validation methods defined!") + return +
+ @abstractmethod +
[docs] def teardown(self, provider_context, ignore_validation=False): + """ + tears down the management server and its accompanied provisioned + resources + """ + return +
+
[docs] def bootstrap(self, mgmt_ip, private_ip, mgmt_ssh_key, mgmt_ssh_user, + dev_mode=False): + """ + bootstraps Cloudify on the management server. + + :param string mgmt_ip: public ip of the provisioned instance. + :param string private_ip: private ip of the provisioned instance. + (for configuration purposes). + :param string mgmt_ssh_key: path to the ssh key to be used for + connecting to the instance. + :param string mgmt_ssh_user: the user to use when connecting to the + instance. + :param bool dev_mode: states whether dev_mode should be applied. + :rtype: `bool` True if succeeded, False otherwise. If False is returned + and 'cfy bootstrap' was executed with the keep-up-on-failure flag, the + provisioned resources will remain. If the flag is ommited, they will + be torn down. + """ + env.user = mgmt_ssh_user + env.key_filename = mgmt_ssh_key + env.warn_only = True + env.abort_on_prompts = False + env.connection_attempts = 5 + env.keepalive = 0 + env.linewise = False + env.pool_size = 0 + env.skip_bad_hosts = False + env.timeout = 10 + env.forward_agent = True + env.status = False + env.disable_known_hosts = False + + def _run_with_retries(command, retries=FABRIC_RETRIES, + sleeper=FABRIC_SLEEPTIME): + + for execution in range(retries): + lgr.debug('running command: {0}' + .format(command)) + if not self.is_verbose_output: + with hide('running', 'stdout'): + r = run(command) + else: + r = run(command) + if r.succeeded: + lgr.debug('successfully ran command: {0}' + .format(command)) + return True + else: + lgr.warning('retrying command: {0}' + .format(command)) + time.sleep(sleeper) + lgr.error('failed to run: {0}, {1}' + .format(command, r.stderr)) + return False + + def _download_package(url, path): + return _run_with_retries('sudo wget {0} -P {1}' + .format(path, url)) + + def _unpack(path): + return _run_with_retries('sudo dpkg -i {0}/*.deb' + .format(path)) + + def _run(command): + return _run_with_retries(command) + + lgr.info('initializing manager on the machine at {0}' + .format(mgmt_ip)) + cosmo_config = self.provider_config['cloudify'] + print cosmo_config + + with settings(host_string=mgmt_ip), hide('running', + 'stderr', + 'aborts', + 'warnings'): + + lgr.info('downloading cloudify-components package...') + r = _download_package( + CLOUDIFY_PACKAGES_PATH, + cosmo_config['cloudify_components_package_url']) + if not r: + lgr.error('failed to download components package. ' + 'please ensure package exists in its ' + 'configured location in the config file') + return False + + lgr.info('downloading cloudify-core package...') + r = _download_package( + CLOUDIFY_PACKAGES_PATH, + cosmo_config['cloudify_core_package_url']) + if not r: + lgr.error('failed to download core package. ' + 'please ensure package exists in its ' + 'configured location in the config file') + return False + + lgr.info('downloading cloudify-ui...') + r = _download_package( + CLOUDIFY_UI_PACKAGE_PATH, + cosmo_config['cloudify_ui_package_url']) + if not r: + lgr.error('failed to download ui package. ' + 'please ensure package exists in its ' + 'configured location in the config file') + return False + + lgr.info('downloading cloudify-ubuntu-agent...') + r = _download_package( + CLOUDIFY_AGENT_PACKAGE_PATH, + cosmo_config['cloudify_ubuntu_agent_url']) + if not r: + lgr.error('failed to download ubuntu agent. ' + 'please ensure package exists in its ' + 'configured location in the config file') + return False + + lgr.info('unpacking cloudify-core packages...') + r = _unpack( + CLOUDIFY_PACKAGES_PATH) + if not r: + lgr.error('failed to unpack cloudify-core package') + return False + + lgr.debug('verifying verbosity for installation process') + v = self.is_verbose_output + self.is_verbose_output = True + + lgr.info('installing cloudify on {0}...'.format(mgmt_ip)) + r = _run('sudo {0}/cloudify-components-bootstrap.sh' + .format(CLOUDIFY_COMPONENTS_PACKAGE_PATH)) + if not r: + lgr.error('failed to install cloudify-components') + return False + + celery_user = mgmt_ssh_user + r = _run('sudo {0}/cloudify-core-bootstrap.sh {1} {2}' + .format(CLOUDIFY_CORE_PACKAGE_PATH, + celery_user, private_ip)) + if not r: + lgr.error('failed to install cloudify-core') + return False + + lgr.info('deploying cloudify-ui') + self.is_verbose_output = False + r = _unpack( + CLOUDIFY_UI_PACKAGE_PATH) + if not r: + lgr.error('failed to install cloudify-ui') + return False + lgr.info('done') + + lgr.info('deploying cloudify agent') + self.is_verbose_output = False + r = _unpack( + CLOUDIFY_AGENT_PACKAGE_PATH) + if not r: + lgr.error('failed to install cloudify-agent') + return False + lgr.info('done') + + self.is_verbose_output = True + if dev_mode: + lgr.info('\n\n\n\n\nentering dev-mode. ' + 'dev configuration will be applied...\n' + 'NOTE: an internet connection might be ' + 'required...') + + dev_config = self.provider_config['dev'] + # lgr.debug(json.dumps(dev_config, sort_keys=True, + # indent=4, separators=(',', ': '))) + + for key, value in dev_config.iteritems(): + virtualenv = value['virtualenv'] + lgr.debug('virtualenv is: ' + str(virtualenv)) + + if 'preruns' in value: + for command in value['preruns']: + _run(command) + + if 'downloads' in value: + _run('mkdir -p /tmp/{0}'.format(virtualenv)) + for download in value['downloads']: + lgr.debug('downloading: ' + download) + _run('sudo wget {0} -O ' + '/tmp/module.tar.gz' + .format(download)) + _run('sudo tar -C /tmp/{0} -xvf {1}' + .format(virtualenv, + '/tmp/module.tar.gz')) + + if 'installs' in value: + for module in value['installs']: + lgr.debug('installing: ' + module) + if module.startswith('/'): + module = '/tmp' + virtualenv + module + _run('sudo {0}/bin/pip ' + '--default-timeout' + '=45 install {1} --upgrade' + ' --process-dependency-links' + .format(virtualenv, module)) + if 'runs' in value: + for command in value['runs']: + _run(command) + + lgr.info('management ip is {0}'.format(mgmt_ip)) + lgr.debug('setting verbosity to previous state') + self.is_verbose_output = v + return True +
+
[docs] def validate_schema(self, validation_errors={}, schema=None): + """ + this is a basic implementation of schema validation. + uses the Draft4Validator from jsonschema to validate the provider's + config. + a schema file must be created and its contents supplied + when initializing the ProviderManager class using the schema + parameter. + + :param dict validation_errors: dict to hold all validation errors. + :param dict schema: a schema to compare the provider's config to. + the provider's config is already initialized within the + ProviderManager class in the provider's code. + :rtype: `dict` of validation_errors. + """ + lgr.debug('validating config file against provided schema...') + try: + v = Draft4Validator(schema) + except AttributeError as e: + flgr.error('schema is invalid. error: {}'.format(e)) + raise ValidationError('schema is invalid. error: {}'.format(e)) \ + if self.is_verbose_output else sys.exit(1) + if v.iter_errors(self.provider_config): + for e in v.iter_errors(self.provider_config): + err = ('config file validation error originating at key: {0}, ' + '{0}, {1}'.format('.'.join(e.path), e.message)) + validation_errors.setdefault('schema', []).append(err) + errors = ';\n'.join(err for e in v.iter_errors( + self.provider_config)) + try: + v.validate(self.provider_config) + except ValidationError: + lgr.error('VALIDATION ERROR:' + '{0}'.format(errors)) + lgr.error('schema validation failed!') if validation_errors \ + else lgr.info('schema validated successfully') + # print json.dumps(validation_errors, sort_keys=True, + # indent=4, separators=(',', ': ')) + return validation_errors
+
+ +
+ +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/_modules/index.html b/docs/_build/html/_modules/index.html new file mode 100644 index 0000000..8bfbef5 --- /dev/null +++ b/docs/_build/html/_modules/index.html @@ -0,0 +1,159 @@ + + + + + + + + + + Overview: module code — cloudify-rest-client 3.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/_sources/index.txt b/docs/_build/html/_sources/index.txt new file mode 100644 index 0000000..323ddb3 --- /dev/null +++ b/docs/_build/html/_sources/index.txt @@ -0,0 +1,60 @@ +.. cloudify-cli documentation master file, created by + sphinx-quickstart on Thu Jun 12 15:30:03 2014. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to cloudify-rest-client's documentation! +================================================ + +Contents: + +.. toctree:: + :maxdepth: 2 + +.. automodule:: cloudify_rest_client.blueprints + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: cloudify_rest_client.client + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: cloudify_rest_client.deployments + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: cloudify_rest_client.events + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: cloudify_rest_client.exceptions + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: cloudify_rest_client.executions + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: cloudify_rest_client.node_instances + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: cloudify_rest_client.nodes + :members: + :undoc-members: + :show-inheritance: + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff --git a/docs/_build/html/_static/ajax-loader.gif b/docs/_build/html/_static/ajax-loader.gif new file mode 100644 index 0000000..61faf8c Binary files /dev/null and b/docs/_build/html/_static/ajax-loader.gif differ diff --git a/docs/_build/html/_static/basic.css b/docs/_build/html/_static/basic.css new file mode 100644 index 0000000..967e36c --- /dev/null +++ b/docs/_build/html/_static/basic.css @@ -0,0 +1,537 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox input[type="text"] { + width: 170px; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + width: 30px; +} + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li div.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable dl, table.indextable dd { + margin-top: 0; + margin-bottom: 0; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- general body styles --------------------------------------------------- */ + +a.headerlink { + visibility: hidden; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.field-list ul { + padding-left: 1em; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px 7px 0 7px; + background-color: #ffe; + width: 40%; + float: right; +} + +p.sidebar-title { + font-weight: bold; +} + +/* -- topics ---------------------------------------------------------------- */ + +div.topic { + border: 1px solid #ccc; + padding: 7px 7px 0 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +div.admonition dl { + margin-bottom: 0; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + border: 0; + border-collapse: collapse; +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +table.field-list td, table.field-list th { + border: 0 !important; +} + +table.footnote td, table.footnote th { + border: 0 !important; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +dl { + margin-bottom: 15px; +} + +dd p { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +dt:target, .highlighted { + background-color: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.optional { + font-size: 1.3em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +td.linenos pre { + padding: 5px 0px; + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + margin-left: 0.5em; +} + +table.highlighttable td { + padding: 0 0.5em 0 0.5em; +} + +tt.descname { + background-color: transparent; + font-weight: bold; + font-size: 1.2em; +} + +tt.descclassname { + background-color: transparent; +} + +tt.xref, a tt { + background-color: transparent; + font-weight: bold; +} + +h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/docs/_build/html/_static/comment-bright.png b/docs/_build/html/_static/comment-bright.png new file mode 100644 index 0000000..551517b Binary files /dev/null and b/docs/_build/html/_static/comment-bright.png differ diff --git a/docs/_build/html/_static/comment-close.png b/docs/_build/html/_static/comment-close.png new file mode 100644 index 0000000..09b54be Binary files /dev/null and b/docs/_build/html/_static/comment-close.png differ diff --git a/docs/_build/html/_static/comment.png b/docs/_build/html/_static/comment.png new file mode 100644 index 0000000..92feb52 Binary files /dev/null and b/docs/_build/html/_static/comment.png differ diff --git a/docs/_build/html/_static/css/badge_only.css b/docs/_build/html/_static/css/badge_only.css new file mode 100644 index 0000000..4868a00 --- /dev/null +++ b/docs/_build/html/_static/css/badge_only.css @@ -0,0 +1 @@ +.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-weight:normal;font-style:normal;src:url("../font/fontawesome_webfont.eot");src:url("../font/fontawesome_webfont.eot?#iefix") format("embedded-opentype"),url("../font/fontawesome_webfont.woff") format("woff"),url("../font/fontawesome_webfont.ttf") format("truetype"),url("../font/fontawesome_webfont.svg#FontAwesome") format("svg")}.fa:before{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .fa{display:inline-block;text-decoration:inherit}li .fa{display:inline-block}li .fa-large:before,li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas li .fa{width:0.8em}ul.fas li .fa-large:before,ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before{content:"\f02d"}.icon-book:before{content:"\f02d"}.fa-caret-down:before{content:"\f0d7"}.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;border-top:solid 10px #343131;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book{float:left}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge .fa-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}img{width:100%;height:auto}} diff --git a/docs/_build/html/_static/css/theme.css b/docs/_build/html/_static/css/theme.css new file mode 100644 index 0000000..f595aab --- /dev/null +++ b/docs/_build/html/_static/css/theme.css @@ -0,0 +1,4 @@ +*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}[hidden]{display:none}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:hover,a:active{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}blockquote{margin:0}dfn{font-style:italic}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:20px 0;padding:0}ins{background:#ff9;color:#000;text-decoration:none}mark{background:#ff0;color:#000;font-style:italic;font-weight:bold}pre,code,.rst-content tt,kbd,samp{font-family:monospace,serif;_font-family:"courier new",monospace;font-size:1em}pre{white-space:pre}q{quotes:none}q:before,q:after{content:"";content:none}small{font-size:85%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}ul,ol,dl{margin:0;padding:0;list-style:none;list-style-image:none}li{list-style:none}dd{margin:0}img{border:0;-ms-interpolation-mode:bicubic;vertical-align:middle;max-width:100%}svg:not(:root){overflow:hidden}figure{margin:0}form{margin:0}fieldset{border:0;margin:0;padding:0}label{cursor:pointer}legend{border:0;*margin-left:-7px;padding:0;white-space:normal}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;*overflow:visible}button[disabled],input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;*width:13px;*height:13px}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;resize:vertical}table{border-collapse:collapse;border-spacing:0}td{vertical-align:top}.chromeframe{margin:0.2em 0;background:#ccc;color:#000;padding:0.2em 0}.ir{display:block;border:0;text-indent:-999em;overflow:hidden;background-color:transparent;background-repeat:no-repeat;text-align:left;direction:ltr;*line-height:0}.ir br{display:none}.hidden{display:none !important;visibility:hidden}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.relative{position:relative}big,small{font-size:100%}@media print{html,body,section{background:none !important}*{box-shadow:none !important;text-shadow:none !important;filter:none !important;-ms-filter:none !important}a,a:visited{text-decoration:underline}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}}.fa:before,.rst-content .admonition-title:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content dl dt .headerlink:before,.icon:before,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-alert,.rst-content .note,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .tip,.rst-content .warning,.rst-content .seealso,.btn,input[type="text"],input[type="password"],input[type="email"],input[type="url"],input[type="date"],input[type="month"],input[type="time"],input[type="datetime"],input[type="datetime-local"],input[type="week"],input[type="number"],input[type="search"],input[type="tel"],input[type="color"],select,textarea,.wy-menu-vertical li.on a,.wy-menu-vertical li.current>a,.wy-side-nav-search>a,.wy-side-nav-search .wy-dropdown>a,.wy-nav-top a{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}/*! + * Font Awesome 4.0.3 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.0.3");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.0.3") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff?v=4.0.3") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.0.3") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa,.rst-content .admonition-title,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content dl dt .headerlink,.icon{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:0.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:0.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left,.rst-content .pull-left.admonition-title,.rst-content h1 .pull-left.headerlink,.rst-content h2 .pull-left.headerlink,.rst-content h3 .pull-left.headerlink,.rst-content h4 .pull-left.headerlink,.rst-content h5 .pull-left.headerlink,.rst-content h6 .pull-left.headerlink,.rst-content dl dt .pull-left.headerlink,.pull-left.icon{margin-right:.3em}.fa.pull-right,.rst-content .pull-right.admonition-title,.rst-content h1 .pull-right.headerlink,.rst-content h2 .pull-right.headerlink,.rst-content h3 .pull-right.headerlink,.rst-content h4 .pull-right.headerlink,.rst-content h5 .pull-right.headerlink,.rst-content h6 .pull-right.headerlink,.rst-content dl dt .pull-right.headerlink,.pull-right.icon{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=$rotation);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=$rotation);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=$rotation);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=$rotation);-webkit-transform:scale(-1, 1);-moz-transform:scale(-1, 1);-ms-transform:scale(-1, 1);-o-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=$rotation);-webkit-transform:scale(1, -1);-moz-transform:scale(1, -1);-ms-transform:scale(1, -1);-o-transform:scale(1, -1);transform:scale(1, -1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before,.icon-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before,.icon-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before{content:"\f057"}.fa-check-circle:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.rst-content .admonition-title:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before,.icon-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before,.icon-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before,.icon-circle-arrow-left:before{content:"\f0a8"}.fa-arrow-circle-right:before,.icon-circle-arrow-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before,.icon-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before,.wy-dropdown .caret:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-asc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-desc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-reply-all:before{content:"\f122"}.fa-mail-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before,.icon-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa,.rst-content .admonition-title,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content dl dt .headerlink,.icon,.wy-dropdown .caret,.wy-inline-validate.wy-inline-validate-success .wy-input-context,.wy-inline-validate.wy-inline-validate-danger .wy-input-context,.wy-inline-validate.wy-inline-validate-warning .wy-input-context,.wy-inline-validate.wy-inline-validate-info .wy-input-context{font-family:inherit}.fa:before,.rst-content .admonition-title:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content dl dt .headerlink:before,.icon:before,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before{font-family:"FontAwesome";display:inline-block;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .fa,a .rst-content .admonition-title,.rst-content a .admonition-title,a .rst-content h1 .headerlink,.rst-content h1 a .headerlink,a .rst-content h2 .headerlink,.rst-content h2 a .headerlink,a .rst-content h3 .headerlink,.rst-content h3 a .headerlink,a .rst-content h4 .headerlink,.rst-content h4 a .headerlink,a .rst-content h5 .headerlink,.rst-content h5 a .headerlink,a .rst-content h6 .headerlink,.rst-content h6 a .headerlink,a .rst-content dl dt .headerlink,.rst-content dl dt a .headerlink,a .icon{display:inline-block;text-decoration:inherit}.btn .fa,.btn .rst-content .admonition-title,.rst-content .btn .admonition-title,.btn .rst-content h1 .headerlink,.rst-content h1 .btn .headerlink,.btn .rst-content h2 .headerlink,.rst-content h2 .btn .headerlink,.btn .rst-content h3 .headerlink,.rst-content h3 .btn .headerlink,.btn .rst-content h4 .headerlink,.rst-content h4 .btn .headerlink,.btn .rst-content h5 .headerlink,.rst-content h5 .btn .headerlink,.btn .rst-content h6 .headerlink,.rst-content h6 .btn .headerlink,.btn .rst-content dl dt .headerlink,.rst-content dl dt .btn .headerlink,.btn .icon,.nav .fa,.nav .rst-content .admonition-title,.rst-content .nav .admonition-title,.nav .rst-content h1 .headerlink,.rst-content h1 .nav .headerlink,.nav .rst-content h2 .headerlink,.rst-content h2 .nav .headerlink,.nav .rst-content h3 .headerlink,.rst-content h3 .nav .headerlink,.nav .rst-content h4 .headerlink,.rst-content h4 .nav .headerlink,.nav .rst-content h5 .headerlink,.rst-content h5 .nav .headerlink,.nav .rst-content h6 .headerlink,.rst-content h6 .nav .headerlink,.nav .rst-content dl dt .headerlink,.rst-content dl dt .nav .headerlink,.nav .icon{display:inline}.btn .fa.fa-large,.btn .rst-content .fa-large.admonition-title,.rst-content .btn .fa-large.admonition-title,.btn .rst-content h1 .fa-large.headerlink,.rst-content h1 .btn .fa-large.headerlink,.btn .rst-content h2 .fa-large.headerlink,.rst-content h2 .btn .fa-large.headerlink,.btn .rst-content h3 .fa-large.headerlink,.rst-content h3 .btn .fa-large.headerlink,.btn .rst-content h4 .fa-large.headerlink,.rst-content h4 .btn .fa-large.headerlink,.btn .rst-content h5 .fa-large.headerlink,.rst-content h5 .btn .fa-large.headerlink,.btn .rst-content h6 .fa-large.headerlink,.rst-content h6 .btn .fa-large.headerlink,.btn .rst-content dl dt .fa-large.headerlink,.rst-content dl dt .btn .fa-large.headerlink,.btn .fa-large.icon,.nav .fa.fa-large,.nav .rst-content .fa-large.admonition-title,.rst-content .nav .fa-large.admonition-title,.nav .rst-content h1 .fa-large.headerlink,.rst-content h1 .nav .fa-large.headerlink,.nav .rst-content h2 .fa-large.headerlink,.rst-content h2 .nav .fa-large.headerlink,.nav .rst-content h3 .fa-large.headerlink,.rst-content h3 .nav .fa-large.headerlink,.nav .rst-content h4 .fa-large.headerlink,.rst-content h4 .nav .fa-large.headerlink,.nav .rst-content h5 .fa-large.headerlink,.rst-content h5 .nav .fa-large.headerlink,.nav .rst-content h6 .fa-large.headerlink,.rst-content h6 .nav .fa-large.headerlink,.nav .rst-content dl dt .fa-large.headerlink,.rst-content dl dt .nav .fa-large.headerlink,.nav .fa-large.icon{line-height:0.9em}.btn .fa.fa-spin,.btn .rst-content .fa-spin.admonition-title,.rst-content .btn .fa-spin.admonition-title,.btn .rst-content h1 .fa-spin.headerlink,.rst-content h1 .btn .fa-spin.headerlink,.btn .rst-content h2 .fa-spin.headerlink,.rst-content h2 .btn .fa-spin.headerlink,.btn .rst-content h3 .fa-spin.headerlink,.rst-content h3 .btn .fa-spin.headerlink,.btn .rst-content h4 .fa-spin.headerlink,.rst-content h4 .btn .fa-spin.headerlink,.btn .rst-content h5 .fa-spin.headerlink,.rst-content h5 .btn .fa-spin.headerlink,.btn .rst-content h6 .fa-spin.headerlink,.rst-content h6 .btn .fa-spin.headerlink,.btn .rst-content dl dt .fa-spin.headerlink,.rst-content dl dt .btn .fa-spin.headerlink,.btn .fa-spin.icon,.nav .fa.fa-spin,.nav .rst-content .fa-spin.admonition-title,.rst-content .nav .fa-spin.admonition-title,.nav .rst-content h1 .fa-spin.headerlink,.rst-content h1 .nav .fa-spin.headerlink,.nav .rst-content h2 .fa-spin.headerlink,.rst-content h2 .nav .fa-spin.headerlink,.nav .rst-content h3 .fa-spin.headerlink,.rst-content h3 .nav .fa-spin.headerlink,.nav .rst-content h4 .fa-spin.headerlink,.rst-content h4 .nav .fa-spin.headerlink,.nav .rst-content h5 .fa-spin.headerlink,.rst-content h5 .nav .fa-spin.headerlink,.nav .rst-content h6 .fa-spin.headerlink,.rst-content h6 .nav .fa-spin.headerlink,.nav .rst-content dl dt .fa-spin.headerlink,.rst-content dl dt .nav .fa-spin.headerlink,.nav .fa-spin.icon{display:inline-block}.btn.fa:before,.rst-content .btn.admonition-title:before,.rst-content h1 .btn.headerlink:before,.rst-content h2 .btn.headerlink:before,.rst-content h3 .btn.headerlink:before,.rst-content h4 .btn.headerlink:before,.rst-content h5 .btn.headerlink:before,.rst-content h6 .btn.headerlink:before,.rst-content dl dt .btn.headerlink:before,.btn.icon:before{opacity:0.5;-webkit-transition:opacity 0.05s ease-in;-moz-transition:opacity 0.05s ease-in;transition:opacity 0.05s ease-in}.btn.fa:hover:before,.rst-content .btn.admonition-title:hover:before,.rst-content h1 .btn.headerlink:hover:before,.rst-content h2 .btn.headerlink:hover:before,.rst-content h3 .btn.headerlink:hover:before,.rst-content h4 .btn.headerlink:hover:before,.rst-content h5 .btn.headerlink:hover:before,.rst-content h6 .btn.headerlink:hover:before,.rst-content dl dt .btn.headerlink:hover:before,.btn.icon:hover:before{opacity:1}.btn-mini .fa:before,.btn-mini .rst-content .admonition-title:before,.rst-content .btn-mini .admonition-title:before,.btn-mini .rst-content h1 .headerlink:before,.rst-content h1 .btn-mini .headerlink:before,.btn-mini .rst-content h2 .headerlink:before,.rst-content h2 .btn-mini .headerlink:before,.btn-mini .rst-content h3 .headerlink:before,.rst-content h3 .btn-mini .headerlink:before,.btn-mini .rst-content h4 .headerlink:before,.rst-content h4 .btn-mini .headerlink:before,.btn-mini .rst-content h5 .headerlink:before,.rst-content h5 .btn-mini .headerlink:before,.btn-mini .rst-content h6 .headerlink:before,.rst-content h6 .btn-mini .headerlink:before,.btn-mini .rst-content dl dt .headerlink:before,.rst-content dl dt .btn-mini .headerlink:before,.btn-mini .icon:before{font-size:14px;vertical-align:-15%}.wy-alert,.rst-content .note,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .tip,.rst-content .warning,.rst-content .seealso{padding:12px;line-height:24px;margin-bottom:24px;background:#e7f2fa}.wy-alert-title,.rst-content .admonition-title{color:#fff;font-weight:bold;display:block;color:#fff;background:#6ab0de;margin:-12px;padding:6px 12px;margin-bottom:12px}.wy-alert.wy-alert-danger,.rst-content .wy-alert-danger.note,.rst-content .wy-alert-danger.attention,.rst-content .wy-alert-danger.caution,.rst-content .danger,.rst-content .error,.rst-content .wy-alert-danger.hint,.rst-content .wy-alert-danger.important,.rst-content .wy-alert-danger.tip,.rst-content .wy-alert-danger.warning,.rst-content .wy-alert-danger.seealso{background:#fdf3f2}.wy-alert.wy-alert-danger .wy-alert-title,.rst-content .wy-alert-danger.note .wy-alert-title,.rst-content .wy-alert-danger.attention .wy-alert-title,.rst-content .wy-alert-danger.caution .wy-alert-title,.rst-content .danger .wy-alert-title,.rst-content .error .wy-alert-title,.rst-content .wy-alert-danger.hint .wy-alert-title,.rst-content .wy-alert-danger.important .wy-alert-title,.rst-content .wy-alert-danger.tip .wy-alert-title,.rst-content .wy-alert-danger.warning .wy-alert-title,.rst-content .wy-alert-danger.seealso .wy-alert-title,.wy-alert.wy-alert-danger .rst-content .admonition-title,.rst-content .wy-alert.wy-alert-danger .admonition-title,.rst-content .wy-alert-danger.note .admonition-title,.rst-content .wy-alert-danger.attention .admonition-title,.rst-content .wy-alert-danger.caution .admonition-title,.rst-content .danger .admonition-title,.rst-content .error .admonition-title,.rst-content .wy-alert-danger.hint .admonition-title,.rst-content .wy-alert-danger.important .admonition-title,.rst-content .wy-alert-danger.tip .admonition-title,.rst-content .wy-alert-danger.warning .admonition-title,.rst-content .wy-alert-danger.seealso .admonition-title{background:#f29f97}.wy-alert.wy-alert-warning,.rst-content .wy-alert-warning.note,.rst-content .attention,.rst-content .caution,.rst-content .wy-alert-warning.danger,.rst-content .wy-alert-warning.error,.rst-content .wy-alert-warning.hint,.rst-content .wy-alert-warning.important,.rst-content .wy-alert-warning.tip,.rst-content .warning,.rst-content .wy-alert-warning.seealso{background:#ffedcc}.wy-alert.wy-alert-warning .wy-alert-title,.rst-content .wy-alert-warning.note .wy-alert-title,.rst-content .attention .wy-alert-title,.rst-content .caution .wy-alert-title,.rst-content .wy-alert-warning.danger .wy-alert-title,.rst-content .wy-alert-warning.error .wy-alert-title,.rst-content .wy-alert-warning.hint .wy-alert-title,.rst-content .wy-alert-warning.important .wy-alert-title,.rst-content .wy-alert-warning.tip .wy-alert-title,.rst-content .warning .wy-alert-title,.rst-content .wy-alert-warning.seealso .wy-alert-title,.wy-alert.wy-alert-warning .rst-content .admonition-title,.rst-content .wy-alert.wy-alert-warning .admonition-title,.rst-content .wy-alert-warning.note .admonition-title,.rst-content .attention .admonition-title,.rst-content .caution .admonition-title,.rst-content .wy-alert-warning.danger .admonition-title,.rst-content .wy-alert-warning.error .admonition-title,.rst-content .wy-alert-warning.hint .admonition-title,.rst-content .wy-alert-warning.important .admonition-title,.rst-content .wy-alert-warning.tip .admonition-title,.rst-content .warning .admonition-title,.rst-content .wy-alert-warning.seealso .admonition-title{background:#f0b37e}.wy-alert.wy-alert-info,.rst-content .note,.rst-content .wy-alert-info.attention,.rst-content .wy-alert-info.caution,.rst-content .wy-alert-info.danger,.rst-content .wy-alert-info.error,.rst-content .wy-alert-info.hint,.rst-content .wy-alert-info.important,.rst-content .wy-alert-info.tip,.rst-content .wy-alert-info.warning,.rst-content .seealso{background:#e7f2fa}.wy-alert.wy-alert-info .wy-alert-title,.rst-content .note .wy-alert-title,.rst-content .wy-alert-info.attention .wy-alert-title,.rst-content .wy-alert-info.caution .wy-alert-title,.rst-content .wy-alert-info.danger .wy-alert-title,.rst-content .wy-alert-info.error .wy-alert-title,.rst-content .wy-alert-info.hint .wy-alert-title,.rst-content .wy-alert-info.important .wy-alert-title,.rst-content .wy-alert-info.tip .wy-alert-title,.rst-content .wy-alert-info.warning .wy-alert-title,.rst-content .seealso .wy-alert-title,.wy-alert.wy-alert-info .rst-content .admonition-title,.rst-content .wy-alert.wy-alert-info .admonition-title,.rst-content .note .admonition-title,.rst-content .wy-alert-info.attention .admonition-title,.rst-content .wy-alert-info.caution .admonition-title,.rst-content .wy-alert-info.danger .admonition-title,.rst-content .wy-alert-info.error .admonition-title,.rst-content .wy-alert-info.hint .admonition-title,.rst-content .wy-alert-info.important .admonition-title,.rst-content .wy-alert-info.tip .admonition-title,.rst-content .wy-alert-info.warning .admonition-title,.rst-content .seealso .admonition-title{background:#6ab0de}.wy-alert.wy-alert-success,.rst-content .wy-alert-success.note,.rst-content .wy-alert-success.attention,.rst-content .wy-alert-success.caution,.rst-content .wy-alert-success.danger,.rst-content .wy-alert-success.error,.rst-content .hint,.rst-content .important,.rst-content .tip,.rst-content .wy-alert-success.warning,.rst-content .wy-alert-success.seealso{background:#dbfaf4}.wy-alert.wy-alert-success .wy-alert-title,.rst-content .wy-alert-success.note .wy-alert-title,.rst-content .wy-alert-success.attention .wy-alert-title,.rst-content .wy-alert-success.caution .wy-alert-title,.rst-content .wy-alert-success.danger .wy-alert-title,.rst-content .wy-alert-success.error .wy-alert-title,.rst-content .hint .wy-alert-title,.rst-content .important .wy-alert-title,.rst-content .tip .wy-alert-title,.rst-content .wy-alert-success.warning .wy-alert-title,.rst-content .wy-alert-success.seealso .wy-alert-title,.wy-alert.wy-alert-success .rst-content .admonition-title,.rst-content .wy-alert.wy-alert-success .admonition-title,.rst-content .wy-alert-success.note .admonition-title,.rst-content .wy-alert-success.attention .admonition-title,.rst-content .wy-alert-success.caution .admonition-title,.rst-content .wy-alert-success.danger .admonition-title,.rst-content .wy-alert-success.error .admonition-title,.rst-content .hint .admonition-title,.rst-content .important .admonition-title,.rst-content .tip .admonition-title,.rst-content .wy-alert-success.warning .admonition-title,.rst-content .wy-alert-success.seealso .admonition-title{background:#1abc9c}.wy-alert.wy-alert-neutral,.rst-content .wy-alert-neutral.note,.rst-content .wy-alert-neutral.attention,.rst-content .wy-alert-neutral.caution,.rst-content .wy-alert-neutral.danger,.rst-content .wy-alert-neutral.error,.rst-content .wy-alert-neutral.hint,.rst-content .wy-alert-neutral.important,.rst-content .wy-alert-neutral.tip,.rst-content .wy-alert-neutral.warning,.rst-content .wy-alert-neutral.seealso{background:#f3f6f6}.wy-alert.wy-alert-neutral .wy-alert-title,.rst-content .wy-alert-neutral.note .wy-alert-title,.rst-content .wy-alert-neutral.attention .wy-alert-title,.rst-content .wy-alert-neutral.caution .wy-alert-title,.rst-content .wy-alert-neutral.danger .wy-alert-title,.rst-content .wy-alert-neutral.error .wy-alert-title,.rst-content .wy-alert-neutral.hint .wy-alert-title,.rst-content .wy-alert-neutral.important .wy-alert-title,.rst-content .wy-alert-neutral.tip .wy-alert-title,.rst-content .wy-alert-neutral.warning .wy-alert-title,.rst-content .wy-alert-neutral.seealso .wy-alert-title,.wy-alert.wy-alert-neutral .rst-content .admonition-title,.rst-content .wy-alert.wy-alert-neutral .admonition-title,.rst-content .wy-alert-neutral.note .admonition-title,.rst-content .wy-alert-neutral.attention .admonition-title,.rst-content .wy-alert-neutral.caution .admonition-title,.rst-content .wy-alert-neutral.danger .admonition-title,.rst-content .wy-alert-neutral.error .admonition-title,.rst-content .wy-alert-neutral.hint .admonition-title,.rst-content .wy-alert-neutral.important .admonition-title,.rst-content .wy-alert-neutral.tip .admonition-title,.rst-content .wy-alert-neutral.warning .admonition-title,.rst-content .wy-alert-neutral.seealso .admonition-title{color:#404040;background:#e1e4e5}.wy-alert.wy-alert-neutral a,.rst-content .wy-alert-neutral.note a,.rst-content .wy-alert-neutral.attention a,.rst-content .wy-alert-neutral.caution a,.rst-content .wy-alert-neutral.danger a,.rst-content .wy-alert-neutral.error a,.rst-content .wy-alert-neutral.hint a,.rst-content .wy-alert-neutral.important a,.rst-content .wy-alert-neutral.tip a,.rst-content .wy-alert-neutral.warning a,.rst-content .wy-alert-neutral.seealso a{color:#2980b9}.wy-alert p:last-child,.rst-content .note p:last-child,.rst-content .attention p:last-child,.rst-content .caution p:last-child,.rst-content .danger p:last-child,.rst-content .error p:last-child,.rst-content .hint p:last-child,.rst-content .important p:last-child,.rst-content .tip p:last-child,.rst-content .warning p:last-child,.rst-content .seealso p:last-child{margin-bottom:0}.wy-tray-container{position:fixed;bottom:0px;left:0;z-index:600}.wy-tray-container li{display:block;width:300px;background:transparent;color:#fff;text-align:center;box-shadow:0 5px 5px 0 rgba(0,0,0,0.1);padding:0 24px;min-width:20%;opacity:0;height:0;line-height:60px;overflow:hidden;-webkit-transition:all 0.3s ease-in;-moz-transition:all 0.3s ease-in;transition:all 0.3s ease-in}.wy-tray-container li.wy-tray-item-success{background:#27ae60}.wy-tray-container li.wy-tray-item-info{background:#2980b9}.wy-tray-container li.wy-tray-item-warning{background:#e67e22}.wy-tray-container li.wy-tray-item-danger{background:#e74c3c}.wy-tray-container li.on{opacity:1;height:60px}button{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;cursor:pointer;line-height:normal;-webkit-appearance:button;*overflow:visible}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}button[disabled]{cursor:default}.btn{display:inline-block;border-radius:2px;line-height:normal;white-space:nowrap;text-align:center;cursor:pointer;font-size:100%;padding:6px 12px 8px 12px;color:#fff;border:1px solid rgba(0,0,0,0.1);background-color:#27ae60;text-decoration:none;font-weight:normal;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;box-shadow:0px 1px 2px -1px rgba(255,255,255,0.5) inset,0px -2px 0px 0px rgba(0,0,0,0.1) inset;outline-none:false;vertical-align:middle;*display:inline;zoom:1;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:all 0.1s linear;-moz-transition:all 0.1s linear;transition:all 0.1s linear}.btn-hover{background:#2e8ece;color:#fff}.btn:hover{background:#2cc36b;color:#fff}.btn:focus{background:#2cc36b;outline:0}.btn:active{box-shadow:0px -1px 0px 0px rgba(0,0,0,0.05) inset,0px 2px 0px 0px rgba(0,0,0,0.1) inset;padding:8px 12px 6px 12px}.btn:disabled{background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=40);opacity:0.4;cursor:not-allowed;box-shadow:none}.btn-disabled{background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=40);opacity:0.4;cursor:not-allowed;box-shadow:none}.btn-disabled:hover,.btn-disabled:focus,.btn-disabled:active{background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=40);opacity:0.4;cursor:not-allowed;box-shadow:none}.btn::-moz-focus-inner{padding:0;border:0}.btn-small{font-size:80%}.btn-info{background-color:#2980b9 !important}.btn-info:hover{background-color:#2e8ece !important}.btn-neutral{background-color:#f3f6f6 !important;color:#404040 !important}.btn-neutral:hover{background-color:#e5ebeb !important;color:#404040}.btn-neutral:visited{color:#404040 !important}.btn-success{background-color:#27ae60 !important}.btn-success:hover{background-color:#295 !important}.btn-danger{background-color:#e74c3c !important}.btn-danger:hover{background-color:#ea6153 !important}.btn-warning{background-color:#e67e22 !important}.btn-warning:hover{background-color:#e98b39 !important}.btn-invert{background-color:#222}.btn-invert:hover{background-color:#2f2f2f !important}.btn-link{background-color:transparent !important;color:#2980b9;box-shadow:none;border-color:transparent !important}.btn-link:hover{background-color:transparent !important;color:#409ad5 !important;box-shadow:none}.btn-link:active{background-color:transparent !important;color:#409ad5 !important;box-shadow:none}.btn-link:visited{color:#9b59b6}.wy-btn-group .btn,.wy-control .btn{vertical-align:middle}.wy-btn-group{margin-bottom:24px;*zoom:1}.wy-btn-group:before,.wy-btn-group:after{display:table;content:""}.wy-btn-group:after{clear:both}.wy-dropdown{position:relative;display:inline-block}.wy-dropdown-menu{position:absolute;left:0;display:none;float:left;top:100%;min-width:100%;background:#fcfcfc;z-index:100;border:solid 1px #cfd7dd;box-shadow:0 2px 2px 0 rgba(0,0,0,0.1);padding:12px}.wy-dropdown-menu>dd>a{display:block;clear:both;color:#404040;white-space:nowrap;font-size:90%;padding:0 12px;cursor:pointer}.wy-dropdown-menu>dd>a:hover{background:#2980b9;color:#fff}.wy-dropdown-menu>dd.divider{border-top:solid 1px #cfd7dd;margin:6px 0}.wy-dropdown-menu>dd.search{padding-bottom:12px}.wy-dropdown-menu>dd.search input[type="search"]{width:100%}.wy-dropdown-menu>dd.call-to-action{background:#e3e3e3;text-transform:uppercase;font-weight:500;font-size:80%}.wy-dropdown-menu>dd.call-to-action:hover{background:#e3e3e3}.wy-dropdown-menu>dd.call-to-action .btn{color:#fff}.wy-dropdown.wy-dropdown-up .wy-dropdown-menu{bottom:100%;top:auto;left:auto;right:0}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu{background:#fcfcfc;margin-top:2px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a{padding:6px 12px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a:hover{background:#2980b9;color:#fff}.wy-dropdown.wy-dropdown-left .wy-dropdown-menu{right:0;text-align:right}.wy-dropdown-arrow:before{content:" ";border-bottom:5px solid #f5f5f5;border-left:5px solid transparent;border-right:5px solid transparent;position:absolute;display:block;top:-4px;left:50%;margin-left:-3px}.wy-dropdown-arrow.wy-dropdown-arrow-left:before{left:11px}.wy-form-stacked select{display:block}.wy-form-aligned input,.wy-form-aligned textarea,.wy-form-aligned select,.wy-form-aligned .wy-help-inline,.wy-form-aligned label{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-form-aligned .wy-control-group>label{display:inline-block;vertical-align:middle;width:10em;margin:0.5em 1em 0 0;float:left}.wy-form-aligned .wy-control{float:left}.wy-form-aligned .wy-control label{display:block}.wy-form-aligned .wy-control select{margin-top:0.5em}fieldset{border:0;margin:0;padding:0}legend{display:block;width:100%;border:0;padding:0;white-space:normal;margin-bottom:24px;font-size:150%;*margin-left:-7px}label{display:block;margin:0 0 0.3125em 0;color:#999;font-size:90%}input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}.wy-control-group{margin-bottom:24px;*zoom:1;max-width:68em;margin-left:auto;margin-right:auto;*zoom:1}.wy-control-group:before,.wy-control-group:after{display:table;content:""}.wy-control-group:after{clear:both}.wy-control-group:before,.wy-control-group:after{display:table;content:""}.wy-control-group:after{clear:both}.wy-control-group.wy-control-group-required>label:after{content:" *";color:#e74c3c}.wy-control-group .wy-form-full,.wy-control-group .wy-form-halves,.wy-control-group .wy-form-thirds{padding-bottom:12px}.wy-control-group .wy-form-full select,.wy-control-group .wy-form-halves select,.wy-control-group .wy-form-thirds select{width:100%}.wy-control-group .wy-form-full input[type="text"],.wy-control-group .wy-form-full input[type="password"],.wy-control-group .wy-form-full input[type="email"],.wy-control-group .wy-form-full input[type="url"],.wy-control-group .wy-form-full input[type="date"],.wy-control-group .wy-form-full input[type="month"],.wy-control-group .wy-form-full input[type="time"],.wy-control-group .wy-form-full input[type="datetime"],.wy-control-group .wy-form-full input[type="datetime-local"],.wy-control-group .wy-form-full input[type="week"],.wy-control-group .wy-form-full input[type="number"],.wy-control-group .wy-form-full input[type="search"],.wy-control-group .wy-form-full input[type="tel"],.wy-control-group .wy-form-full input[type="color"],.wy-control-group .wy-form-halves input[type="text"],.wy-control-group .wy-form-halves input[type="password"],.wy-control-group .wy-form-halves input[type="email"],.wy-control-group .wy-form-halves input[type="url"],.wy-control-group .wy-form-halves input[type="date"],.wy-control-group .wy-form-halves input[type="month"],.wy-control-group .wy-form-halves input[type="time"],.wy-control-group .wy-form-halves input[type="datetime"],.wy-control-group .wy-form-halves input[type="datetime-local"],.wy-control-group .wy-form-halves input[type="week"],.wy-control-group .wy-form-halves input[type="number"],.wy-control-group .wy-form-halves input[type="search"],.wy-control-group .wy-form-halves input[type="tel"],.wy-control-group .wy-form-halves input[type="color"],.wy-control-group .wy-form-thirds input[type="text"],.wy-control-group .wy-form-thirds input[type="password"],.wy-control-group .wy-form-thirds input[type="email"],.wy-control-group .wy-form-thirds input[type="url"],.wy-control-group .wy-form-thirds input[type="date"],.wy-control-group .wy-form-thirds input[type="month"],.wy-control-group .wy-form-thirds input[type="time"],.wy-control-group .wy-form-thirds input[type="datetime"],.wy-control-group .wy-form-thirds input[type="datetime-local"],.wy-control-group .wy-form-thirds input[type="week"],.wy-control-group .wy-form-thirds input[type="number"],.wy-control-group .wy-form-thirds input[type="search"],.wy-control-group .wy-form-thirds input[type="tel"],.wy-control-group .wy-form-thirds input[type="color"]{width:100%}.wy-control-group .wy-form-full{display:block;float:left;margin-right:2.35765%;width:100%;margin-right:0}.wy-control-group .wy-form-full:last-child{margin-right:0}.wy-control-group .wy-form-halves{display:block;float:left;margin-right:2.35765%;width:48.82117%}.wy-control-group .wy-form-halves:last-child{margin-right:0}.wy-control-group .wy-form-halves:nth-of-type(2n){margin-right:0}.wy-control-group .wy-form-halves:nth-of-type(2n+1){clear:left}.wy-control-group .wy-form-thirds{display:block;float:left;margin-right:2.35765%;width:31.76157%}.wy-control-group .wy-form-thirds:last-child{margin-right:0}.wy-control-group .wy-form-thirds:nth-of-type(3n){margin-right:0}.wy-control-group .wy-form-thirds:nth-of-type(3n+1){clear:left}.wy-control-group.wy-control-group-no-input .wy-control{margin:0.5em 0 0 0;font-size:90%}.wy-control-group.fluid-input input[type="text"],.wy-control-group.fluid-input input[type="password"],.wy-control-group.fluid-input input[type="email"],.wy-control-group.fluid-input input[type="url"],.wy-control-group.fluid-input input[type="date"],.wy-control-group.fluid-input input[type="month"],.wy-control-group.fluid-input input[type="time"],.wy-control-group.fluid-input input[type="datetime"],.wy-control-group.fluid-input input[type="datetime-local"],.wy-control-group.fluid-input input[type="week"],.wy-control-group.fluid-input input[type="number"],.wy-control-group.fluid-input input[type="search"],.wy-control-group.fluid-input input[type="tel"],.wy-control-group.fluid-input input[type="color"]{width:100%}.wy-form-message-inline{display:inline-block;padding-left:0.3em;color:#666;vertical-align:middle;font-size:90%}.wy-form-message{display:block;color:#ccc;font-size:70%;margin-top:0.3125em;font-style:italic}input{line-height:normal}input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;*overflow:visible}input[type="text"],input[type="password"],input[type="email"],input[type="url"],input[type="date"],input[type="month"],input[type="time"],input[type="datetime"],input[type="datetime-local"],input[type="week"],input[type="number"],input[type="search"],input[type="tel"],input[type="color"]{-webkit-appearance:none;padding:6px;display:inline-block;border:1px solid #ccc;font-size:80%;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;box-shadow:inset 0 1px 3px #ddd;border-radius:0;-webkit-transition:border 0.3s linear;-moz-transition:border 0.3s linear;transition:border 0.3s linear}input[type="datetime-local"]{padding:0.34375em 0.625em}input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0;margin-right:0.3125em;*height:13px;*width:13px}input[type="search"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}input[type="text"]:focus,input[type="password"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus{outline:0;outline:thin dotted \9;border-color:#333}input.no-focus:focus{border-color:#ccc !important}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:1px auto #129fea}input[type="text"][disabled],input[type="password"][disabled],input[type="email"][disabled],input[type="url"][disabled],input[type="date"][disabled],input[type="month"][disabled],input[type="time"][disabled],input[type="datetime"][disabled],input[type="datetime-local"][disabled],input[type="week"][disabled],input[type="number"][disabled],input[type="search"][disabled],input[type="tel"][disabled],input[type="color"][disabled]{cursor:not-allowed;background-color:#f3f6f6;color:#cad2d3}input:focus:invalid,textarea:focus:invalid,select:focus:invalid{color:#e74c3c;border:1px solid #e74c3c}input:focus:invalid:focus,textarea:focus:invalid:focus,select:focus:invalid:focus{border-color:#e74c3c}input[type="file"]:focus:invalid:focus,input[type="radio"]:focus:invalid:focus,input[type="checkbox"]:focus:invalid:focus{outline-color:#e74c3c}input.wy-input-large{padding:12px;font-size:100%}textarea{overflow:auto;vertical-align:top;width:100%}select,textarea{padding:0.5em 0.625em;display:inline-block;border:1px solid #ccc;font-size:0.8em;box-shadow:inset 0 1px 3px #ddd;-webkit-transition:border 0.3s linear;-moz-transition:border 0.3s linear;transition:border 0.3s linear}select{border:1px solid #ccc;background-color:#fff}select[multiple]{height:auto}select:focus,textarea:focus{outline:0}select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#fff;color:#cad2d3;border-color:transparent}.wy-checkbox,.wy-radio{margin:6px 0;color:#404040;display:block}.wy-checkbox input,.wy-radio input{vertical-align:baseline}.wy-form-message-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-input-prefix,.wy-input-suffix{white-space:nowrap}.wy-input-prefix .wy-input-context,.wy-input-suffix .wy-input-context{padding:6px;display:inline-block;font-size:80%;background-color:#f3f6f6;border:solid 1px #ccc;color:#999}.wy-input-suffix .wy-input-context{border-left:0}.wy-input-prefix .wy-input-context{border-right:0}.wy-control-group.wy-control-group-error .wy-form-message,.wy-control-group.wy-control-group-error>label{color:#e74c3c}.wy-control-group.wy-control-group-error input[type="text"],.wy-control-group.wy-control-group-error input[type="password"],.wy-control-group.wy-control-group-error input[type="email"],.wy-control-group.wy-control-group-error input[type="url"],.wy-control-group.wy-control-group-error input[type="date"],.wy-control-group.wy-control-group-error input[type="month"],.wy-control-group.wy-control-group-error input[type="time"],.wy-control-group.wy-control-group-error input[type="datetime"],.wy-control-group.wy-control-group-error input[type="datetime-local"],.wy-control-group.wy-control-group-error input[type="week"],.wy-control-group.wy-control-group-error input[type="number"],.wy-control-group.wy-control-group-error input[type="search"],.wy-control-group.wy-control-group-error input[type="tel"],.wy-control-group.wy-control-group-error input[type="color"]{border:solid 1px #e74c3c}.wy-control-group.wy-control-group-error textarea{border:solid 1px #e74c3c}.wy-inline-validate{white-space:nowrap}.wy-inline-validate .wy-input-context{padding:0.5em 0.625em;display:inline-block;font-size:80%}.wy-inline-validate.wy-inline-validate-success .wy-input-context{color:#27ae60}.wy-inline-validate.wy-inline-validate-danger .wy-input-context{color:#e74c3c}.wy-inline-validate.wy-inline-validate-warning .wy-input-context{color:#e67e22}.wy-inline-validate.wy-inline-validate-info .wy-input-context{color:#2980b9}.rotate-90{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.rotate-180{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.rotate-270{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.mirror{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);-o-transform:scaleX(-1);transform:scaleX(-1)}.mirror.rotate-90{-webkit-transform:scaleX(-1) rotate(90deg);-moz-transform:scaleX(-1) rotate(90deg);-ms-transform:scaleX(-1) rotate(90deg);-o-transform:scaleX(-1) rotate(90deg);transform:scaleX(-1) rotate(90deg)}.mirror.rotate-180{-webkit-transform:scaleX(-1) rotate(180deg);-moz-transform:scaleX(-1) rotate(180deg);-ms-transform:scaleX(-1) rotate(180deg);-o-transform:scaleX(-1) rotate(180deg);transform:scaleX(-1) rotate(180deg)}.mirror.rotate-270{-webkit-transform:scaleX(-1) rotate(270deg);-moz-transform:scaleX(-1) rotate(270deg);-ms-transform:scaleX(-1) rotate(270deg);-o-transform:scaleX(-1) rotate(270deg);transform:scaleX(-1) rotate(270deg)}@media only screen and (max-width: 480px){.wy-form button[type="submit"]{margin:0.7em 0 0}.wy-form input[type="text"],.wy-form input[type="password"],.wy-form input[type="email"],.wy-form input[type="url"],.wy-form input[type="date"],.wy-form input[type="month"],.wy-form input[type="time"],.wy-form input[type="datetime"],.wy-form input[type="datetime-local"],.wy-form input[type="week"],.wy-form input[type="number"],.wy-form input[type="search"],.wy-form input[type="tel"],.wy-form input[type="color"]{margin-bottom:0.3em;display:block}.wy-form label{margin-bottom:0.3em;display:block}.wy-form input[type="password"],.wy-form input[type="email"],.wy-form input[type="url"],.wy-form input[type="date"],.wy-form input[type="month"],.wy-form input[type="time"],.wy-form input[type="datetime"],.wy-form input[type="datetime-local"],.wy-form input[type="week"],.wy-form input[type="number"],.wy-form input[type="search"],.wy-form input[type="tel"],.wy-form input[type="color"]{margin-bottom:0}.wy-form-aligned .wy-control-group label{margin-bottom:0.3em;text-align:left;display:block;width:100%}.wy-form-aligned .wy-control{margin:1.5em 0 0 0}.wy-form .wy-help-inline,.wy-form-message-inline,.wy-form-message{display:block;font-size:80%;padding:6px 0}}@media screen and (max-width: 768px){.tablet-hide{display:none}}@media screen and (max-width: 480px){.mobile-hide{display:none}}.float-left{float:left}.float-right{float:right}.full-width{width:100%}.wy-table,.rst-content table.docutils,.rst-content table.field-list{border-collapse:collapse;border-spacing:0;empty-cells:show;margin-bottom:24px}.wy-table caption,.rst-content table.docutils caption,.rst-content table.field-list caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.wy-table td,.rst-content table.docutils td,.rst-content table.field-list td,.wy-table th,.rst-content table.docutils th,.rst-content table.field-list th{font-size:90%;margin:0;overflow:visible;padding:8px 16px}.wy-table td:first-child,.rst-content table.docutils td:first-child,.rst-content table.field-list td:first-child,.wy-table th:first-child,.rst-content table.docutils th:first-child,.rst-content table.field-list th:first-child{border-left-width:0}.wy-table thead,.rst-content table.docutils thead,.rst-content table.field-list thead{color:#000;text-align:left;vertical-align:bottom;white-space:nowrap}.wy-table thead th,.rst-content table.docutils thead th,.rst-content table.field-list thead th{font-weight:bold;border-bottom:solid 2px #e1e4e5}.wy-table td,.rst-content table.docutils td,.rst-content table.field-list td{background-color:transparent;vertical-align:middle}.wy-table td p,.rst-content table.docutils td p,.rst-content table.field-list td p{line-height:18px;margin-bottom:0}.wy-table .wy-table-cell-min,.rst-content table.docutils .wy-table-cell-min,.rst-content table.field-list .wy-table-cell-min{width:1%;padding-right:0}.wy-table .wy-table-cell-min input[type=checkbox],.rst-content table.docutils .wy-table-cell-min input[type=checkbox],.rst-content table.field-list .wy-table-cell-min input[type=checkbox],.wy-table .wy-table-cell-min input[type=checkbox],.rst-content table.docutils .wy-table-cell-min input[type=checkbox],.rst-content table.field-list .wy-table-cell-min input[type=checkbox]{margin:0}.wy-table-secondary{color:gray;font-size:90%}.wy-table-tertiary{color:gray;font-size:80%}.wy-table-odd td,.wy-table-striped tr:nth-child(2n-1) td,.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td{background-color:#f3f6f6}.wy-table-backed{background-color:#f3f6f6}.wy-table-bordered-all,.rst-content table.docutils{border:1px solid #e1e4e5}.wy-table-bordered-all td,.rst-content table.docutils td{border-bottom:1px solid #e1e4e5;border-left:1px solid #e1e4e5}.wy-table-bordered-all tbody>tr:last-child td,.rst-content table.docutils tbody>tr:last-child td{border-bottom-width:0}.wy-table-bordered{border:1px solid #e1e4e5}.wy-table-bordered-rows td{border-bottom:1px solid #e1e4e5}.wy-table-bordered-rows tbody>tr:last-child td{border-bottom-width:0}.wy-table-horizontal tbody>tr:last-child td{border-bottom-width:0}.wy-table-horizontal td,.wy-table-horizontal th{border-width:0 0 1px 0;border-bottom:1px solid #e1e4e5}.wy-table-horizontal tbody>tr:last-child td{border-bottom-width:0}.wy-table-responsive{margin-bottom:24px;max-width:100%;overflow:auto}.wy-table-responsive table{margin-bottom:0 !important}.wy-table-responsive table td,.wy-table-responsive table th{white-space:nowrap}a{color:#2980b9;text-decoration:none}a:hover{color:#3091d1}a:visited{color:#9b59b6}html{height:100%;overflow-x:hidden}body{font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;font-weight:normal;color:#404040;min-height:100%;overflow-x:hidden;background:#edf0f2}.wy-text-left{text-align:left}.wy-text-center{text-align:center}.wy-text-right{text-align:right}.wy-text-large{font-size:120%}.wy-text-normal{font-size:100%}.wy-text-small,small{font-size:80%}.wy-text-strike{text-decoration:line-through}.wy-text-warning{color:#e67e22 !important}a.wy-text-warning:hover{color:#eb9950 !important}.wy-text-info{color:#2980b9 !important}a.wy-text-info:hover{color:#409ad5 !important}.wy-text-success{color:#27ae60 !important}a.wy-text-success:hover{color:#36d278 !important}.wy-text-danger{color:#e74c3c !important}a.wy-text-danger:hover{color:#ed7669 !important}.wy-text-neutral{color:#404040 !important}a.wy-text-neutral:hover{color:#595959 !important}h1,h2,h3,h4,h5,h6,legend{margin-top:0;font-weight:700;font-family:"Roboto Slab","ff-tisa-web-pro","Georgia",Arial,sans-serif}p{line-height:24px;margin:0;font-size:16px;margin-bottom:24px}h1{font-size:175%}h2{font-size:150%}h3{font-size:125%}h4{font-size:115%}h5{font-size:110%}h6{font-size:100%}code,.rst-content tt{white-space:nowrap;max-width:100%;background:#fff;border:solid 1px #e1e4e5;font-size:75%;padding:0 5px;font-family:"Incosolata","Consolata","Monaco",monospace;color:#e74c3c;overflow-x:auto}code.code-large,.rst-content tt.code-large{font-size:90%}.wy-plain-list-disc,.rst-content .section ul,.rst-content .toctree-wrapper ul,article ul{list-style:disc;line-height:24px;margin-bottom:24px}.wy-plain-list-disc li,.rst-content .section ul li,.rst-content .toctree-wrapper ul li,article ul li{list-style:disc;margin-left:24px}.wy-plain-list-disc li ul,.rst-content .section ul li ul,.rst-content .toctree-wrapper ul li ul,article ul li ul{margin-bottom:0}.wy-plain-list-disc li li,.rst-content .section ul li li,.rst-content .toctree-wrapper ul li li,article ul li li{list-style:circle}.wy-plain-list-disc li li li,.rst-content .section ul li li li,.rst-content .toctree-wrapper ul li li li,article ul li li li{list-style:square}.wy-plain-list-decimal,.rst-content .section ol,.rst-content ol.arabic,article ol{list-style:decimal;line-height:24px;margin-bottom:24px}.wy-plain-list-decimal li,.rst-content .section ol li,.rst-content ol.arabic li,article ol li{list-style:decimal;margin-left:24px}.codeblock-example{border:1px solid #e1e4e5;border-bottom:none;padding:24px;padding-top:48px;font-weight:500;background:#fff;position:relative}.codeblock-example:after{content:"Example";position:absolute;top:0px;left:0px;background:#9b59b6;color:#fff;padding:6px 12px}.codeblock-example.prettyprint-example-only{border:1px solid #e1e4e5;margin-bottom:24px}.codeblock,pre.literal-block,.rst-content .literal-block,.rst-content pre.literal-block,div[class^='highlight']{border:1px solid #e1e4e5;padding:0px;overflow-x:auto;background:#fff;margin:1px 0 24px 0}.codeblock div[class^='highlight'],pre.literal-block div[class^='highlight'],.rst-content .literal-block div[class^='highlight'],div[class^='highlight'] div[class^='highlight']{border:none;background:none;margin:0}div[class^='highlight'] td.code{width:100%}.linenodiv pre{border-right:solid 1px #e6e9ea;margin:0;padding:12px 12px;font-family:"Incosolata","Consolata","Monaco",monospace;font-size:12px;line-height:1.5;color:#d9d9d9}div[class^='highlight'] pre{white-space:pre;margin:0;padding:12px 12px;font-family:"Incosolata","Consolata","Monaco",monospace;font-size:12px;line-height:1.5;display:block;overflow:auto;color:#404040}@media print{.codeblock,pre.literal-block,.rst-content .literal-block,.rst-content pre.literal-block,div[class^='highlight'],div[class^='highlight'] pre{white-space:pre-wrap}}.hll{background-color:#ffc;margin:0 -12px;padding:0 12px;display:block}.c{color:#998;font-style:italic}.err{color:#a61717;background-color:#e3d2d2}.k{font-weight:bold}.o{font-weight:bold}.cm{color:#998;font-style:italic}.cp{color:#999;font-weight:bold}.c1{color:#998;font-style:italic}.cs{color:#999;font-weight:bold;font-style:italic}.gd{color:#000;background-color:#fdd}.gd .x{color:#000;background-color:#faa}.ge{font-style:italic}.gr{color:#a00}.gh{color:#999}.gi{color:#000;background-color:#dfd}.gi .x{color:#000;background-color:#afa}.go{color:#888}.gp{color:#555}.gs{font-weight:bold}.gu{color:purple;font-weight:bold}.gt{color:#a00}.kc{font-weight:bold}.kd{font-weight:bold}.kn{font-weight:bold}.kp{font-weight:bold}.kr{font-weight:bold}.kt{color:#458;font-weight:bold}.m{color:#099}.s{color:#d14}.n{color:#333}.na{color:teal}.nb{color:#0086b3}.nc{color:#458;font-weight:bold}.no{color:teal}.ni{color:purple}.ne{color:#900;font-weight:bold}.nf{color:#900;font-weight:bold}.nn{color:#555}.nt{color:navy}.nv{color:teal}.ow{font-weight:bold}.w{color:#bbb}.mf{color:#099}.mh{color:#099}.mi{color:#099}.mo{color:#099}.sb{color:#d14}.sc{color:#d14}.sd{color:#d14}.s2{color:#d14}.se{color:#d14}.sh{color:#d14}.si{color:#d14}.sx{color:#d14}.sr{color:#009926}.s1{color:#d14}.ss{color:#990073}.bp{color:#999}.vc{color:teal}.vg{color:teal}.vi{color:teal}.il{color:#099}.gc{color:#999;background-color:#eaf2f5}.wy-breadcrumbs li{display:inline-block}.wy-breadcrumbs li.wy-breadcrumbs-aside{float:right}.wy-breadcrumbs li a{display:inline-block;padding:5px}.wy-breadcrumbs li a:first-child{padding-left:0}.wy-breadcrumbs-extra{margin-bottom:0;color:#b3b3b3;font-size:80%;display:inline-block}@media screen and (max-width: 480px){.wy-breadcrumbs-extra{display:none}.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}@media print{.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}.wy-affix{position:fixed;top:1.618em}.wy-menu a:hover{text-decoration:none}.wy-menu-horiz{*zoom:1}.wy-menu-horiz:before,.wy-menu-horiz:after{display:table;content:""}.wy-menu-horiz:after{clear:both}.wy-menu-horiz ul,.wy-menu-horiz li{display:inline-block}.wy-menu-horiz li:hover{background:rgba(255,255,255,0.1)}.wy-menu-horiz li.divide-left{border-left:solid 1px #404040}.wy-menu-horiz li.divide-right{border-right:solid 1px #404040}.wy-menu-horiz a{height:32px;display:inline-block;line-height:32px;padding:0 16px}.wy-menu-vertical header{height:32px;display:inline-block;line-height:32px;padding:0 1.618em;display:block;font-weight:bold;text-transform:uppercase;font-size:80%;color:#2980b9;white-space:nowrap}.wy-menu-vertical ul{margin-bottom:0}.wy-menu-vertical li.divide-top{border-top:solid 1px #404040}.wy-menu-vertical li.divide-bottom{border-bottom:solid 1px #404040}.wy-menu-vertical li.current{background:#e3e3e3}.wy-menu-vertical li.current a{color:gray;border-right:solid 1px #c9c9c9;padding:0.4045em 2.427em}.wy-menu-vertical li.current a:hover{background:#d6d6d6}.wy-menu-vertical li.on a,.wy-menu-vertical li.current>a{color:#404040;padding:0.4045em 1.618em;font-weight:bold;position:relative;background:#fcfcfc;border:none;border-bottom:solid 1px #c9c9c9;border-top:solid 1px #c9c9c9;padding-left:1.618em -4px}.wy-menu-vertical li.on a:hover,.wy-menu-vertical li.current>a:hover{background:#fcfcfc}.wy-menu-vertical li.toctree-l2.current>a{background:#c9c9c9;padding:0.4045em 2.427em}.wy-menu-vertical li.current ul{display:block}.wy-menu-vertical li ul{margin-bottom:0;display:none}.wy-menu-vertical .local-toc li ul{display:block}.wy-menu-vertical li ul li a{margin-bottom:0;color:#b3b3b3;font-weight:normal}.wy-menu-vertical a{display:inline-block;line-height:18px;padding:0.4045em 1.618em;display:block;position:relative;font-size:90%;color:#b3b3b3}.wy-menu-vertical a:hover{background-color:#4e4a4a;cursor:pointer}.wy-menu-vertical a:active{background-color:#2980b9;cursor:pointer;color:#fff}.wy-side-nav-search{z-index:200;background-color:#2980b9;text-align:center;padding:0.809em;display:block;color:#fcfcfc;margin-bottom:0.809em}.wy-side-nav-search input[type=text]{width:100%;border-radius:50px;padding:6px 12px;border-color:#2472a4}.wy-side-nav-search img{display:block;margin:auto auto 0.809em auto;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-side-nav-search>a,.wy-side-nav-search .wy-dropdown>a{color:#fcfcfc;font-size:100%;font-weight:bold;display:inline-block;padding:4px 6px;margin-bottom:0.809em}.wy-side-nav-search>a:hover,.wy-side-nav-search .wy-dropdown>a:hover{background:rgba(255,255,255,0.1)}.wy-nav .wy-menu-vertical header{color:#2980b9}.wy-nav .wy-menu-vertical a{color:#b3b3b3}.wy-nav .wy-menu-vertical a:hover{background-color:#2980b9;color:#fff}[data-menu-wrap]{-webkit-transition:all 0.2s ease-in;-moz-transition:all 0.2s ease-in;transition:all 0.2s ease-in;position:absolute;opacity:1;width:100%;opacity:0}[data-menu-wrap].move-center{left:0;right:auto;opacity:1}[data-menu-wrap].move-left{right:auto;left:-100%;opacity:0}[data-menu-wrap].move-right{right:-100%;left:auto;opacity:0}.wy-body-for-nav{background:left repeat-y #fcfcfc;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxOERBMTRGRDBFMUUxMUUzODUwMkJCOThDMEVFNURFMCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxOERBMTRGRTBFMUUxMUUzODUwMkJCOThDMEVFNURFMCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjE4REExNEZCMEUxRTExRTM4NTAyQkI5OEMwRUU1REUwIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjE4REExNEZDMEUxRTExRTM4NTAyQkI5OEMwRUU1REUwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+EwrlwAAAAA5JREFUeNpiMDU0BAgwAAE2AJgB9BnaAAAAAElFTkSuQmCC);background-size:300px 1px}.wy-grid-for-nav{position:absolute;width:100%;height:100%}.wy-nav-side{position:absolute;top:0;left:0;width:300px;overflow:hidden;min-height:100%;background:#343131;z-index:200}.wy-nav-top{display:none;background:#2980b9;color:#fff;padding:0.4045em 0.809em;position:relative;line-height:50px;text-align:center;font-size:100%;*zoom:1}.wy-nav-top:before,.wy-nav-top:after{display:table;content:""}.wy-nav-top:after{clear:both}.wy-nav-top a{color:#fff;font-weight:bold}.wy-nav-top img{margin-right:12px;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-nav-top i{font-size:30px;float:left;cursor:pointer}.wy-nav-content-wrap{margin-left:300px;background:#fcfcfc;min-height:100%}.wy-nav-content{padding:1.618em 3.236em;height:100%;max-width:800px;margin:auto}.wy-body-mask{position:fixed;width:100%;height:100%;background:rgba(0,0,0,0.2);display:none;z-index:499}.wy-body-mask.on{display:block}footer{color:#999}footer p{margin-bottom:12px}.rst-footer-buttons{*zoom:1}.rst-footer-buttons:before,.rst-footer-buttons:after{display:table;content:""}.rst-footer-buttons:after{clear:both}#search-results .search li{margin-bottom:24px;border-bottom:solid 1px #e1e4e5;padding-bottom:24px}#search-results .search li:first-child{border-top:solid 1px #e1e4e5;padding-top:24px}#search-results .search li a{font-size:120%;margin-bottom:12px;display:inline-block}#search-results .context{color:gray;font-size:90%}@media screen and (max-width: 768px){.wy-body-for-nav{background:#fcfcfc}.wy-nav-top{display:block}.wy-nav-side{left:-300px}.wy-nav-side.shift{width:85%;left:0}.wy-nav-content-wrap{margin-left:0}.wy-nav-content-wrap .wy-nav-content{padding:1.618em}.wy-nav-content-wrap.shift{position:fixed;min-width:100%;left:85%;top:0;height:100%;overflow:hidden}}@media screen and (min-width: 1400px){.wy-nav-content-wrap{background:rgba(0,0,0,0.05)}.wy-nav-content{margin:0;background:#fcfcfc}}@media print{.wy-nav-side{display:none}.wy-nav-content-wrap{margin-left:0}}nav.stickynav{position:fixed;top:0}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;border-top:solid 10px #343131;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .fa,.rst-versions .rst-current-version .rst-content .admonition-title,.rst-content .rst-versions .rst-current-version .admonition-title,.rst-versions .rst-current-version .rst-content h1 .headerlink,.rst-content h1 .rst-versions .rst-current-version .headerlink,.rst-versions .rst-current-version .rst-content h2 .headerlink,.rst-content h2 .rst-versions .rst-current-version .headerlink,.rst-versions .rst-current-version .rst-content h3 .headerlink,.rst-content h3 .rst-versions .rst-current-version .headerlink,.rst-versions .rst-current-version .rst-content h4 .headerlink,.rst-content h4 .rst-versions .rst-current-version .headerlink,.rst-versions .rst-current-version .rst-content h5 .headerlink,.rst-content h5 .rst-versions .rst-current-version .headerlink,.rst-versions .rst-current-version .rst-content h6 .headerlink,.rst-content h6 .rst-versions .rst-current-version .headerlink,.rst-versions .rst-current-version .rst-content dl dt .headerlink,.rst-content dl dt .rst-versions .rst-current-version .headerlink,.rst-versions .rst-current-version .icon{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}img{width:100%;height:auto}}.rst-content img{max-width:100%;height:auto !important}.rst-content div.figure{margin-bottom:24px}.rst-content div.figure.align-center{text-align:center}.rst-content .section>img{margin-bottom:24px}.rst-content blockquote{margin-left:24px;line-height:24px;margin-bottom:24px}.rst-content .note .last,.rst-content .attention .last,.rst-content .caution .last,.rst-content .danger .last,.rst-content .error .last,.rst-content .hint .last,.rst-content .important .last,.rst-content .tip .last,.rst-content .warning .last,.rst-content .seealso .last{margin-bottom:0}.rst-content .admonition-title:before{margin-right:4px}.rst-content .admonition table{border-color:rgba(0,0,0,0.1)}.rst-content .admonition table td,.rst-content .admonition table th{background:transparent !important;border-color:rgba(0,0,0,0.1) !important}.rst-content .section ol.loweralpha,.rst-content .section ol.loweralpha li{list-style:lower-alpha}.rst-content .section ol.upperalpha,.rst-content .section ol.upperalpha li{list-style:upper-alpha}.rst-content .section ol p,.rst-content .section ul p{margin-bottom:12px}.rst-content .line-block{margin-left:24px}.rst-content .topic-title{font-weight:bold;margin-bottom:12px}.rst-content .toc-backref{color:#404040}.rst-content .align-right{float:right;margin:0px 0px 24px 24px}.rst-content .align-left{float:left;margin:0px 24px 24px 0px}.rst-content .align-center{margin:auto;display:block}.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content dl dt .headerlink{display:none;visibility:hidden;font-size:14px}.rst-content h1 .headerlink:after,.rst-content h2 .headerlink:after,.rst-content h3 .headerlink:after,.rst-content h4 .headerlink:after,.rst-content h5 .headerlink:after,.rst-content h6 .headerlink:after,.rst-content dl dt .headerlink:after{visibility:visible;content:"\f0c1";font-family:FontAwesome;display:inline-block}.rst-content h1:hover .headerlink,.rst-content h2:hover .headerlink,.rst-content h3:hover .headerlink,.rst-content h4:hover .headerlink,.rst-content h5:hover .headerlink,.rst-content h6:hover .headerlink,.rst-content dl dt:hover .headerlink{display:inline-block}.rst-content .sidebar{float:right;width:40%;display:block;margin:0 0 24px 24px;padding:24px;background:#f3f6f6;border:solid 1px #e1e4e5}.rst-content .sidebar p,.rst-content .sidebar ul,.rst-content .sidebar dl{font-size:90%}.rst-content .sidebar .last{margin-bottom:0}.rst-content .sidebar .sidebar-title{display:block;font-family:"Roboto Slab","ff-tisa-web-pro","Georgia",Arial,sans-serif;font-weight:bold;background:#e1e4e5;padding:6px 12px;margin:-24px;margin-bottom:24px;font-size:100%}.rst-content .highlighted{background:#f1c40f;display:inline-block;font-weight:bold;padding:0 6px}.rst-content .footnote-reference,.rst-content .citation-reference{vertical-align:super;font-size:90%}.rst-content table.docutils.citation,.rst-content table.docutils.footnote{background:none;border:none;color:#999}.rst-content table.docutils.citation td,.rst-content table.docutils.citation tr,.rst-content table.docutils.footnote td,.rst-content table.docutils.footnote tr{border:none;background-color:transparent !important;white-space:normal}.rst-content table.docutils.citation td.label,.rst-content table.docutils.footnote td.label{padding-left:0;padding-right:0;vertical-align:top}.rst-content table.field-list{border:none}.rst-content table.field-list td{border:none;padding-top:5px}.rst-content table.field-list td>strong{display:inline-block;margin-top:3px}.rst-content table.field-list .field-name{padding-right:10px;text-align:left;white-space:nowrap}.rst-content table.field-list .field-body{text-align:left;padding-left:0}.rst-content tt{color:#000}.rst-content tt big,.rst-content tt em{font-size:100% !important;line-height:normal}.rst-content tt .xref,a .rst-content tt{font-weight:bold}.rst-content a tt{color:#2980b9}.rst-content dl{margin-bottom:24px}.rst-content dl dt{font-weight:bold}.rst-content dl p,.rst-content dl table,.rst-content dl ul,.rst-content dl ol{margin-bottom:12px !important}.rst-content dl dd{margin:0 0 12px 24px}.rst-content dl:not(.docutils){margin-bottom:24px}.rst-content dl:not(.docutils) dt{display:inline-block;margin:6px 0;font-size:90%;line-height:normal;background:#e7f2fa;color:#2980b9;border-top:solid 3px #6ab0de;padding:6px;position:relative}.rst-content dl:not(.docutils) dt:before{color:#6ab0de}.rst-content dl:not(.docutils) dt .headerlink{color:#404040;font-size:100% !important}.rst-content dl:not(.docutils) dl dt{margin-bottom:6px;border:none;border-left:solid 3px #ccc;background:#f0f0f0;color:gray}.rst-content dl:not(.docutils) dl dt .headerlink{color:#404040;font-size:100% !important}.rst-content dl:not(.docutils) dt:first-child{margin-top:0}.rst-content dl:not(.docutils) tt{font-weight:bold}.rst-content dl:not(.docutils) tt.descname,.rst-content dl:not(.docutils) tt.descclassname{background-color:transparent;border:none;padding:0;font-size:100% !important}.rst-content dl:not(.docutils) tt.descname{font-weight:bold}.rst-content dl:not(.docutils) .optional{display:inline-block;padding:0 4px;color:#000;font-weight:bold}.rst-content dl:not(.docutils) .property{display:inline-block;padding-right:8px}.rst-content .viewcode-link,.rst-content .viewcode-back{display:inline-block;color:#27ae60;font-size:80%;padding-left:24px}.rst-content .viewcode-back{display:block;float:right}@media screen and (max-width: 480px){.rst-content .sidebar{width:100%}}span[id*='MathJax-Span']{color:#404040} diff --git a/docs/_build/html/_static/default.css b/docs/_build/html/_static/default.css new file mode 100644 index 0000000..5f1399a --- /dev/null +++ b/docs/_build/html/_static/default.css @@ -0,0 +1,256 @@ +/* + * default.css_t + * ~~~~~~~~~~~~~ + * + * Sphinx stylesheet -- default theme. + * + * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +@import url("basic.css"); + +/* -- page layout ----------------------------------------------------------- */ + +body { + font-family: sans-serif; + font-size: 100%; + background-color: #11303d; + color: #000; + margin: 0; + padding: 0; +} + +div.document { + background-color: #1c4e63; +} + +div.documentwrapper { + float: left; + width: 100%; +} + +div.bodywrapper { + margin: 0 0 0 230px; +} + +div.body { + background-color: #ffffff; + color: #000000; + padding: 0 20px 30px 20px; +} + +div.footer { + color: #ffffff; + width: 100%; + padding: 9px 0 9px 0; + text-align: center; + font-size: 75%; +} + +div.footer a { + color: #ffffff; + text-decoration: underline; +} + +div.related { + background-color: #133f52; + line-height: 30px; + color: #ffffff; +} + +div.related a { + color: #ffffff; +} + +div.sphinxsidebar { +} + +div.sphinxsidebar h3 { + font-family: 'Trebuchet MS', sans-serif; + color: #ffffff; + font-size: 1.4em; + font-weight: normal; + margin: 0; + padding: 0; +} + +div.sphinxsidebar h3 a { + color: #ffffff; +} + +div.sphinxsidebar h4 { + font-family: 'Trebuchet MS', sans-serif; + color: #ffffff; + font-size: 1.3em; + font-weight: normal; + margin: 5px 0 0 0; + padding: 0; +} + +div.sphinxsidebar p { + color: #ffffff; +} + +div.sphinxsidebar p.topless { + margin: 5px 10px 10px 10px; +} + +div.sphinxsidebar ul { + margin: 10px; + padding: 0; + color: #ffffff; +} + +div.sphinxsidebar a { + color: #98dbcc; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + + + +/* -- hyperlink styles ------------------------------------------------------ */ + +a { + color: #355f7c; + text-decoration: none; +} + +a:visited { + color: #355f7c; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + + + +/* -- body styles ----------------------------------------------------------- */ + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: 'Trebuchet MS', sans-serif; + background-color: #f2f2f2; + font-weight: normal; + color: #20435c; + border-bottom: 1px solid #ccc; + margin: 20px -20px 10px -20px; + padding: 3px 0 3px 10px; +} + +div.body h1 { margin-top: 0; font-size: 200%; } +div.body h2 { font-size: 160%; } +div.body h3 { font-size: 140%; } +div.body h4 { font-size: 120%; } +div.body h5 { font-size: 110%; } +div.body h6 { font-size: 100%; } + +a.headerlink { + color: #c60f0f; + font-size: 0.8em; + padding: 0 4px 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + background-color: #c60f0f; + color: white; +} + +div.body p, div.body dd, div.body li { + text-align: justify; + line-height: 130%; +} + +div.admonition p.admonition-title + p { + display: inline; +} + +div.admonition p { + margin-bottom: 5px; +} + +div.admonition pre { + margin-bottom: 5px; +} + +div.admonition ul, div.admonition ol { + margin-bottom: 5px; +} + +div.note { + background-color: #eee; + border: 1px solid #ccc; +} + +div.seealso { + background-color: #ffc; + border: 1px solid #ff6; +} + +div.topic { + background-color: #eee; +} + +div.warning { + background-color: #ffe4e4; + border: 1px solid #f66; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre { + padding: 5px; + background-color: #eeffcc; + color: #333333; + line-height: 120%; + border: 1px solid #ac9; + border-left: none; + border-right: none; +} + +tt { + background-color: #ecf0f3; + padding: 0 1px 0 1px; + font-size: 0.95em; +} + +th { + background-color: #ede; +} + +.warning tt { + background: #efc2c2; +} + +.note tt { + background: #d6d6d6; +} + +.viewcode-back { + font-family: sans-serif; +} + +div.viewcode-block:target { + background-color: #f4debf; + border-top: 1px solid #ac9; + border-bottom: 1px solid #ac9; +} \ No newline at end of file diff --git a/docs/_build/html/_static/doctools.js b/docs/_build/html/_static/doctools.js new file mode 100644 index 0000000..c5455c9 --- /dev/null +++ b/docs/_build/html/_static/doctools.js @@ -0,0 +1,238 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Sphinx JavaScript utilities for all documentation. + * + * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/** + * select a different prefix for underscore + */ +$u = _.noConflict(); + +/** + * make the code below compatible with browsers without + * an installed firebug like debugger +if (!window.console || !console.firebug) { + var names = ["log", "debug", "info", "warn", "error", "assert", "dir", + "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", + "profile", "profileEnd"]; + window.console = {}; + for (var i = 0; i < names.length; ++i) + window.console[names[i]] = function() {}; +} + */ + +/** + * small helper function to urldecode strings + */ +jQuery.urldecode = function(x) { + return decodeURIComponent(x).replace(/\+/g, ' '); +}; + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s == 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +}; + +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node) { + if (node.nodeType == 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { + var span = document.createElement("span"); + span.className = className; + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this); + }); + } + } + return this.each(function() { + highlight(this); + }); +}; + +/** + * Small JavaScript module for the documentation. + */ +var Documentation = { + + init : function() { + this.fixFirefoxAnchorBug(); + this.highlightSearchWords(); + this.initIndexTable(); + }, + + /** + * i18n support + */ + TRANSLATIONS : {}, + PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, + LOCALE : 'unknown', + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext : function(string) { + var translated = Documentation.TRANSLATIONS[string]; + if (typeof translated == 'undefined') + return string; + return (typeof translated == 'string') ? translated : translated[0]; + }, + + ngettext : function(singular, plural, n) { + var translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated == 'undefined') + return (n == 1) ? singular : plural; + return translated[Documentation.PLURALEXPR(n)]; + }, + + addTranslations : function(catalog) { + for (var key in catalog.messages) + this.TRANSLATIONS[key] = catalog.messages[key]; + this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); + this.LOCALE = catalog.locale; + }, + + /** + * add context elements like header anchor links + */ + addContextElements : function() { + $('div[id] > :header:first').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this headline')). + appendTo(this); + }); + $('dt[id]').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this definition')). + appendTo(this); + }); + }, + + /** + * workaround a firefox stupidity + */ + fixFirefoxAnchorBug : function() { + if (document.location.hash && $.browser.mozilla) + window.setTimeout(function() { + document.location.href += ''; + }, 10); + }, + + /** + * highlight the search words provided in the url in the text + */ + highlightSearchWords : function() { + var params = $.getQueryParameters(); + var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; + if (terms.length) { + var body = $('div.body'); + if (!body.length) { + body = $('body'); + } + window.setTimeout(function() { + $.each(terms, function() { + body.highlightText(this.toLowerCase(), 'highlighted'); + }); + }, 10); + $('') + .appendTo($('#searchbox')); + } + }, + + /** + * init the domain index toggle buttons + */ + initIndexTable : function() { + var togglers = $('img.toggler').click(function() { + var src = $(this).attr('src'); + var idnum = $(this).attr('id').substr(7); + $('tr.cg-' + idnum).toggle(); + if (src.substr(-9) == 'minus.png') + $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); + else + $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); + }).css('display', ''); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { + togglers.click(); + } + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords : function() { + $('#searchbox .highlight-link').fadeOut(300); + $('span.highlighted').removeClass('highlighted'); + }, + + /** + * make the url absolute + */ + makeURL : function(relativeURL) { + return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; + }, + + /** + * get the current relative url + */ + getCurrentURL : function() { + var path = document.location.pathname; + var parts = path.split(/\//); + $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { + if (this == '..') + parts.pop(); + }); + var url = parts.join('/'); + return path.substring(url.lastIndexOf('/') + 1, path.length - 1); + } +}; + +// quick alias for translations +_ = Documentation.gettext; + +$(document).ready(function() { + Documentation.init(); +}); diff --git a/docs/_build/html/_static/down-pressed.png b/docs/_build/html/_static/down-pressed.png new file mode 100644 index 0000000..6f7ad78 Binary files /dev/null and b/docs/_build/html/_static/down-pressed.png differ diff --git a/docs/_build/html/_static/down.png b/docs/_build/html/_static/down.png new file mode 100644 index 0000000..3003a88 Binary files /dev/null and b/docs/_build/html/_static/down.png differ diff --git a/docs/_build/html/_static/file.png b/docs/_build/html/_static/file.png new file mode 100644 index 0000000..d18082e Binary files /dev/null and b/docs/_build/html/_static/file.png differ diff --git a/docs/_build/html/_static/fonts/fontawesome-webfont.eot b/docs/_build/html/_static/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..7c79c6a Binary files /dev/null and b/docs/_build/html/_static/fonts/fontawesome-webfont.eot differ diff --git a/docs/_build/html/_static/fonts/fontawesome-webfont.svg b/docs/_build/html/_static/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..45fdf33 --- /dev/null +++ b/docs/_build/html/_static/fonts/fontawesome-webfont.svg @@ -0,0 +1,414 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/_static/fonts/fontawesome-webfont.ttf b/docs/_build/html/_static/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..e89738d Binary files /dev/null and b/docs/_build/html/_static/fonts/fontawesome-webfont.ttf differ diff --git a/docs/_build/html/_static/fonts/fontawesome-webfont.woff b/docs/_build/html/_static/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..8c1748a Binary files /dev/null and b/docs/_build/html/_static/fonts/fontawesome-webfont.woff differ diff --git a/docs/_build/html/_static/jquery.js b/docs/_build/html/_static/jquery.js new file mode 100644 index 0000000..83589da --- /dev/null +++ b/docs/_build/html/_static/jquery.js @@ -0,0 +1,2 @@ +/*! jQuery v1.8.3 jquery.com | jquery.org/license */ +(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write(""),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t
a",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="
t
",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="
",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;ti.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="
",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="

",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t0)for(i=r;i=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*\s*$/g,Nt={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X
","
"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1>");try{for(;r1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]===""&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("
").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window); \ No newline at end of file diff --git a/docs/_build/html/_static/js/theme.js b/docs/_build/html/_static/js/theme.js new file mode 100644 index 0000000..60520cc --- /dev/null +++ b/docs/_build/html/_static/js/theme.js @@ -0,0 +1,47 @@ +$( document ).ready(function() { + // Shift nav in mobile when clicking the menu. + $(document).on('click', "[data-toggle='wy-nav-top']", function() { + $("[data-toggle='wy-nav-shift']").toggleClass("shift"); + $("[data-toggle='rst-versions']").toggleClass("shift"); + }); + // Close menu when you click a link. + $(document).on('click', ".wy-menu-vertical .current ul li a", function() { + $("[data-toggle='wy-nav-shift']").removeClass("shift"); + $("[data-toggle='rst-versions']").toggleClass("shift"); + }); + $(document).on('click', "[data-toggle='rst-current-version']", function() { + $("[data-toggle='rst-versions']").toggleClass("shift-up"); + }); + // Make tables responsive + $("table.docutils:not(.field-list)").wrap("
"); +}); + +window.SphinxRtdTheme = (function (jquery) { + var stickyNav = (function () { + var navBar, + win, + stickyNavCssClass = 'stickynav', + applyStickNav = function () { + if (navBar.height() <= win.height()) { + navBar.addClass(stickyNavCssClass); + } else { + navBar.removeClass(stickyNavCssClass); + } + }, + enable = function () { + applyStickNav(); + win.on('resize', applyStickNav); + }, + init = function () { + navBar = jquery('nav.wy-nav-side:first'); + win = jquery(window); + }; + jquery(init); + return { + enable : enable + }; + }()); + return { + StickyNav : stickyNav + }; +}($)); diff --git a/docs/_build/html/_static/minus.png b/docs/_build/html/_static/minus.png new file mode 100644 index 0000000..da1c562 Binary files /dev/null and b/docs/_build/html/_static/minus.png differ diff --git a/docs/_build/html/_static/plus.png b/docs/_build/html/_static/plus.png new file mode 100644 index 0000000..b3cb374 Binary files /dev/null and b/docs/_build/html/_static/plus.png differ diff --git a/docs/_build/html/_static/pygments.css b/docs/_build/html/_static/pygments.css new file mode 100644 index 0000000..d79caa1 --- /dev/null +++ b/docs/_build/html/_static/pygments.css @@ -0,0 +1,62 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #eeffcc; } +.highlight .c { color: #408090; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { color: #007020; font-weight: bold } /* Keyword */ +.highlight .o { color: #666666 } /* Operator */ +.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #007020 } /* Comment.Preproc */ +.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #333333 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #007020 } /* Keyword.Pseudo */ +.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #902000 } /* Keyword.Type */ +.highlight .m { color: #208050 } /* Literal.Number */ +.highlight .s { color: #4070a0 } /* Literal.String */ +.highlight .na { color: #4070a0 } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ +.highlight .no { color: #60add5 } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #007020 } /* Name.Exception */ +.highlight .nf { color: #06287e } /* Name.Function */ +.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #bb60d5 } /* Name.Variable */ +.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mf { color: #208050 } /* Literal.Number.Float */ +.highlight .mh { color: #208050 } /* Literal.Number.Hex */ +.highlight .mi { color: #208050 } /* Literal.Number.Integer */ +.highlight .mo { color: #208050 } /* Literal.Number.Oct */ +.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ +.highlight .sc { color: #4070a0 } /* Literal.String.Char */ +.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #4070a0 } /* Literal.String.Double */ +.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ +.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ +.highlight .sx { color: #c65d09 } /* Literal.String.Other */ +.highlight .sr { color: #235388 } /* Literal.String.Regex */ +.highlight .s1 { color: #4070a0 } /* Literal.String.Single */ +.highlight .ss { color: #517918 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ +.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ +.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ +.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/docs/_build/html/_static/searchtools.js b/docs/_build/html/_static/searchtools.js new file mode 100644 index 0000000..6e1f06b --- /dev/null +++ b/docs/_build/html/_static/searchtools.js @@ -0,0 +1,622 @@ +/* + * searchtools.js_t + * ~~~~~~~~~~~~~~~~ + * + * Sphinx JavaScript utilties for the full-text search. + * + * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + + +/** + * Porter Stemmer + */ +var Stemmer = function() { + + var step2list = { + ational: 'ate', + tional: 'tion', + enci: 'ence', + anci: 'ance', + izer: 'ize', + bli: 'ble', + alli: 'al', + entli: 'ent', + eli: 'e', + ousli: 'ous', + ization: 'ize', + ation: 'ate', + ator: 'ate', + alism: 'al', + iveness: 'ive', + fulness: 'ful', + ousness: 'ous', + aliti: 'al', + iviti: 'ive', + biliti: 'ble', + logi: 'log' + }; + + var step3list = { + icate: 'ic', + ative: '', + alize: 'al', + iciti: 'ic', + ical: 'ic', + ful: '', + ness: '' + }; + + var c = "[^aeiou]"; // consonant + var v = "[aeiouy]"; // vowel + var C = c + "[^aeiouy]*"; // consonant sequence + var V = v + "[aeiou]*"; // vowel sequence + + var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 + var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 + var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 + var s_v = "^(" + C + ")?" + v; // vowel in stem + + this.stemWord = function (w) { + var stem; + var suffix; + var firstch; + var origword = w; + + if (w.length < 3) + return w; + + var re; + var re2; + var re3; + var re4; + + firstch = w.substr(0,1); + if (firstch == "y") + w = firstch.toUpperCase() + w.substr(1); + + // Step 1a + re = /^(.+?)(ss|i)es$/; + re2 = /^(.+?)([^s])s$/; + + if (re.test(w)) + w = w.replace(re,"$1$2"); + else if (re2.test(w)) + w = w.replace(re2,"$1$2"); + + // Step 1b + re = /^(.+?)eed$/; + re2 = /^(.+?)(ed|ing)$/; + if (re.test(w)) { + var fp = re.exec(w); + re = new RegExp(mgr0); + if (re.test(fp[1])) { + re = /.$/; + w = w.replace(re,""); + } + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = new RegExp(s_v); + if (re2.test(stem)) { + w = stem; + re2 = /(at|bl|iz)$/; + re3 = new RegExp("([^aeiouylsz])\\1$"); + re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re2.test(w)) + w = w + "e"; + else if (re3.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + else if (re4.test(w)) + w = w + "e"; + } + } + + // Step 1c + re = /^(.+?)y$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(s_v); + if (re.test(stem)) + w = stem + "i"; + } + + // Step 2 + re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step2list[suffix]; + } + + // Step 3 + re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step3list[suffix]; + } + + // Step 4 + re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + re2 = /^(.+?)(s|t)(ion)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + if (re.test(stem)) + w = stem; + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = new RegExp(mgr1); + if (re2.test(stem)) + w = stem; + } + + // Step 5 + re = /^(.+?)e$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + re2 = new RegExp(meq1); + re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) + w = stem; + } + re = /ll$/; + re2 = new RegExp(mgr1); + if (re.test(w) && re2.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + + // and turn initial Y back to y + if (firstch == "y") + w = firstch.toLowerCase() + w.substr(1); + return w; + } +} + + + +/** + * Simple result scoring code. + */ +var Scorer = { + // Implement the following function to further tweak the score for each result + // The function takes a result array [filename, title, anchor, descr, score] + // and returns the new score. + /* + score: function(result) { + return result[4]; + }, + */ + + // query matches the full name of an object + objNameMatch: 11, + // or matches in the last dotted part of the object name + objPartialMatch: 6, + // Additive scores depending on the priority of the object + objPrio: {0: 15, // used to be importantResults + 1: 5, // used to be objectResults + 2: -5}, // used to be unimportantResults + // Used when the priority is not in the mapping. + objPrioDefault: 0, + + // query found in title + title: 15, + // query found in terms + term: 5 +}; + + +/** + * Search Module + */ +var Search = { + + _index : null, + _queued_query : null, + _pulse_status : -1, + + init : function() { + var params = $.getQueryParameters(); + if (params.q) { + var query = params.q[0]; + $('input[name="q"]')[0].value = query; + this.performSearch(query); + } + }, + + loadIndex : function(url) { + $.ajax({type: "GET", url: url, data: null, + dataType: "script", cache: true, + complete: function(jqxhr, textstatus) { + if (textstatus != "success") { + document.getElementById("searchindexloader").src = url; + } + }}); + }, + + setIndex : function(index) { + var q; + this._index = index; + if ((q = this._queued_query) !== null) { + this._queued_query = null; + Search.query(q); + } + }, + + hasIndex : function() { + return this._index !== null; + }, + + deferQuery : function(query) { + this._queued_query = query; + }, + + stopPulse : function() { + this._pulse_status = 0; + }, + + startPulse : function() { + if (this._pulse_status >= 0) + return; + function pulse() { + var i; + Search._pulse_status = (Search._pulse_status + 1) % 4; + var dotString = ''; + for (i = 0; i < Search._pulse_status; i++) + dotString += '.'; + Search.dots.text(dotString); + if (Search._pulse_status > -1) + window.setTimeout(pulse, 500); + } + pulse(); + }, + + /** + * perform a search for something (or wait until index is loaded) + */ + performSearch : function(query) { + // create the required interface elements + this.out = $('#search-results'); + this.title = $('

' + _('Searching') + '

').appendTo(this.out); + this.dots = $('').appendTo(this.title); + this.status = $('

').appendTo(this.out); + this.output = $('
'); + } + // Prettify the comment rating. + comment.pretty_rating = comment.rating + ' point' + + (comment.rating == 1 ? '' : 's'); + // Make a class (for displaying not yet moderated comments differently) + comment.css_class = comment.displayed ? '' : ' moderate'; + // Create a div for this comment. + var context = $.extend({}, opts, comment); + var div = $(renderTemplate(commentTemplate, context)); + + // If the user has voted on this comment, highlight the correct arrow. + if (comment.vote) { + var direction = (comment.vote == 1) ? 'u' : 'd'; + div.find('#' + direction + 'v' + comment.id).hide(); + div.find('#' + direction + 'u' + comment.id).show(); + } + + if (opts.moderator || comment.text != '[deleted]') { + div.find('a.reply').show(); + if (comment.proposal_diff) + div.find('#sp' + comment.id).show(); + if (opts.moderator && !comment.displayed) + div.find('#cm' + comment.id).show(); + if (opts.moderator || (opts.username == comment.username)) + div.find('#dc' + comment.id).show(); + } + return div; + } + + /** + * A simple template renderer. Placeholders such as <%id%> are replaced + * by context['id'] with items being escaped. Placeholders such as <#id#> + * are not escaped. + */ + function renderTemplate(template, context) { + var esc = $(document.createElement('div')); + + function handle(ph, escape) { + var cur = context; + $.each(ph.split('.'), function() { + cur = cur[this]; + }); + return escape ? esc.text(cur || "").html() : cur; + } + + return template.replace(/<([%#])([\w\.]*)\1>/g, function() { + return handle(arguments[2], arguments[1] == '%' ? true : false); + }); + } + + /** Flash an error message briefly. */ + function showError(message) { + $(document.createElement('div')).attr({'class': 'popup-error'}) + .append($(document.createElement('div')) + .attr({'class': 'error-message'}).text(message)) + .appendTo('body') + .fadeIn("slow") + .delay(2000) + .fadeOut("slow"); + } + + /** Add a link the user uses to open the comments popup. */ + $.fn.comment = function() { + return this.each(function() { + var id = $(this).attr('id').substring(1); + var count = COMMENT_METADATA[id]; + var title = count + ' comment' + (count == 1 ? '' : 's'); + var image = count > 0 ? opts.commentBrightImage : opts.commentImage; + var addcls = count == 0 ? ' nocomment' : ''; + $(this) + .append( + $(document.createElement('a')).attr({ + href: '#', + 'class': 'sphinx-comment-open' + addcls, + id: 'ao' + id + }) + .append($(document.createElement('img')).attr({ + src: image, + alt: 'comment', + title: title + })) + .click(function(event) { + event.preventDefault(); + show($(this).attr('id').substring(2)); + }) + ) + .append( + $(document.createElement('a')).attr({ + href: '#', + 'class': 'sphinx-comment-close hidden', + id: 'ah' + id + }) + .append($(document.createElement('img')).attr({ + src: opts.closeCommentImage, + alt: 'close', + title: 'close' + })) + .click(function(event) { + event.preventDefault(); + hide($(this).attr('id').substring(2)); + }) + ); + }); + }; + + var opts = { + processVoteURL: '/_process_vote', + addCommentURL: '/_add_comment', + getCommentsURL: '/_get_comments', + acceptCommentURL: '/_accept_comment', + deleteCommentURL: '/_delete_comment', + commentImage: '/static/_static/comment.png', + closeCommentImage: '/static/_static/comment-close.png', + loadingImage: '/static/_static/ajax-loader.gif', + commentBrightImage: '/static/_static/comment-bright.png', + upArrow: '/static/_static/up.png', + downArrow: '/static/_static/down.png', + upArrowPressed: '/static/_static/up-pressed.png', + downArrowPressed: '/static/_static/down-pressed.png', + voting: false, + moderator: false + }; + + if (typeof COMMENT_OPTIONS != "undefined") { + opts = jQuery.extend(opts, COMMENT_OPTIONS); + } + + var popupTemplate = '\ +
\ +

\ + Sort by:\ + best rated\ + newest\ + oldest\ +

\ +
Comments
\ +
\ + loading comments...
\ +
    \ +
    \ +

    Add a comment\ + (markup):

    \ +
    \ + reStructured text markup: *emph*, **strong**, \ + ``code``, \ + code blocks: :: and an indented block after blank line
    \ +
    \ + \ +

    \ + \ + Propose a change ▹\ + \ + \ + Propose a change ▿\ + \ +

    \ + \ + \ + \ + \ + \ +
    \ +
    '; + + var commentTemplate = '\ +
    \ +
    \ +
    \ + \ + \ + \ + \ + \ + \ +
    \ +
    \ + \ + \ + \ + \ + \ + \ +
    \ +
    \ +
    \ +

    \ + <%username%>\ + <%pretty_rating%>\ + <%time.delta%>\ +

    \ +
    <#text#>
    \ +

    \ + \ + reply ▿\ + proposal ▹\ + proposal ▿\ + \ + \ +

    \ +
    \
    +<#proposal_diff#>\
    +        
    \ +
      \ +
      \ +
      \ +
      \ + '; + + var replyTemplate = '\ +
    • \ +
      \ +
      \ + \ + \ + \ + \ + \ + \ +
      \ +
    • '; + + $(document).ready(function() { + init(); + }); +})(jQuery); + +$(document).ready(function() { + // add comment anchors for all paragraphs that are commentable + $('.sphinx-has-comment').comment(); + + // highlight search words in search results + $("div.context").each(function() { + var params = $.getQueryParameters(); + var terms = (params.q) ? params.q[0].split(/\s+/) : []; + var result = $(this); + $.each(terms, function() { + result.highlightText(this.toLowerCase(), 'highlighted'); + }); + }); + + // directly open comment window if requested + var anchor = document.location.hash; + if (anchor.substring(0, 9) == '#comment-') { + $('#ao' + anchor.substring(9)).click(); + document.location.hash = '#s' + anchor.substring(9); + } +}); diff --git a/docs/_build/html/genindex.html b/docs/_build/html/genindex.html new file mode 100644 index 0000000..afe9f8f --- /dev/null +++ b/docs/_build/html/genindex.html @@ -0,0 +1,662 @@ + + + + + + + + + + + Index — cloudify-rest-client 3.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + + +
      + + + + + + +
      +
      +
      +
        +
      • Docs »
      • + +
      • +
      • + +
      • +
      +
      +
      +
      + + +

      Index

      + +
      + B + | C + | D + | E + | G + | H + | I + | L + | N + | O + | P + | R + | S + | T + | U + | V + | W + +
      +

      B

      +
      + + +
      + +
      Blueprint (class in cloudify_rest_client.blueprints) +
      + + +
      blueprint_id (cloudify_rest_client.deployments.Deployment attribute) +
      + +
      + +
      (cloudify_rest_client.deployments.Workflows attribute) +
      + + +
      (cloudify_rest_client.nodes.Node attribute) +
      + +
      +
      + +
      BlueprintsClient (class in cloudify_rest_client.blueprints) +
      + +
      + +

      C

      + + + +
      + +
      cancel() (cloudify_rest_client.executions.ExecutionsClient method) +
      + + +
      cloudify_rest_client.blueprints (module) +
      + + +
      cloudify_rest_client.client (module) +
      + + +
      cloudify_rest_client.deployments (module) +
      + + +
      cloudify_rest_client.events (module) +
      + + +
      cloudify_rest_client.exceptions (module) +
      + + +
      cloudify_rest_client.executions (module) +
      + +
      + +
      cloudify_rest_client.node_instances (module) +
      + + +
      cloudify_rest_client.nodes (module) +
      + + +
      CloudifyClient (class in cloudify_rest_client.client) +
      + + +
      CloudifyClientError +
      + + +
      CONTENT_DISPOSITION_HEADER (cloudify_rest_client.blueprints.BlueprintsClient attribute) +
      + + +
      create() (cloudify_rest_client.deployments.DeploymentsClient method) +
      + +
      + +

      D

      + + + +
      + +
      delete() (cloudify_rest_client.blueprints.BlueprintsClient method) +
      + +
      + +
      (cloudify_rest_client.client.HTTPClient method) +
      + + +
      (cloudify_rest_client.deployments.DeploymentsClient method) +
      + +
      + +
      Deployment (class in cloudify_rest_client.deployments) +
      + + +
      deployment_id (cloudify_rest_client.deployments.Workflows attribute) +
      + +
      + +
      (cloudify_rest_client.node_instances.NodeInstance attribute) +
      + + +
      (cloudify_rest_client.nodes.Node attribute) +
      + +
      +
      + +
      DeploymentsClient (class in cloudify_rest_client.deployments) +
      + + +
      do_request() (cloudify_rest_client.client.HTTPClient method) +
      + + +
      download() (cloudify_rest_client.blueprints.BlueprintsClient method) +
      + +
      + +

      E

      + + + +
      + +
      error (cloudify_rest_client.executions.Execution attribute) +
      + + +
      EventsClient (class in cloudify_rest_client.events) +
      + + +
      execute() (cloudify_rest_client.deployments.DeploymentsClient method) +
      + +
      + +
      Execution (class in cloudify_rest_client.executions) +
      + + +
      ExecutionsClient (class in cloudify_rest_client.executions) +
      + +
      + +

      G

      + + + +
      + +
      get() (cloudify_rest_client.blueprints.BlueprintsClient method) +
      + +
      + +
      (cloudify_rest_client.client.HTTPClient method) +
      + + +
      (cloudify_rest_client.deployments.DeploymentsClient method) +
      + + +
      (cloudify_rest_client.events.EventsClient method) +
      + + +
      (cloudify_rest_client.executions.ExecutionsClient method) +
      + + +
      (cloudify_rest_client.node_instances.NodeInstancesClient method) +
      + +
      +
      + +
      get_source() (cloudify_rest_client.blueprints.BlueprintsClient method) +
      + +
      + +

      H

      + + + +
      + +
      host_id (cloudify_rest_client.node_instances.NodeInstance attribute) +
      + +
      + +
      (cloudify_rest_client.nodes.Node attribute) +
      + +
      +
      + +
      HTTPClient (class in cloudify_rest_client.client) +
      + +
      + +

      I

      + + +
      + +
      id (cloudify_rest_client.blueprints.Blueprint attribute) +
      + +
      + +
      (cloudify_rest_client.deployments.Deployment attribute) +
      + + +
      (cloudify_rest_client.deployments.Workflow attribute) +
      + + +
      (cloudify_rest_client.executions.Execution attribute) +
      + + +
      (cloudify_rest_client.node_instances.NodeInstance attribute) +
      + + +
      (cloudify_rest_client.nodes.Node attribute) +
      + +
      +
      + +

      L

      + + + +
      + +
      list() (cloudify_rest_client.blueprints.BlueprintsClient method) +
      + +
      + +
      (cloudify_rest_client.deployments.DeploymentsClient method) +
      + + +
      (cloudify_rest_client.executions.ExecutionsClient method) +
      + + +
      (cloudify_rest_client.node_instances.NodeInstancesClient method) +
      + + +
      (cloudify_rest_client.nodes.NodesClient method) +
      + +
      + +
      list_executions() (cloudify_rest_client.deployments.DeploymentsClient method) +
      + +
      + +
      list_workflows() (cloudify_rest_client.deployments.DeploymentsClient method) +
      + +
      + +

      N

      + + + +
      + +
      name (cloudify_rest_client.deployments.Workflow attribute) +
      + + +
      Node (class in cloudify_rest_client.nodes) +
      + + +
      node_id (cloudify_rest_client.node_instances.NodeInstance attribute) +
      + + +
      NodeInstance (class in cloudify_rest_client.node_instances) +
      + +
      + +
      NodeInstancesClient (class in cloudify_rest_client.node_instances) +
      + + +
      NodesClient (class in cloudify_rest_client.nodes) +
      + + +
      number_of_instances (cloudify_rest_client.nodes.Node attribute) +
      + +
      + +

      O

      + + +
      + +
      operations (cloudify_rest_client.nodes.Node attribute) +
      + +
      + +

      P

      + + + +
      + +
      patch() (cloudify_rest_client.client.HTTPClient method) +
      + + +
      plugins (cloudify_rest_client.nodes.Node attribute) +
      + + +
      post() (cloudify_rest_client.client.HTTPClient method) +
      + +
      + +
      properties (cloudify_rest_client.nodes.Node attribute) +
      + + +
      put() (cloudify_rest_client.client.HTTPClient method) +
      + +
      + +

      R

      + + + +
      + +
      relationships (cloudify_rest_client.node_instances.NodeInstance attribute) +
      + +
      + +
      (cloudify_rest_client.nodes.Node attribute) +
      + +
      +
      + +
      runtime_properties (cloudify_rest_client.node_instances.NodeInstance attribute) +
      + +
      + +

      S

      + + + +
      + +
      state (cloudify_rest_client.node_instances.NodeInstance attribute) +
      + +
      + +
      status (cloudify_rest_client.executions.Execution attribute) +
      + +
      + +

      T

      + + + +
      + +
      type (cloudify_rest_client.nodes.Node attribute) +
      + +
      + +
      type_hierarchy (cloudify_rest_client.nodes.Node attribute) +
      + +
      + +

      U

      + + + +
      + +
      update() (cloudify_rest_client.executions.ExecutionsClient method) +
      + +
      + +
      (cloudify_rest_client.node_instances.NodeInstancesClient method) +
      + +
      +
      + +
      upload() (cloudify_rest_client.blueprints.BlueprintsClient method) +
      + +
      + +

      V

      + + + +
      + +
      verify_response_status() (cloudify_rest_client.client.HTTPClient method) +
      + +
      + +
      version (cloudify_rest_client.node_instances.NodeInstance attribute) +
      + +
      + +

      W

      + + + +
      + +
      Workflow (class in cloudify_rest_client.deployments) +
      + + +
      workflow_id (cloudify_rest_client.executions.Execution attribute) +
      + +
      + +
      Workflows (class in cloudify_rest_client.deployments) +
      + + +
      workflows (cloudify_rest_client.deployments.Workflows attribute) +
      + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/index.html b/docs/_build/html/index.html new file mode 100644 index 0000000..d9c1754 --- /dev/null +++ b/docs/_build/html/index.html @@ -0,0 +1,1097 @@ + + + + + + + + + + Welcome to cloudify-rest-client’s documentation! — cloudify-rest-client 3.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + + +
      + + + + + + +
      +
      +
      + +
      +
      +
      + +
      +

      Welcome to cloudify-rest-client’s documentation!

      +

      Contents:

      +
      +
        +
      +
      +
      +
      +class cloudify_rest_client.blueprints.Blueprint(blueprint)[source]
      +

      Bases: dict

      +
      +
      +id[source]
      +
      +++ + + + +
      Returns:The identifier of the blueprint.
      +
      + +
      + +
      +
      +class cloudify_rest_client.blueprints.BlueprintsClient(api)[source]
      +

      Bases: object

      +
      +
      +CONTENT_DISPOSITION_HEADER = 'content-disposition'
      +
      + +
      +
      +list()[source]
      +

      Returns a list of currently stored blueprints.

      + +++ + + + +
      Returns:Blueprints list.
      +
      + +
      +
      +upload(blueprint_path, blueprint_id)[source]
      +

      Uploads a blueprint to Cloudify’s manager.

      + +++ + + + + + +
      Parameters:
        +
      • blueprint_path – Main blueprint yaml file path.
      • +
      • blueprint_id – Id of the uploaded blueprint (optional).
      • +
      +
      Returns:

      Created blueprint.

      +
      +

      Blueprint path should point to the main yaml file of the blueprint +to be uploaded. Its containing folder will be packed to an archive +and get uploaded to the manager. +An optional blueprint_id parameter is available for specifying the +blueprint’s unique Id. If not specified, blueprint id will be +determined after parsing the blueprint’s yaml file.

      +
      + +
      +
      +get(blueprint_id)[source]
      +

      Gets a blueprint by its id.

      + +++ + + + + + +
      Parameters:blueprint_id – Blueprint’s id to get.
      Returns:The blueprint.
      +
      + +
      +
      +get_source(blueprint_id)[source]
      +

      Gets a blueprint’s source by the blueprint’s id.

      + +++ + + + + + +
      Parameters:blueprint_id – Blueprint’s id to get the source for.
      Returns:The blueprint’s source.
      +
      + +
      +
      +delete(blueprint_id)[source]
      +

      Deletes the blueprint whose id matches the provided blueprint id.

      + +++ + + + + + +
      Parameters:blueprint_id – The id of the blueprint to be deleted.
      Returns:Deleted blueprint.
      +
      + +
      +
      +download(blueprint_id, output_file=None)[source]
      +

      Downloads a previously uploaded blueprint from Cloudify’s manager.

      + +++ + + + + + +
      Parameters:
        +
      • blueprint_id – The Id of the blueprint to be downloaded.
      • +
      • output_file – The file path of the downloaded blueprint file +(optional)
      • +
      +
      Returns:

      The file path of the downloaded blueprint.

      +
      +
      + +
      + +
      +
      +class cloudify_rest_client.client.HTTPClient(host, port=80)[source]
      +

      Bases: object

      +
      +
      +verify_response_status(response, expected_code=200)[source]
      +
      + +
      +
      +do_request(requests_method, uri, data=None, params=None, expected_status_code=200)[source]
      +
      + +
      +
      +get(uri, data=None, params=None, expected_status_code=200)[source]
      +
      + +
      +
      +put(uri, data=None, params=None, expected_status_code=200)[source]
      +
      + +
      +
      +patch(uri, data=None, params=None, expected_status_code=200)[source]
      +
      + +
      +
      +post(uri, data=None, params=None, expected_status_code=200)[source]
      +
      + +
      +
      +delete(uri, data=None, params=None, expected_status_code=200)[source]
      +
      + +
      + +
      +
      +class cloudify_rest_client.client.CloudifyClient(host, port=80)[source]
      +

      Bases: object

      +

      Cloudify’s management client.

      +
      + +
      +
      +class cloudify_rest_client.deployments.Deployment(deployment)[source]
      +

      Bases: dict

      +

      Cloudify deployment.

      +
      +
      +id[source]
      +
      +++ + + + +
      Returns:The identifier of the deployment.
      +
      + +
      +
      +blueprint_id[source]
      +
      +++ + + + +
      Returns:The identifier of the blueprint this deployment belongs to.
      +
      + +
      + +
      +
      +class cloudify_rest_client.deployments.Workflows(workflows)[source]
      +

      Bases: dict

      +
      +
      +blueprint_id[source]
      +
      + +
      +
      +deployment_id[source]
      +
      + +
      +
      +workflows[source]
      +
      + +
      + +
      +
      +class cloudify_rest_client.deployments.Workflow(workflow)[source]
      +

      Bases: dict

      +
      +
      +id[source]
      +
      + +
      +
      +name[source]
      +
      + +
      + +
      +
      +class cloudify_rest_client.deployments.DeploymentsClient(api)[source]
      +

      Bases: object

      +
      +
      +list()[source]
      +

      Returns a list of all deployments.

      + +++ + + + +
      Returns:Deployments list.
      +
      + +
      +
      +get(deployment_id)[source]
      +

      Returns a deployment by its id.

      + +++ + + + + + +
      Parameters:deployment_id – Id of the deployment to get.
      Returns:Deployment.
      +
      + +
      +
      +create(blueprint_id, deployment_id)[source]
      +

      Creates a new deployment for the provided blueprint id and +deployment id.

      + +++ + + + + + +
      Parameters:
        +
      • blueprint_id – Blueprint id to create a deployment of.
      • +
      • deployment_id – Deployment id of the new created deployment.
      • +
      +
      Returns:

      The created deployment.

      +
      +
      + +
      +
      +delete(deployment_id, ignore_live_nodes=False)[source]
      +

      Deletes the deployment whose id matches the provided deployment id. +By default, deployment with live nodes deletion is not allowed and +this behavior can be changed using the ignore_live_nodes argument.

      + +++ + + + + + +
      Parameters:
        +
      • deployment_id – The deployment’s to be deleted id.
      • +
      • ignore_live_nodes – Determines whether to ignore live nodes.
      • +
      +
      Returns:

      The deleted deployment.

      +
      +
      + +
      +
      +list_executions(deployment_id)[source]
      +

      Returns a list of executions for the provided deployment’s id.

      + +++ + + + + + +
      Parameters:deployment_id – Deployment id to get a list of executions for.
      Returns:List of executions.
      +
      + +
      +
      +list_workflows(deployment_id)[source]
      +

      Returns a list of available workflows for the provided deployment’s id.

      + +++ + + + + + +
      Parameters:deployment_id – Deployment id to get a list of workflows for.
      Returns:Workflows list.
      +
      + +
      +
      +execute(deployment_id, workflow_id, force=False)[source]
      +

      Executes a deployment’s workflow whose id is provided.

      + +++ + + + + + +
      Parameters:
        +
      • deployment_id – The deployment’s id to execute a workflow for.
      • +
      • workflow_id – The workflow to be executed id.
      • +
      • force – Determines whether to force the execution of the workflow +in a case where there’s an already running execution for this +deployment.
      • +
      +
      Returns:

      The created execution.

      +
      +
      + +
      + +
      +
      +class cloudify_rest_client.events.EventsClient(api)[source]
      +

      Bases: object

      +
      +
      +get(execution_id, from_event=0, batch_size=100, include_logs=False)[source]
      +

      Returns event for the provided execution id.

      + +++ + + + + + +
      Parameters:
        +
      • execution_id – Id of execution to get events for.
      • +
      • from_event – Index of first event to retrieve on pagination.
      • +
      • batch_size – Maximum number of events to retrieve per call.
      • +
      • include_logs – Whether to also get logs.
      • +
      +
      Returns:

      Events list and total number of currently available +events (tuple).

      +
      +
      + +
      + +
      +
      +exception cloudify_rest_client.exceptions.CloudifyClientError(message)[source]
      +

      Bases: exceptions.Exception

      +
      + +
      +
      +class cloudify_rest_client.executions.Execution(execution)[source]
      +

      Bases: dict

      +

      Cloudify workflow execution.

      +
      +
      +id[source]
      +
      +++ + + + +
      Returns:The execution’s id.
      +
      + +
      +
      +status[source]
      +
      +++ + + + +
      Returns:The execution’s status.
      +
      + +
      +
      +error[source]
      +
      +++ + + + +
      Returns:The execution error in a case of failure, otherwise None.
      +
      + +
      +
      +workflow_id[source]
      +
      +++ + + + +
      Returns:The id of the workflow this execution represents.
      +
      + +
      + +
      +
      +class cloudify_rest_client.executions.ExecutionsClient(api)[source]
      +

      Bases: object

      +
      +
      +list(deployment_id)[source]
      +

      Returns a list of executions for the provided deployment’s id.

      + +++ + + + + + +
      Parameters:deployment_id – Deployment id to get a list of executions for.
      Returns:Executions list.
      +
      + +
      +
      +get(execution_id)[source]
      +

      Get execution by its id.

      + +++ + + + + + +
      Parameters:execution_id – Id of the execution to get.
      Returns:Execution.
      +
      + +
      +
      +update(execution_id, status, error=None)[source]
      +

      Update execution with the provided status and optional error.

      + +++ + + + + + +
      Parameters:
        +
      • execution_id – Id of the execution to update.
      • +
      • status – Updated execution status.
      • +
      • error – Updated execution error (optional).
      • +
      +
      Returns:

      Updated execution.

      +
      +
      + +
      +
      +cancel(execution_id)[source]
      +

      Cancels the execution who matches the provided execution id. +:param execution_id: Id of the execution to cancel. +:return: Cancelled execution.

      +
      + +
      + +
      +
      +class cloudify_rest_client.node_instances.NodeInstance(node_instance)[source]
      +

      Bases: dict

      +

      Cloudify node instance.

      +
      +
      +id[source]
      +
      +++ + + + +
      Returns:The identifier of the node instance.
      +
      + +
      +
      +node_id[source]
      +
      +++ + + + +
      Returns:The identifier of the node whom this is in instance of.
      +
      + +
      +
      +relationships[source]
      +
      +++ + + + +
      Returns:The node instance relationships.
      +
      + +
      +
      +host_id[source]
      +
      +++ + + + +
      Returns:The node instance host_id.
      +
      + +
      +
      +deployment_id[source]
      +
      +++ + + + +
      Returns:The deployment id the node instance belongs to.
      +
      + +
      +
      +runtime_properties[source]
      +
      +++ + + + +
      Returns:The runtime properties of the node instance.
      +
      + +
      +
      +state[source]
      +
      +++ + + + +
      Returns:The current state of the node instance.
      +
      + +
      +
      +version[source]
      +
      +++ + + + +
      Returns:The current version of the node instance +(used for optimistic locking on update)
      +
      + +
      + +
      +
      +class cloudify_rest_client.node_instances.NodeInstancesClient(api)[source]
      +

      Bases: object

      +
      +
      +get(node_instance_id)[source]
      +

      Returns the node instance for the provided node instance id.

      + +++ + + + + + +
      Parameters:node_instance_id – The identifier of the node instance to get.
      Returns:The retrieved node instance.
      +
      + +
      +
      +update(node_instance_id, state=None, runtime_properties=None, version=0)[source]
      +

      Update node instance with the provided state & runtime_properties.

      + +++ + + + + + +
      Parameters:
        +
      • node_instance_id – The identifier of the node instance to update.
      • +
      • state – The updated state.
      • +
      • runtime_properties – The updated runtime properties.
      • +
      • version – Current version value of this node instance in +Cloudify’s storage (used for optimistic locking).
      • +
      +
      Returns:

      The updated node instance.

      +
      +
      + +
      +
      +list(deployment_id=None)[source]
      +
      +
      Returns a list of node instances which belong to the deployment
      +
      identified by the provided deployment id.
      +
      + +++ + + + + + + + +
      Parameters:deployment_id – The deployment’s id to list node instances for.
      Returns:Node instances.
      Return type:list
      +
      + +
      + +
      +
      +class cloudify_rest_client.nodes.Node(node_instance)[source]
      +

      Bases: dict

      +

      Cloudify node.

      +
      +
      +id[source]
      +
      +++ + + + +
      Returns:The identifier of the node.
      +
      + +
      +
      +deployment_id[source]
      +
      +++ + + + +
      Returns:The deployment id the node belongs to.
      +
      + +
      +
      +properties[source]
      +
      +++ + + + +
      Returns:The static properties of the node.
      +
      + +
      +
      +operations[source]
      +
      +++ + + + + + +
      Returns:The node operations mapped to plugins.
      Return type:dict
      +
      + +
      +
      +relationships[source]
      +
      +++ + + + + + +
      Returns:The node relationships with other nodes.
      Return type:list
      +
      + +
      +
      +blueprint_id[source]
      +
      +++ + + + + + +
      Returns:The id of the blueprint this node belongs to.
      Return type:str
      +
      + +
      +
      +plugins[source]
      +
      +++ + + + + + +
      Returns:The plugins this node has operations mapped to.
      Return type:dict
      +
      + +
      +
      +number_of_instances[source]
      +
      +++ + + + + + +
      Returns:The number of instances this node has.
      Return type:int
      +
      + +
      +
      +host_id[source]
      +
      +++ + + + + + +
      Returns:The id of the node instance which hosts this node.
      Return type:str
      +
      + +
      +
      +type_hierarchy[source]
      +
      +++ + + + + + +
      Returns:The type hierarchy of this node.
      Return type:list
      +
      + +
      +
      +type[source]
      +
      +++ + + + + + +
      Returns:The type of this node.
      Return type:str
      +
      + +
      + +
      +
      +class cloudify_rest_client.nodes.NodesClient(api)[source]
      +

      Bases: object

      +
      +
      +list(deployment_id=None)[source]
      +
      +
      Returns a list of nodes which belong to the deployment identified
      +
      by the provided deployment id.
      +
      + +++ + + + + + + + +
      Parameters:deployment_id – The deployment’s id to list nodes for.
      Returns:Nodes.
      Return type:list
      +
      + +
      + +
      +
      +

      Indices and tables

      + +
      + + +
      + +
      +
      + +
      + +
      + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/objects.inv b/docs/_build/html/objects.inv new file mode 100644 index 0000000..d3ed6cc Binary files /dev/null and b/docs/_build/html/objects.inv differ diff --git a/docs/_build/html/py-modindex.html b/docs/_build/html/py-modindex.html new file mode 100644 index 0000000..fca75d2 --- /dev/null +++ b/docs/_build/html/py-modindex.html @@ -0,0 +1,209 @@ + + + + + + + + + + Python Module Index — cloudify-rest-client 3.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + + +
      + + + + + + +
      +
      +
      +
        +
      • Docs »
      • + +
      • +
      • + +
      • +
      +
      +
      +
      + + +

      Python Module Index

      + +
      + c +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
       
      + c
      + cloudify_rest_client +
          + cloudify_rest_client.blueprints +
          + cloudify_rest_client.client +
          + cloudify_rest_client.deployments +
          + cloudify_rest_client.events +
          + cloudify_rest_client.exceptions +
          + cloudify_rest_client.executions +
          + cloudify_rest_client.node_instances +
          + cloudify_rest_client.nodes +
      + + +
      + +
      +
      + +
      + +
      + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/search.html b/docs/_build/html/search.html new file mode 100644 index 0000000..888ce03 --- /dev/null +++ b/docs/_build/html/search.html @@ -0,0 +1,168 @@ + + + + + + + + + + Search — cloudify-rest-client 3.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + + +
      + + + + + + +
      +
      +
      +
        +
      • Docs »
      • + +
      • +
      • + +
      • +
      +
      +
      +
      + + + + +
      + +
      + +
      + +
      +
      + +
      + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/searchindex.js b/docs/_build/html/searchindex.js new file mode 100644 index 0000000..d766fc3 --- /dev/null +++ b/docs/_build/html/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({envversion:42,terms:{is_allow_overwrit:[],code:[],identifi:0,execut:0,object:0,when:[],verbos:[],all:0,save_management_alia:[],comma:[],private_ip:[],yaml_tag:[],target_directori:[],data:0,cosmo_cli:[],content:0,onli:[],is_verbose_output:[],node_inst:0,reset_config:[],favor:[],get_sourc:0,configur:[],except:0,param:0,should:0,yaml:0,init:[],other:0,dict:0,logger:[],main:0,cred:[],match:0,info:[],node_instance_id:0,sourc:0,"return":0,management_alia:[],thei:[],blueprint_id:0,fals:0,disposit:0,pypi:[],baseproviderclass:[],initi:[],set_management_us:[],ssh:[],type_hierarchi:0,failur:0,get_provider_context:[],host_id:0,loader:[],look:[],name:0,specif:[],level:[],tear:[],provider_context:[],list:0,upload:0,cloudifyclienterror:0,separ:[],"default":0,provider_common:[],alreadi:0,remove_management_server_context:[],management_address:[],each:[],pars:0,found:[],mgmt_ssh_user:[],where:0,page:0,node:0,set:[],cosmoworkingdirectoryset:[],management_address_or_alia:[],translate_management_alia:[],yaml_load:[],yamlobject:[],uniqu:0,get_management_kei:[],hierarchi:0,workflow_id:0,"static":0,connect:[],cfy:[],download:0,server:[],set_management_kei:[],port:0,after:0,index:0,statu:0,throughout:[],tupel:[],mgmt_ip:[],user:[],blueprint_path:0,below:[],per:0,current:0,delet:0,state:0,version:0,directori:[],cosmovalidationerror:[],determin:0,"import":[],paramet:0,method:[],ignore_valid:[],set_provid:[],requests_method:0,accord:[],nodescli:0,run:0,behavior:0,kei:[],workflow:0,providermanag:[],get_provid:[],privat:[],host:0,succeed:[],get_management_serv:[],output:[],put:0,path:0,post:0,validate_schema:[],output_fil:0,valu:0,search:0,plugin:0,argument:0,expected_cod:0,eventscli:0,manag:0,validaiton_error:[],base:0,pagin:0,list_workflow:0,overriden:[],httpclient:0,implement:[],global:[],set_provider_context:[],first:0,oper:0,cwd:[],torn:[],validation_error:[],point:0,mgmt_ssh_kei:[],appli:[],modul:0,within:[],number:0,provider_config:[],down:[],api:0,suppli:[],cancel:0,instal:[],total:0,storag:0,expected_status_cod:0,differ:[],from:0,log:0,teardown:[],executionscli:0,patch:0,messag:0,"class":0,avail:0,whom:0,live:0,call:0,cosmodeverror:[],basic:[],iniati:[],init_logg:[],type:0,set_management_serv:[],store:0,schema:[],blueprint:0,wd_set:[],cloudifycli:0,option:0,relationship:0,forc:0,tupl:0,"public":[],management_kei:[],specifi:0,"_management_us":[],flag:[],include_log:0,from_ev:0,lgr:[],cosmoclierror:[],compar:[],hold:[],"true":[],folder:0,must:[],"case":0,none:0,retriev:0,target:[],instanc:0,provid:0,alia:[],nodeinstancescli:0,properti:0,maximum:0,cloudify_:[],verify_response_statu:0,remain:[],can:0,str:0,optimist:0,provis:[],otherwis:0,purpos:[],set_global_verbosity_level:[],impl:[],pack:0,overrid:[],creat:0,"int":0,lock:0,respons:0,suppressedcosmoclierror:[],batch_siz:0,repres:0,archiv:0,runtime_properti:0,inherit:[],file:0,desir:[],cloudify_rest_cli:0,keep:[],execution_id:0,string:[],again:[],ommit:[],deploymentscli:0,perform:[],get:0,nodeinst:0,event:0,number_of_inst:0,also:0,valid:[],bool:[],which:0,"new":0,config:[],belong:0,updat:0,jsonschema:[],map:0,runtim:0,copi:[],resourc:[],thi:0,deploy:0,who:0,do_request:0,draft4valid:[],befor:[],blueprintscli:0,node_id:0,whether:0,ignore_live_nod:0,previous:0,content_disposition_head:0,contain:0,get_management_us:[],chang:0,dev_mod:[],list_execut:0,whose:0,url:[],bootstrap:[],credenti:[],uri:0,given:[],cosmobootstraperror:[],consol:[],management_ip:[],write:[],ignor:0,error:0,allow:0,accompani:[],deployment_id:0},objtypes:{"0":"py:module","1":"py:method","2":"py:attribute","3":"py:class","4":"py:exception"},objnames:{"0":["py","module","Python module"],"1":["py","method","Python method"],"2":["py","attribute","Python attribute"],"3":["py","class","Python class"],"4":["py","exception","Python exception"]},filenames:["index"],titles:["Welcome to cloudify-rest-client’s documentation!"],objects:{"cloudify_rest_client.deployments.DeploymentsClient":{execute:[0,1,1,""],get:[0,1,1,""],list_executions:[0,1,1,""],create:[0,1,1,""],list:[0,1,1,""],list_workflows:[0,1,1,""],"delete":[0,1,1,""]},"cloudify_rest_client.nodes.Node":{operations:[0,2,1,""],relationships:[0,2,1,""],type_hierarchy:[0,2,1,""],blueprint_id:[0,2,1,""],number_of_instances:[0,2,1,""],properties:[0,2,1,""],plugins:[0,2,1,""],host_id:[0,2,1,""],deployment_id:[0,2,1,""],type:[0,2,1,""],id:[0,2,1,""]},"cloudify_rest_client.node_instances.NodeInstance":{relationships:[0,2,1,""],runtime_properties:[0,2,1,""],state:[0,2,1,""],version:[0,2,1,""],host_id:[0,2,1,""],deployment_id:[0,2,1,""],id:[0,2,1,""],node_id:[0,2,1,""]},"cloudify_rest_client.events":{EventsClient:[0,3,1,""]},"cloudify_rest_client.deployments.Deployment":{id:[0,2,1,""],blueprint_id:[0,2,1,""]},"cloudify_rest_client.node_instances":{NodeInstance:[0,3,1,""],NodeInstancesClient:[0,3,1,""]},"cloudify_rest_client.blueprints.BlueprintsClient":{get_source:[0,1,1,""],get:[0,1,1,""],list:[0,1,1,""],upload:[0,1,1,""],CONTENT_DISPOSITION_HEADER:[0,2,1,""],download:[0,1,1,""],"delete":[0,1,1,""]},cloudify_rest_client:{blueprints:[0,0,0,"-"],node_instances:[0,0,0,"-"],deployments:[0,0,0,"-"],client:[0,0,0,"-"],exceptions:[0,0,0,"-"],nodes:[0,0,0,"-"],executions:[0,0,0,"-"],events:[0,0,0,"-"]},"cloudify_rest_client.client.HTTPClient":{get:[0,1,1,""],patch:[0,1,1,""],verify_response_status:[0,1,1,""],put:[0,1,1,""],post:[0,1,1,""],do_request:[0,1,1,""],"delete":[0,1,1,""]},"cloudify_rest_client.events.EventsClient":{get:[0,1,1,""]},"cloudify_rest_client.executions":{ExecutionsClient:[0,3,1,""],Execution:[0,3,1,""]},"cloudify_rest_client.client":{CloudifyClient:[0,3,1,""],HTTPClient:[0,3,1,""]},"cloudify_rest_client.node_instances.NodeInstancesClient":{list:[0,1,1,""],update:[0,1,1,""],get:[0,1,1,""]},"cloudify_rest_client.blueprints":{Blueprint:[0,3,1,""],BlueprintsClient:[0,3,1,""]},"cloudify_rest_client.blueprints.Blueprint":{id:[0,2,1,""]},"cloudify_rest_client.deployments":{DeploymentsClient:[0,3,1,""],Workflow:[0,3,1,""],Workflows:[0,3,1,""],Deployment:[0,3,1,""]},"cloudify_rest_client.nodes":{Node:[0,3,1,""],NodesClient:[0,3,1,""]},"cloudify_rest_client.deployments.Workflows":{deployment_id:[0,2,1,""],blueprint_id:[0,2,1,""],workflows:[0,2,1,""]},"cloudify_rest_client.nodes.NodesClient":{list:[0,1,1,""]},"cloudify_rest_client.executions.ExecutionsClient":{cancel:[0,1,1,""],list:[0,1,1,""],update:[0,1,1,""],get:[0,1,1,""]},"cloudify_rest_client.executions.Execution":{status:[0,2,1,""],workflow_id:[0,2,1,""],id:[0,2,1,""],error:[0,2,1,""]},"cloudify_rest_client.exceptions":{CloudifyClientError:[0,4,1,""]},"cloudify_rest_client.deployments.Workflow":{id:[0,2,1,""],name:[0,2,1,""]}},titleterms:{cli:[],cloudifi:0,rest:0,client:0,indic:0,tabl:0,document:0,welcom:0}}) \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000..ff3ea29 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,287 @@ +# flake8: NOQA +# -*- coding: utf-8 -*- +# +# packman documentation build configuration file, created by +# sphinx-quickstart on Thu Apr 3 23:59:36 2014. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys +import os +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' + +if not on_rtd: # only import and set the theme if we're building docs locally + import sphinx_rtd_theme + html_theme = 'sphinx_rtd_theme' + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + +# General information about the project. +project = 'cloudify-rest-client' +package = 'cloudify_rest_client' +author = 'Gigaspaces' +copyright = '2014, Gigaspaces' + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +sys.path.insert(0, os.path.abspath('../{}'.format(package))) +sys.path.insert(0, os.path.abspath('..')) +sys.path.insert(0, os.path.abspath('../..')) + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.doctest', + 'sphinx.ext.coverage', + 'sphinx.ext.ifconfig', + 'sphinx.ext.viewcode' +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. + +import pkg_resources +try: + release = pkg_resources.get_distribution(project).version +except pkg_resources.DistributionNotFound: + print 'To build the documentation, The distribution information of packm' + print 'Has to be available. Either install the package into your' + print 'development environment or run "setup.py develop" to setup the' + print 'metadata. A virtualenv is recommended!' + sys.exit(1) +except Exception as e: + print e +del pkg_resources +# release = '0.1.0' +version = '.'.join(release.split('.')[:2]) +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +#keep_warnings = False + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# html_theme = 'sphinx_rtd_theme' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +# html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +#html_extra_path = [] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = '{0}doc'.format(project) + + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + #'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + #'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + #'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + ('index', '{0}.tex'.format(project), u'{0} Documentation'.format(project), + u'{}'.format(author), 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', project, u'{0} Documentation'.format(project), + [u'{}'.format(author)], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index', project, u'{0} Documentation'.format(project), + u'{}'.format(author), project, 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +#texinfo_no_detailmenu = False + +autodoc_member_order = 'bysource' diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..323ddb3 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,60 @@ +.. cloudify-cli documentation master file, created by + sphinx-quickstart on Thu Jun 12 15:30:03 2014. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to cloudify-rest-client's documentation! +================================================ + +Contents: + +.. toctree:: + :maxdepth: 2 + +.. automodule:: cloudify_rest_client.blueprints + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: cloudify_rest_client.client + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: cloudify_rest_client.deployments + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: cloudify_rest_client.events + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: cloudify_rest_client.exceptions + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: cloudify_rest_client.executions + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: cloudify_rest_client.node_instances + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: cloudify_rest_client.nodes + :members: + :undoc-members: + :show-inheritance: + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..fa81657 --- /dev/null +++ b/tox.ini @@ -0,0 +1,25 @@ +# content of: tox.ini , put in same dir as setup.py +[tox] +envlist=flake8, docs, py27 + +[testenv:py27] +deps = + nose + nose-cov + testfixtures + -r{toxinidir}/requirements.txt +commands=nosetests --with-cov --cov cosmo_cli cosmo_cli/tests/ + +[testenv:docs] +basepython=python +changedir=docs +deps = + sphinx + sphinx-rtd-theme +commands=make html + +[testenv:flake8] +deps = + flake8 + -r{toxinidir}/requirements.txt +commands=flake8 cosmo_cli \ No newline at end of file