aboutsummaryrefslogtreecommitdiffstats
path: root/docs/testing
diff options
context:
space:
mode:
authorakhilbatra898 <akhil.batra@research.iiit.ac.in>2017-08-27 01:35:25 +0530
committerakhilbatra898 <akhil.batra@research.iiit.ac.in>2017-08-28 12:41:26 +0530
commitbb292d2f9df0270ea0a366638b47568966d98482 (patch)
tree381c9e8b61cf7e2e355a0f824a8e57d7b7fc46a9 /docs/testing
parentef578e8259d2d43c497cbc6e4d0d15a2afb2f076 (diff)
Add developer guide for QTIP-WEB services
Change-Id: Idadd343367841cfa9e10b5f6f3d3a9ccc0917d5a Signed-off-by: akhilbatra898 <akhil.batra@research.iiit.ac.in>
Diffstat (limited to 'docs/testing')
-rw-r--r--docs/testing/developer/devguide/index.rst1
-rw-r--r--docs/testing/developer/devguide/web.rst100
2 files changed, 101 insertions, 0 deletions
diff --git a/docs/testing/developer/devguide/index.rst b/docs/testing/developer/devguide/index.rst
index 40baca9c..48bbda49 100644
--- a/docs/testing/developer/devguide/index.rst
+++ b/docs/testing/developer/devguide/index.rst
@@ -16,4 +16,5 @@ QTIP Developer Guide
framework.rst
cli.rst
api.rst
+ web.rst
compute-qpi.rst
diff --git a/docs/testing/developer/devguide/web.rst b/docs/testing/developer/devguide/web.rst
new file mode 100644
index 00000000..ae4e3156
--- /dev/null
+++ b/docs/testing/developer/devguide/web.rst
@@ -0,0 +1,100 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+
+***************************************
+Web Portal for Benchmarking Services
+***************************************
+
+QTIP consists of different tools(metrics) to benchmark the NFVI. These metrics
+fall under different NFVI subsystems(QPI's) such as compute, storage and network.
+QTIP benchmarking tasks are built upon `Ansible`_ playbooks and roles.
+QTIP web portal is a platform to expose QTIP as a benchmarking service hosted on a central host.
+
+Framework
+=========
+
+The web travel has been developed on Python `Django`_ framework. Dig into the documentation to learn about Django.
+
+Design
+======
+
+Django is a MTV (Model Template View) framework. Database objects are mapped to models in ``models.py``. Views handle the
+requests from client side and interact with database using Django ORM. Templates are responsible for
+UI rendering based on response context from Views.
+
+Models
+------
+
+Repo
+~~~~
+
+Model for `workspace`_ repos
+
+::
+
+ Repo:
+ name
+ git_link
+
+
+Task
+~~~~
+
+Tasks keep track of every benchmark run through QTIP-Web Services. Whenever you run a benchmark,
+a new task is created which keep track of time stats and log task progress and ansible output for
+the respective playbook.
+
+::
+
+ Task
+ start_time
+ end_time
+ status
+ run_time
+ repo
+ log
+
+
+Views
+-----
+
+Dashboard
+~~~~~~~~~
+
+ - Base class - TemplateVIew
+
+Class based view serving as home page for the application.
+
+
+ReposView
+~~~~~~~~~
+
+ - Base class - LoginRequiredMixin, CreateView
+
+Class based view for listing and add new repos
+
+
+RepoUpdate
+~~~~~~~~~~
+
+ - Base class - LoginRequiredMixin, UpdateView
+
+Class based View for listing and updating an existing repo details.
+
+*Both ReposView and RepoUpdate View use same template ``repo_form.html``. The context has an extra variable ``template_role`` which is used to distinguish if repo form is for create or edit operation.*
+
+
+Run
+~~~
+
+ - Base class - LoginRequiredMixin, View
+ - template name - run.html
+
+Class based View for adding new task and run benchmark based on task details. The logs are saved
+in ``logs/run_<log_id>`` directory.
+
+
+.. _Ansible: https://www.ansible.com/
+.. _Django: https://docs.djangoproject.com/en/1.11/
+.. _workspace: https://github.com/opnfv/qtip/blob/master/docs/testing/developer/devguide/ansible.rst#create-workspace