laas.git
5 years agoMerge "Fix Missing Static Assets"
Parker Berberian [Tue, 23 Oct 2018 19:57:46 +0000 (19:57 +0000)]
Merge "Fix Missing Static Assets"

5 years agoMerge "Fixed serialization"
Parker Berberian [Tue, 23 Oct 2018 19:53:07 +0000 (19:53 +0000)]
Merge "Fixed serialization"

5 years agoMerge "Fix error in Booking cleanup task"
Parker Berberian [Tue, 23 Oct 2018 19:52:54 +0000 (19:52 +0000)]
Merge "Fix error in Booking cleanup task"

5 years agoMerge "Fix clear_delta() function"
Parker Berberian [Tue, 23 Oct 2018 19:52:45 +0000 (19:52 +0000)]
Merge "Fix clear_delta() function"

5 years agoMerge "Added template"
Parker Berberian [Tue, 23 Oct 2018 19:52:35 +0000 (19:52 +0000)]
Merge "Added template"

5 years agoMerge "Fix Typo"
Parker Berberian [Tue, 23 Oct 2018 19:52:17 +0000 (19:52 +0000)]
Merge "Fix Typo"

5 years agoMerge "Adds migrations"
Parker Berberian [Tue, 23 Oct 2018 19:52:06 +0000 (19:52 +0000)]
Merge "Adds migrations"

5 years agoFix Missing Static Assets
Trevor Bramwell [Tue, 23 Oct 2018 17:52:31 +0000 (10:52 -0700)]
Fix Missing Static Assets

collectstatic copies the static assets to STATIC_ROOT (which is set to
'/static'), instead of the static directory under pharos_dashboard.

Updating the static volume, which is served from NGINX to include these
files should fix the missing assets.

Change-Id: I19288e9825c1513684e4ee5f8a9542b1a0ceeeb1
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
5 years agoFixed serialization
Parker Berberian [Mon, 22 Oct 2018 14:42:02 +0000 (10:42 -0400)]
Fixed serialization

There was no need to serialize he dict ourselves.
JsonResponse wants to recieve a dict.

Change-Id: I2af1d9d8f0ccec4644e64ffce0de6005773be786
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoFix error in Booking cleanup task
Parker Berberian [Fri, 19 Oct 2018 14:35:29 +0000 (10:35 -0400)]
Fix error in Booking cleanup task

added a missing function call that was causing celery to fail to clean up Jobs.

Change-Id: I07a5e576d3dfcac320be206cc3235d17d4b286e0
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoFix clear_delta() function
Parker Berberian [Wed, 17 Oct 2018 17:34:56 +0000 (13:34 -0400)]
Fix clear_delta() function

NetworkConfig.clear_delta() appeared to be a noop, but can set the delta to
a nonempty string if delta is None.
This reverts a change I made here: https://gerrit.opnfv.org/gerrit/#/c/63385/6..7/dashboard/src/api/models.py

Change-Id: I72661ca9d889801fb6183943c8ae0e5e38cc960a
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoAdded template
Parker Berberian [Wed, 17 Oct 2018 17:15:00 +0000 (13:15 -0400)]
Added template

This template should not have been removed.

Change-Id: Ic794ee40f45bd44af6fa976983b1c93660c8bb1c
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoFix Typo
Parker Berberian [Wed, 17 Oct 2018 15:37:01 +0000 (11:37 -0400)]
Fix Typo

In one of the patchsets of LaaS 2.0 a typo was added.

Change-Id: I02ff24bea345279df6643c0b1a4358ab2eff1d31
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoAdds migrations
Parker Berberian [Wed, 17 Oct 2018 15:33:45 +0000 (11:33 -0400)]
Adds migrations

In reviewing the LaaS 2.0 code, models were changed without the accompanying migrations.

Change-Id: Ibdba456d9650c7d7d8750328852f27866a899328
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoRemoved references to old code
Parker Berberian [Mon, 15 Oct 2018 18:03:26 +0000 (14:03 -0400)]
Removed references to old code

With the LaaS 2.0 rewrite, there was still some old/dead/broken code being referenced.
This patch fixes that.

Change-Id: I25803652bc59bba1e416e526d205742c52f14a65
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoLab as a Service 2.0
Parker Berberian [Wed, 10 Oct 2018 20:06:47 +0000 (16:06 -0400)]
Lab as a Service 2.0

See changes here:
https://wiki.opnfv.org/display/INF/Pharos+Laas

Change-Id: I59ada5f98e70a28d7f8c14eab3239597e236ca26
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoDevelopment Override Compose File
Trevor Bramwell [Fri, 5 Oct 2018 23:05:20 +0000 (16:05 -0700)]
Development Override Compose File

Now that images are built and hosted for the dashboard and worker
container the compose file can reference upstream images instead of
ones locally built.

A second compose file is added which overrides compose configuration so
that images are built locally.

Initial commands for running the container are moved into 'init.sh'
which gets copied into the image, since the current images cannot be ran
by themselves as they require the command listed in the compose file.

The compose version bumped from 2 to 3 as there are no version 2
specific features being used that need to be modified.

Change-Id: I23813a859a676ba009cba8f5a62b7153da006eef
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
5 years agoUpdate Postgres Usage
Trevor Bramwell [Sat, 6 Oct 2018 00:00:45 +0000 (17:00 -0700)]
Update Postgres Usage

Setting POSTGRES_{DB,USER,PASSWORD} variables removes the need to volume
mount the script for specifying the user and database.

Change-Id: I7ee958c8d36702d1afd701e026b642ac84440ee8
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
5 years agoUse Upstream Rabbitmq Docker Container
Trevor Bramwell [Mon, 1 Oct 2018 17:28:17 +0000 (10:28 -0700)]
Use Upstream Rabbitmq Docker Container

The upstream rabbitmq container supports specifying the default admin
user and password through the environment variables:
RABBITMQ_DEFAULT_USER and RABBITMQ_DEFAULT_PASS.

Utilizing these variables removes the need to build a rabbitmq container
specific to the Pharos LaaS Dashboard.

Change-Id: I390d7fa9254a0f28b374235254caff59b219cd87
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
5 years agoBump Python Cryptography Library Version
Trevor Bramwell [Mon, 1 Oct 2018 16:59:50 +0000 (09:59 -0700)]
Bump Python Cryptography Library Version

The underlying OpenSSL version changed in an upstream container which
cryptography==1.4 did not support. Bumping the cryptography library
fixes the build as they introduce broader support for OpenSSL versions
in their newer releases.

Change-Id: Ibd2f73aefebb39cc4121b77fa38aecb32b8494ae
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
5 years agochange ',' to '.' in settings.py
wutianwei [Fri, 20 Jul 2018 01:31:43 +0000 (09:31 +0800)]
change ',' to '.' in settings.py

Change-Id: I4f4a3419eef2aba407d772b39be62214b6b7142e
Signed-off-by: wutianwei <wutianwei1@huawei.com>
6 years agoMerge "Limit User Booking Length and Extensions"
Parker Berberian [Fri, 13 Apr 2018 18:49:48 +0000 (18:49 +0000)]
Merge "Limit User Booking Length and Extensions"

6 years agoMerge "Gracefully Handle Missing Jenkins Utilization for Dev Pod"
Parker Berberian [Fri, 13 Apr 2018 18:24:29 +0000 (18:24 +0000)]
Merge "Gracefully Handle Missing Jenkins Utilization for Dev Pod"

6 years agoImplement Booking Cleanup Task
Sawyer Bergeron [Mon, 26 Mar 2018 21:07:55 +0000 (17:07 -0400)]
Implement Booking Cleanup Task

Jira: PHAROS-344

Two new settings in config.env allow setting
1) how "stale" an expired booking can get before being culled and
2) how many expired bookings are kept around before culling
If either condition is met, expired bookings will be deleted until
both are false.

Change-Id: I6b091e93c6fe5d47b75ebf5325b717fa898c773c
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
6 years agoGracefully Handle Missing Jenkins Utilization for Dev Pod
Sawyer Bergeron [Tue, 6 Mar 2018 17:07:05 +0000 (12:07 -0500)]
Gracefully Handle Missing Jenkins Utilization for Dev Pod

Jira: PHAROS-364

Change-Id: I0641c658914e600672151d7c0d1661acba794f0f
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
6 years agoLimit User Booking Length and Extensions
Sawyer Bergeron [Mon, 26 Feb 2018 22:52:25 +0000 (17:52 -0500)]
Limit User Booking Length and Extensions

Jira: PHAROS-363

Bookings can now only be 3 weeks upon creation with a maximum of 2
1 week extensions.

Change-Id: I677770de3f62f188d23e60be6d71b42b25bf007e
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
6 years agoMerge "Allow Configuring 'DEFAULT_EMAIL_FROM' in Django"
Parker Berberian [Wed, 28 Feb 2018 15:05:26 +0000 (15:05 +0000)]
Merge "Allow Configuring 'DEFAULT_EMAIL_FROM' in Django"

6 years agoAllow Configuring 'DEFAULT_EMAIL_FROM' in Django
Trevor Bramwell [Tue, 27 Feb 2018 23:00:46 +0000 (15:00 -0800)]
Allow Configuring 'DEFAULT_EMAIL_FROM' in Django

This sets the default 'FROM' address in the header of outgoing emails
from the system. Making this configurable allows users to specify the
address notification emails come from.

Change-Id: Ibe229ef503847411f4879d5715392f816a455733
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
6 years agoLink AUP from dashboard
Sawyer Bergeron [Thu, 22 Feb 2018 21:18:56 +0000 (16:18 -0500)]
Link AUP from dashboard

Jira: PHAROS-361

Link and associated text below booking confirmation button now
direct users to Wiki#AUP and inform them that they agree to those
policies by continuing.

Change-Id: I18953cc71691a03290cbce979fbf500081ca3c10
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
6 years agoMerge "Provide Interface for Booking Deletion"
Parker Berberian [Mon, 19 Feb 2018 21:17:12 +0000 (21:17 +0000)]
Merge "Provide Interface for Booking Deletion"

6 years agoProvide Interface for Booking Deletion
Sawyer Bergeron [Tue, 13 Feb 2018 22:53:56 +0000 (17:53 -0500)]
Provide Interface for Booking Deletion

Jira: PHAROS-355

User can now delete their own booking by going to the detail view of their booking
and clicking 'delete'

Change-Id: I279da364c2a5dfd03b877d1236c610d0fef563bc
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
6 years agoMerge "Expose Limited User Info Through API"
Parker Berberian [Mon, 19 Feb 2018 20:58:15 +0000 (20:58 +0000)]
Merge "Expose Limited User Info Through API"

6 years agoMerge "Remove the Booking Notification Cleanup Task"
Parker Berberian [Mon, 19 Feb 2018 20:54:11 +0000 (20:54 +0000)]
Merge "Remove the Booking Notification Cleanup Task"

6 years agoMerge "Remove RSA Files from Repo"
Parker Berberian [Mon, 19 Feb 2018 20:52:28 +0000 (20:52 +0000)]
Merge "Remove RSA Files from Repo"

6 years agoExpose Limited User Info Through API
Sawyer Bergeron [Fri, 16 Feb 2018 20:50:22 +0000 (15:50 -0500)]
Expose Limited User Info Through API

Jira: PHAROS-362

Exposes info such as username and user email throught the API to facilitate
better backend integration

Change-Id: I8948f399000ffe41d5b75941f4a4195caaea91f4
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
6 years agoChange opsys Label to Operating System
Sawyer Bergeron [Thu, 15 Feb 2018 21:05:37 +0000 (16:05 -0500)]
Change opsys Label to Operating System

Jira: PHAROS-360

This makes the booking UI more intuitive by clarifying a field

Change-Id: Ic7806e72a1ab94d650064c2c8e8820853385c356
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
6 years agoMerge "Ensure DEBUG is set as a Boolean"
Parker Berberian [Mon, 12 Feb 2018 14:21:00 +0000 (14:21 +0000)]
Merge "Ensure DEBUG is set as a Boolean"

6 years agoMerge "Use userprofile.email_addr in User List"
Parker Berberian [Mon, 12 Feb 2018 14:20:52 +0000 (14:20 +0000)]
Merge "Use userprofile.email_addr in User List"

6 years agoEnsure DEBUG is set as a Boolean
Trevor Bramwell [Fri, 9 Feb 2018 19:08:55 +0000 (11:08 -0800)]
Ensure DEBUG is set as a Boolean

Since os.environ only allows strings DEBUG needs to be converted.
Assigning DEBUG to the comparison of the strings is enough to get the
correct value out.

Change-Id: Ie104d2fc5de5906ad2830c5ed7cff3b1c0fda3c5
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
6 years agoPull DEBUG Var From Environment
Trevor Bramwell [Fri, 9 Feb 2018 19:08:55 +0000 (11:08 -0800)]
Pull DEBUG Var From Environment

This is explictily set in settings.py and can't be changed without
modifying the file.

Change-Id: If2f06e25857e15405470254731f17765619f369a
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
6 years agoUse userprofile.email_addr in User List
Sawyer Bergeron [Fri, 9 Feb 2018 17:02:44 +0000 (12:02 -0500)]
Use userprofile.email_addr in User List

Jira: None

User List view in dashboard now uses the generally populated userprofile.email_addr
field instead of user.email

Change-Id: I1585ddf3cde293d33351a2ea036aa0a343fdd8b1
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
6 years agoRemove the Booking Notification Cleanup Task
Trevor Bramwell [Fri, 2 Feb 2018 21:37:23 +0000 (13:37 -0800)]
Remove the Booking Notification Cleanup Task

These are created by the notification django-app, but that app is no
longer used or installed.

This change should also keep the worker container from continuously
restarting.

Change-Id: Ifbdf15e7011375f3818179048ec6be4a83a53917
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
6 years agoRemove RSA Files from Repo
Trevor Bramwell [Fri, 2 Feb 2018 21:31:13 +0000 (13:31 -0800)]
Remove RSA Files from Repo

Since these are in the .gitignore file they shouldn't be in the repo.

Change-Id: Iaf4da94863d4edf10bdce924d33023ca2d679c64
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
6 years agoMerge "Add User-ID Field in Booking API Serializer"
Parker Berberian [Wed, 31 Jan 2018 17:33:27 +0000 (17:33 +0000)]
Merge "Add User-ID Field in Booking API Serializer"

6 years agoAdd User-ID Field in Booking API Serializer
Sawyer Bergeron [Thu, 18 Jan 2018 21:01:07 +0000 (16:01 -0500)]
Add User-ID Field in Booking API Serializer

Jira: None

Change-Id: I217cf26b078461fa2300ee666bd4c2775c62316b
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
6 years agoAdd Nullable Lab Field to Resources
Sawyer Bergeron [Wed, 10 Jan 2018 16:44:23 +0000 (11:44 -0500)]
Add Nullable Lab Field to Resources

Jira: PHAROS-347

Resources are now possible to associate with lab instances upon creation

Change-Id: Id8abbcc448a6d840d55e4bf5130dbec22c8bc58f

6 years agoImplement Booking Modification Interface
Sawyer Bergeron [Fri, 5 Jan 2018 21:07:13 +0000 (16:07 -0500)]
Implement Booking Modification Interface

Jira: PHAROS-330

Users can change start date if it has not already occurred, and
can change end date, purpose, and both installer and scenario.
Standard checks apply similar to when initially creating a booking.

Change-Id: Ibae7fe91a58bd6e0741db065265c05c3823bdc27
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
6 years agoMerge "Create Lab Model"
Jack Morgan [Tue, 9 Jan 2018 18:47:24 +0000 (18:47 +0000)]
Merge "Create Lab Model"

6 years agoFixes for Recent Merge
Sawyer Bergeron [Tue, 9 Jan 2018 15:12:20 +0000 (10:12 -0500)]
Fixes for Recent Merge

Jira: None

In a recent large merge, some code was lost in translation.
This commit fixes a missing line in requirements.txt and
removes a couple lines in dispatchers.py that lost relevance.

Change-Id: I5ddf67fc1da6df40f84d60668cd59e6a1975912d
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
6 years agoCreate Lab Model
Sawyer Bergeron [Tue, 9 Jan 2018 15:38:23 +0000 (10:38 -0500)]
Create Lab Model

Jira: PHAROS-346

Allows admin to instantiate lab instances

Change-Id: I67f8ceb3bc76d4cdd09fb6f3a0b715af312f6f83
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
6 years agoMerge "Implement Notification Framework with Initial Email Support"
Jack Morgan [Mon, 8 Jan 2018 23:56:29 +0000 (23:56 +0000)]
Merge "Implement Notification Framework with Initial Email Support"

6 years agoMerge "Add Dashboard OS Selection Menu on Booking"
Jack Morgan [Mon, 8 Jan 2018 23:56:21 +0000 (23:56 +0000)]
Merge "Add Dashboard OS Selection Menu on Booking"

6 years agoImplement Notification Framework with Initial Email Support
Sawyer Bergeron [Fri, 15 Dec 2017 19:35:40 +0000 (14:35 -0500)]
Implement Notification Framework with Initial Email Support

JIRA: None

Notification/notifier objects are now created with title,
content, sender, associated resource, and recipient and there is
now support for emails at the very least to be sent as notifications.

Change-Id: I456cf0e901d9a1e2a1e7d187dcc03d28fca003fb
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
6 years agoMerge "Add Boolean Option for Dev Pod in API"
Jack Morgan [Thu, 14 Dec 2017 01:20:51 +0000 (01:20 +0000)]
Merge "Add Boolean Option for Dev Pod in API"

6 years agoMerge "Fix Gitignore for Oauth Keys"
Jack Morgan [Thu, 14 Dec 2017 01:19:21 +0000 (01:19 +0000)]
Merge "Fix Gitignore for Oauth Keys"

6 years agoMerge "Integrate Initial Email Support"
Jack Morgan [Thu, 14 Dec 2017 01:18:58 +0000 (01:18 +0000)]
Merge "Integrate Initial Email Support"

6 years agoAdd Dashboard OS Selection Menu on Booking
Sawyer Bergeron [Fri, 1 Dec 2017 17:11:12 +0000 (12:11 -0500)]
Add Dashboard OS Selection Menu on Booking

JIRA: PHAROS-326

Implement dropdown menu on pod booking page for user to
select base OS, as well as associated support in API and
pod status/booking status views

This patch includes the migration file mentioned by Parker Berbarian

Change-Id: I46a7b0e5e7020a89bc8fa0fe53c10bbda14a2e2d
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
6 years agoAdd Boolean Option for Dev Pod in API
Sawyer Bergeron [Tue, 12 Dec 2017 19:29:52 +0000 (14:29 -0500)]
Add Boolean Option for Dev Pod in API

Change-Id: I4f0a0fc0ac5d81ae9454e6cece060032f9b806f7
JIRA: None

6 years agoIntegrate Initial Email Support
Sawyer Bergeron [Wed, 6 Dec 2017 21:48:31 +0000 (16:48 -0500)]
Integrate Initial Email Support

JIRA: None

Integrate ability for users to change email presented to admins
with field initially filled with user's Jira associated email address
This amend takes into account a streamlining change
suggested by Parker Berbarian

Change-Id: I677ce669f200e5cad70c198737118f0b7925bac5
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
6 years agoMerge "Abstract Hard-Coded URLs to Config File"
Jack Morgan [Thu, 7 Dec 2017 19:39:00 +0000 (19:39 +0000)]
Merge "Abstract Hard-Coded URLs to Config File"

6 years agoFix Gitignore for Oauth Keys
Sawyer Bergeron [Fri, 1 Dec 2017 20:37:17 +0000 (15:37 -0500)]
Fix Gitignore for Oauth Keys

JIRA: None

Gitignore file now properly ignores src/account/rsa.pem
and src/account/rsa.pub

Change-Id: I370a7d68cd2726540e4c7c294cc2de779f854f7a
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
6 years agoAbstract Hard-Coded URLs to Config File
Sawyer Bergeron [Fri, 3 Nov 2017 18:36:19 +0000 (14:36 -0400)]
Abstract Hard-Coded URLs to Config File

JIRA: PHAROS-317

The Jenkins URL configuration now works the same as the Jira URL configuration,
with a base URL in the config.env file, with settings.py calculating the final URLs
to be used in adapter.py.

Change-Id: I79b4784ab39afdb789a24e4c0f1e8a3ae3566421
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
6 years agoAdd 'staticfiles' Template Tag to Base Template
Trevor Bramwell [Mon, 9 Oct 2017 21:46:24 +0000 (14:46 -0700)]
Add 'staticfiles' Template Tag to Base Template

Without this tag the dashboard HTML will fail to render because it
doesn't have a reference to the 'static' template tag.

Change-Id: Id56d3b460dc848508c8ae549e7781ea876bdc52b
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
6 years agoServe the OPNFV Logo Locally
Trevor Bramwell [Tue, 3 Oct 2017 19:21:12 +0000 (12:21 -0700)]
Serve the OPNFV Logo Locally

Because the logo is currently being pulled from an external HTTP site,
the site is being listed as insecure.

Adding the OPNFV logo to static content should fix the warning and keep
the previous error of the logo being moved from happening.

Change-Id: I13cf83aa612f5589e304699f808ff7b105611fc4
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
6 years agoRename pharos-dashboard and pharos-validator
Trevor Bramwell [Fri, 22 Sep 2017 19:23:36 +0000 (12:23 -0700)]
Rename pharos-dashboard and pharos-validator

As subdirectories of the pharos-tools repo, there is little need to keep
the pharos prefix.

Change-Id: Ica3d79411f409df638647300036c0664183c2725
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>