pharos-tools.git
5 years agoAllow Users to Delete objects and Cancel Bookings 29/66729/2
Parker Berberian [Tue, 29 Jan 2019 15:05:27 +0000 (10:05 -0500)]
Allow Users to Delete objects and Cancel Bookings

A user can now delete thier own resources, configs,
and snapshots as well as cancelling bookings.

Change-Id: Ic8e4751feeb0b8fa0d76816b8df2d16729ad2828
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoFixed timezone issue in the Snapshot Workflow 73/66573/1
Parker Berberian [Tue, 22 Jan 2019 16:54:12 +0000 (11:54 -0500)]
Fixed timezone issue in the Snapshot Workflow

The snapshot workflow was using the python datetime module directly,
which breaks on the strict timezone requirements of the live
dashboard. This commit uses the django timezone module instead

Change-Id: I04b43b127bd3d8eb8ac72aa9c84e24a5f154a880
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoMerge "Fix BookingDetail Template"
Parker Berberian [Fri, 18 Jan 2019 21:21:28 +0000 (21:21 +0000)]
Merge "Fix BookingDetail Template"

5 years agoMerge "Fix ConfigBundle not being set in quick deploy"
Parker Berberian [Fri, 18 Jan 2019 21:21:12 +0000 (21:21 +0000)]
Merge "Fix ConfigBundle not being set in quick deploy"

5 years agoMerge "Make landing page less sparse"
Parker Berberian [Fri, 18 Jan 2019 21:20:35 +0000 (21:20 +0000)]
Merge "Make landing page less sparse"

5 years agoMake landing page less sparse 99/66499/1
Sawyer Bergeron [Fri, 18 Jan 2019 21:14:00 +0000 (16:14 -0500)]
Make landing page less sparse

Change-Id: If661574fd0c62e208651507ccff844cf6f14e914
Signed-off-by: Sawyer Bergeron <sawyerbergeron@gmail.com>
5 years agoOverHaul the Snapshot Workflow 73/66473/5
Parker Berberian [Thu, 17 Jan 2019 17:51:04 +0000 (12:51 -0500)]
OverHaul the Snapshot Workflow

Makes the Snapshot workflow much prettier and more functional.

Change-Id: Icdd66f64e6d336ad49ed3cf638a301d0ca92fda9
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoMerge "Style Account pages"
Parker Berberian [Fri, 18 Jan 2019 19:52:28 +0000 (19:52 +0000)]
Merge "Style Account pages"

5 years agoStyle Account pages 95/66495/2
Parker Berberian [Fri, 18 Jan 2019 19:43:11 +0000 (14:43 -0500)]
Style Account pages

Adds some prettiness to the account pages that list bookings, etc

Change-Id: I90508cfafba00380d67965a038dc54d1fac43f60
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoFix ConfigBundle not being set in quick deploy 93/66493/1
Sawyer Bergeron [Fri, 18 Jan 2019 17:55:05 +0000 (12:55 -0500)]
Fix ConfigBundle not being set in quick deploy

booking.config_bundle was not getting set in quick deploy, making the
booking detail page inaccurate

Change-Id: If62518030cc5d1726cbc03efa745c38a99465881
Signed-off-by: Sawyer Bergeron <sawyerbergeron@gmail.com>
5 years agoAllow for Hosts to be Re-Imaged 11/66411/2
Parker Berberian [Tue, 15 Jan 2019 17:49:20 +0000 (12:49 -0500)]
Allow for Hosts to be Re-Imaged

This change adds a button the user can press on thier booking
detail page to reset thier host. They can choose to deploy
any available image to thier servers (not just the one already used)

Change-Id: I97a9869d2b38389c54f13173bb28a68cc52bb8d5
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoFix BookingDetail Template 91/66491/1
Sawyer Bergeron [Fri, 18 Jan 2019 16:56:21 +0000 (11:56 -0500)]
Fix BookingDetail Template

Booking detail view template did not properly reference diskprofile
objects by their related name, so that area was blank in the rendered
page

Change-Id: Icedc12a6cd31a2422e26281e2b4f34750fb01bae
Signed-off-by: Sawyer Bergeron <sawyerbergeron@gmail.com>
5 years agoMerge "Styled the Booking Statistics page"
Parker Berberian [Fri, 18 Jan 2019 16:31:24 +0000 (16:31 +0000)]
Merge "Styled the Booking Statistics page"

5 years agoMerge "Add Quick-Booking Workflow"
Parker Berberian [Fri, 18 Jan 2019 16:30:27 +0000 (16:30 +0000)]
Merge "Add Quick-Booking Workflow"

5 years agoAdd Quick-Booking Workflow 63/66463/9
Sawyer Bergeron [Thu, 17 Jan 2019 16:30:35 +0000 (11:30 -0500)]
Add Quick-Booking Workflow

Users can now quickly provision a single-host pod without having to
configure unecessary networking. This is intended to be analogous to the
workflow used during LaaS 1.0, and to speed up the process of creating a
booking for users who do not need more than a single host (for virtual
deployments)

Change-Id: Ia19cea9a42bbb1df57aad05af8f8ea821395664d
Signed-off-by: Sawyer Bergeron <sawyerbergeron@gmail.com>
5 years agoMerge "Fix Multiple Select Filter Widget"
Parker Berberian [Fri, 18 Jan 2019 16:19:32 +0000 (16:19 +0000)]
Merge "Fix Multiple Select Filter Widget"

5 years agoStyled the Booking Statistics page 45/66445/1
Parker Berberian [Wed, 16 Jan 2019 22:18:09 +0000 (17:18 -0500)]
Styled the Booking Statistics page

Added some pretty CSS

Change-Id: I8330f8de34ab22197bedad802b3696526c009ba4
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoMerge "Landing page now links to LaaS 2.0 wiki entry"
Parker Berberian [Wed, 16 Jan 2019 20:11:21 +0000 (20:11 +0000)]
Merge "Landing page now links to LaaS 2.0 wiki entry"

5 years agoFix Multiple Select Filter Widget 41/66441/1
Parker Berberian [Wed, 16 Jan 2019 20:05:36 +0000 (15:05 -0500)]
Fix Multiple Select Filter Widget

Fixed a bug in the widget that allowed multiple
objects to be selected when only one was allowed.

Change-Id: I623a041fa82a2f7ee178df782d21d100617eac3b
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoFix API serialization 03/66203/1
Parker Berberian [Fri, 4 Jan 2019 16:29:00 +0000 (11:29 -0500)]
Fix API serialization

Under special circumstances, the 'context' field may be empty and serialization will fail,
but that field is optional so we will ignore errors.

Change-Id: I2e1e47a2f7d507e45b171f80aa241c8026cfc1a5
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoLanding page now links to LaaS 2.0 wiki entry 01/66201/1
Sawyer Bergeron [Fri, 4 Jan 2019 16:12:41 +0000 (11:12 -0500)]
Landing page now links to LaaS 2.0 wiki entry

Change-Id: I01dd7f671a21c9b9f06dede341d6ddf410f0e776
Signed-off-by: Sawyer Bergeron <sawyerbergeron@gmail.com>
5 years agoMerge "Fixed Query for free hosts"
Parker Berberian [Fri, 4 Jan 2019 14:58:07 +0000 (14:58 +0000)]
Merge "Fixed Query for free hosts"

5 years agoFix landing page directions for not-logged-in users 99/66199/1
Sawyer Bergeron [Fri, 4 Jan 2019 14:38:43 +0000 (09:38 -0500)]
Fix landing page directions for not-logged-in users

Users will see a more informative landing page that directs them to log
in if they have not yet done so, rather than displaying actions they can
not yet take and having a required login get triggered later

Change-Id: I9812367930665614933551f780f4c6726ff3049c
Signed-off-by: Sawyer Bergeron <sawyerbergeron@gmail.com>
5 years agoFixed Query for free hosts 97/66197/1
Parker Berberian [Fri, 4 Jan 2019 14:35:24 +0000 (09:35 -0500)]
Fixed Query for free hosts

Change-Id: I05213a3521c5ffa6b311c9e11e9d593dd2098ebe
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoMerge "Changed Button style class to btn-primary"
Parker Berberian [Thu, 3 Jan 2019 20:09:42 +0000 (20:09 +0000)]
Merge "Changed Button style class to btn-primary"

5 years agoChanged Button style class to btn-primary 47/66147/3
Parker Berberian [Wed, 2 Jan 2019 22:54:24 +0000 (17:54 -0500)]
Changed Button style class to btn-primary

btn-primary has a handful of advantages over btn-default, including
consistency across browsers and correctly styling non-button
html tags

p.s. vim is best

Change-Id: I6e55a75a9fd48d64496fd83f43a7856af0c04cc0
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoAlert users that ssh key is required 69/66169/1
Sawyer Bergeron [Thu, 3 Jan 2019 19:39:47 +0000 (14:39 -0500)]
Alert users that ssh key is required

Any users that have not uploaded an ssh key will see a message on the
landing page that they need to upload one. Message is not seen by people
who have already uploaded a key

Change-Id: I01667e161521d801090173d47815abbeff094907
Signed-off-by: Sawyer Bergeron <sawyerbergeron@gmail.com>
5 years agoMerge "Improve cleanup of hosts after booking"
Parker Berberian [Thu, 3 Jan 2019 19:23:29 +0000 (19:23 +0000)]
Merge "Improve cleanup of hosts after booking"

5 years agoMerge "Removes log button in deployment"
Parker Berberian [Thu, 3 Jan 2019 19:23:18 +0000 (19:23 +0000)]
Merge "Removes log button in deployment"

5 years agoMerge "Requires a Jumphost per POD"
Parker Berberian [Thu, 3 Jan 2019 19:23:05 +0000 (19:23 +0000)]
Merge "Requires a Jumphost per POD"

5 years agoMerge "Cleaning up look and feel"
Parker Berberian [Thu, 3 Jan 2019 19:17:36 +0000 (19:17 +0000)]
Merge "Cleaning up look and feel"

5 years agoCleaning up look and feel 65/66165/2
Sawyer Bergeron [Thu, 3 Jan 2019 13:55:06 +0000 (08:55 -0500)]
Cleaning up look and feel

Network step is now much prettier

Change-Id: I72487e3a5f30e4c0339734674c53d4661f9c0104
Signed-off-by: Sawyer Bergeron <sawyerbergeron@gmail.com>
5 years agoDisable Edit Buttons 67/66167/1
Sawyer Bergeron [Thu, 3 Jan 2019 17:51:51 +0000 (12:51 -0500)]
Disable Edit Buttons

Edit buttons are currently not functional due to major changes in how
the workflow works, so this commit disables them for the time being to
avoid confusion

Change-Id: I62dddbc25267e9da55c503b48fed4f05cea97c22
Signed-off-by: Sawyer Bergeron <sawyerbergeron@gmail.com>
5 years agoMerge "Implement Segmented Workflows"
Parker Berberian [Thu, 3 Jan 2019 16:09:13 +0000 (16:09 +0000)]
Merge "Implement Segmented Workflows"

5 years agoRequires a Jumphost per POD 61/66161/1
Parker Berberian [Thu, 3 Jan 2019 15:49:29 +0000 (10:49 -0500)]
Requires a Jumphost per POD

It was assumed but never enforced that each pod configuration
elects at least one host as the "jumphost". This commit
makes that a requirement when creating a configuration.

Change-Id: If55f1aa231b3cba8713f325f158796d85466b02a
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoImplement Segmented Workflows 61/65861/5
Sawyer Bergeron [Fri, 14 Dec 2018 21:05:47 +0000 (16:05 -0500)]
Implement Segmented Workflows

A major source of bugs has been how we've approached inlining
workflows. We no longer inline them as of this commit, and instead
use a stack structure. This commits the result of workflows to the
database before other workflows try to read them, so we don't have
to maintain a code path for when something is or isn't committed
to db.

This patchset allows for workflows to pass limited information
to preset selections

Change-Id: I3d040c7f3024c7420017ae4ec66a23219303dcb6
Signed-off-by: Sawyer Bergeron <sawyerbergeron@gmail.com>
5 years agoRemoves log button in deployment 45/66145/1
Parker Berberian [Wed, 2 Jan 2019 21:51:35 +0000 (16:51 -0500)]
Removes log button in deployment

We had a button that would barf up XML logs for development
but forgot to disable it for the live dashboard

Change-Id: I1061ba967f077a103a7e1ae61d60d81cd9e4c443
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoQuick fix for dictionary access 43/66143/1
Parker Berberian [Wed, 2 Jan 2019 21:33:37 +0000 (16:33 -0500)]
Quick fix for dictionary access

the line .labs needed to be changed to ['labs']

Change-Id: I6d2aa2eca0413186ddf482aba7f01e4e53c0265b
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoAdded missing migration file 41/66141/1
Parker Berberian [Wed, 2 Jan 2019 19:57:06 +0000 (14:57 -0500)]
Added missing migration file

Change-Id: I7582360e3e5522cf06798200f80e5585864e945e
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoImprove cleanup of hosts after booking 39/66139/1
Parker Berberian [Wed, 2 Jan 2019 18:59:39 +0000 (13:59 -0500)]
Improve cleanup of hosts after booking

Previously, the database query was not reliably detecting
hosts which were to be released and made available
for new bookings. This should now take all bookings that
are over and have been cleaned by the lab, and make the
hosts available for reuse.

Change-Id: I040c2e02ac48d7bfde3fc1cf6bac4e59a48c8933
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoMerge "Abstract Out Inline CSS for Account Views"
Parker Berberian [Wed, 2 Jan 2019 15:22:55 +0000 (15:22 +0000)]
Merge "Abstract Out Inline CSS for Account Views"

5 years agoMerge "Removed document.open()"
Parker Berberian [Wed, 2 Jan 2019 14:38:37 +0000 (14:38 +0000)]
Merge "Removed document.open()"

5 years agoMerge "Fixes creation of ssh access job"
Parker Berberian [Wed, 2 Jan 2019 14:38:24 +0000 (14:38 +0000)]
Merge "Fixes creation of ssh access job"

5 years agoMerge "Renders Pod Destriptor File earlier"
Parker Berberian [Wed, 2 Jan 2019 14:38:04 +0000 (14:38 +0000)]
Merge "Renders Pod Destriptor File earlier"

5 years agoRenders Pod Destriptor File earlier 85/64885/3
Parker Berberian [Fri, 9 Nov 2018 16:10:03 +0000 (11:10 -0500)]
Renders Pod Destriptor File earlier

Currently, the PDF is rendered 'on-demand' every time you
visit the booking detail page. This change renders the pdf once
and saves it in the booking model. Advantages:
- saves computation of re-rendering pdf constantly
- fixes issue where pdf fails to render after booking expires

Change-Id: I58d20fadce088d78ebd22f1d6f67cab371823542
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoRemoved document.open() 31/66031/1
Parker Berberian [Fri, 21 Dec 2018 18:32:00 +0000 (13:32 -0500)]
Removed document.open()

Some versions of some browsers dont play nice with a document.open() and document.write(),
So I am manipulating the DOM manually instead of writing the response itself.

Change-Id: Ib852be55dfcb4e360a5cfd89e5e3e2b845d6322a
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoFixes creation of ssh access job 23/66023/1
Parker Berberian [Fri, 21 Dec 2018 15:55:13 +0000 (10:55 -0500)]
Fixes creation of ssh access job

Minor changes that allows the ssh job to be created.
Django model creation can become very complex when you
go beyond the model.object.create() method, and this
just fixes the order of operations.

Change-Id: I811f26149365067bdd15f2466f8ba9211c3ef901
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoMerge "Force Lab Selection on POD Creation"
Parker Berberian [Wed, 19 Dec 2018 14:50:26 +0000 (14:50 +0000)]
Merge "Force Lab Selection on POD Creation"

5 years agoAbstract Out Inline CSS for Account Views 73/65573/2
Sawyer Bergeron [Tue, 4 Dec 2018 20:30:42 +0000 (15:30 -0500)]
Abstract Out Inline CSS for Account Views

Change-Id: I2da02fa7865b618c583d15cca9ef256c62f19286
Signed-off-by: Sawyer Bergeron <sawyerbergeron@gmail.com>
5 years agoForce Lab Selection on POD Creation 49/65849/1
Parker Berberian [Fri, 14 Dec 2018 15:31:34 +0000 (10:31 -0500)]
Force Lab Selection on POD Creation

Currently, a user can leave the "Define Hardware" step without choosing
which lab thier pod should be at. This causes errors later in the
pod creation process.

This commit forces one lab to be selected before they can leave the first step.

Change-Id: I7315bc8781ebeb66bcd32fdba30535100b59a3ff
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoChecks Sub Project Leads 35/65835/1
Parker Berberian [Fri, 14 Dec 2018 14:29:25 +0000 (09:29 -0500)]
Checks Sub Project Leads

Fatih Pointed out to me the existence of ptl's of sub projects,
which show up differently in the INFO.yaml files.

This commit also adds support for gerrit.opnfv.org and git.opnfv.org links.
I don't remember why we were only accepting github links, but that seems strange.

Change-Id: Ica64c4ee7d5c0ce4fa6bfbcbabb1c4ca7cf06018
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoMerge "Add Nav Button Disabling Behavior"
Parker Berberian [Wed, 5 Dec 2018 16:13:13 +0000 (16:13 +0000)]
Merge "Add Nav Button Disabling Behavior"

5 years agoAdd Nav Button Disabling Behavior 71/65571/1
Sawyer Bergeron [Tue, 4 Dec 2018 19:01:41 +0000 (14:01 -0500)]
Add Nav Button Disabling Behavior

Change-Id: I81bb064d83e1dc6df8658cd4cfa2a400c7e723ca
Signed-off-by: Sawyer Bergeron <sawyerbergeron@gmail.com>
5 years agoMerge "Removed Vanilla Form Submission"
Parker Berberian [Mon, 3 Dec 2018 19:22:36 +0000 (19:22 +0000)]
Merge "Removed Vanilla Form Submission"

5 years agoBUG FIX: Properly decodes ssh public keyfile 45/65545/1
Parker Berberian [Mon, 3 Dec 2018 18:38:37 +0000 (13:38 -0500)]
BUG FIX: Properly decodes ssh public keyfile

Because of how Python3 changed how it handled strings,
the byte string read from the user's keyfile was not directly
serializable. This decodes the bytes into a unicode string, assuming UTF-8 encoding.

Change-Id: I5f723a61fb577fa6d4e76e701ef529521ab389ba
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoRemoved Vanilla Form Submission 69/65469/1
Parker Berberian [Wed, 28 Nov 2018 18:38:45 +0000 (13:38 -0500)]
Removed Vanilla Form Submission

On google chrome, using vanilla html forms, eg:
document.getElementById("Form_id").submit();
does not properly set the CSRF header from the cookies.
This results in 403 unauthorized errors in chrome when doing certain things.

This is possibly an issue to do with how chrome handles iframes differently from firefox.

To fix, we replaced basic forms with serialized XMLHttpRequests,
which are more common in this codebase anyway.

Change-Id: I93e92cd326c8bba47408b66a95d9d5d806c154f6
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoFixed Misc Bugs 95/65395/1
Parker Berberian [Tue, 20 Nov 2018 16:19:55 +0000 (11:19 -0500)]
Fixed Misc Bugs

Some corner cases that cause issues recently came to our attention.
Fixes issues in the booking workflow and the Notification system.

Change-Id: Ie16118ba1bdbeff86bb41a16dc783337b921d527
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoFix all flake8 errors 77/65277/2
Parker Berberian [Tue, 20 Nov 2018 16:19:55 +0000 (11:19 -0500)]
Fix all flake8 errors

The flake8 command in test.sh finds no longer finds any errors.
This may form a basis of a jenkins verify job as a sort of 'weak compile-time checks'

The flake8 command will not complain about line length, and will not complain about
django's manage.py file

Change-Id: Ic47cb4fc7ada55e64485661ab6881aef475018ff
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoMerge "Rewrite Notification subsystem"
Trevor Bramwell [Wed, 7 Nov 2018 22:05:28 +0000 (22:05 +0000)]
Merge "Rewrite Notification subsystem"

5 years agoRewrite Notification subsystem 67/63967/5
Parker Berberian [Wed, 24 Oct 2018 19:12:32 +0000 (15:12 -0400)]
Rewrite Notification subsystem

In this commit:
 - delete a lot of really bad and / or unused code
 - redesign a much simpler Notification model
 - create and send notifications to the user's inbox on booking start & end
 - migrations
 - emails user when booking is ready and when it ends

Not in this commit:
 - Creating notifications from lab messages
 - warning messages when a booking is about to end
 - creating "summary" notifications when e.g. a booking has been fulfilled by a lab

Change-Id: I69b4dc36c3f2bce76d810106baadeef5a562cc7d
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoMerge "Restrict Postgres to version 10"
Trevor Bramwell [Thu, 1 Nov 2018 23:18:47 +0000 (23:18 +0000)]
Merge "Restrict Postgres to version 10"

5 years agoMerge "Improved Collaborators UX"
Trevor Bramwell [Wed, 31 Oct 2018 21:35:30 +0000 (21:35 +0000)]
Merge "Improved Collaborators UX"

5 years agoMerge "Fixes for access creation and removal"
Trevor Bramwell [Wed, 31 Oct 2018 21:34:59 +0000 (21:34 +0000)]
Merge "Fixes for access creation and removal"

5 years agoMerge "Fixed Indentation"
Trevor Bramwell [Wed, 31 Oct 2018 21:34:13 +0000 (21:34 +0000)]
Merge "Fixed Indentation"

5 years agoMerge "Hides information about your booking from other users"
Trevor Bramwell [Wed, 31 Oct 2018 21:34:01 +0000 (21:34 +0000)]
Merge "Hides information about your booking from other users"

5 years agoMerge "Fix Booking List"
Trevor Bramwell [Wed, 31 Oct 2018 21:33:07 +0000 (21:33 +0000)]
Merge "Fix Booking List"

5 years agoFixed Indentation 45/64145/1
Parker Berberian [Mon, 29 Oct 2018 16:53:09 +0000 (12:53 -0400)]
Fixed Indentation

This is a pretty complex html file that we will have to modify soon,
so I made sure that every tag is opened and closed at the correct height.
The correct height for a tag is 4 spaces more indented than its parent

Change-Id: Ie356b61746477f65304f38c019f471e5cae1aa94
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoImproved Collaborators UX 87/64087/1
Parker Berberian [Fri, 26 Oct 2018 15:43:48 +0000 (11:43 -0400)]
Improved Collaborators UX

Some small improvements based on feedback from Trevor.
- Changed lable from "users" to "collaborators" to try and be more clear
- Do not show your own name in the dropdown by default
- You cannot select yourself as a collaborator

Change-Id: Ie2e9070232765ed9eabe6657924ed8addaa0165a
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoHides information about your booking from other users 75/64075/1
Parker Berberian [Fri, 26 Oct 2018 14:52:14 +0000 (10:52 -0400)]
Hides information about your booking from other users

If a user is not the owner or a collaborator on a booking,
they should be kept from seeing the booking detail page which may
contain credentials, etc from the lab fulfilling the booking.

Change-Id: I27c383a0e1d017b5d02a7c9a37676f6a968c9270
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoForces hostnames to not be empty 73/64073/1
Parker Berberian [Fri, 26 Oct 2018 14:41:44 +0000 (10:41 -0400)]
Forces hostnames to not be empty

Previously, when a host was 'added' but not given a hostname, it was
excluded from the list of hosts sent to the backend for processing.

By explicitly adding each host to the result, we avoid this and
force the checking of an empty hostname (which will correctly fail).

Change-Id: Ia533bc23baf558a5e297dab629dbf47fb4704d7f
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoRestrict Postgres to version 10 75/63975/1
Trevor Bramwell [Wed, 24 Oct 2018 22:36:59 +0000 (15:36 -0700)]
Restrict Postgres to version 10

Postgres 11 was just released and the images does not yet support
automatic data upgrades. Restricting it to 10 should keep users from
running into issues when using/testing the dashboard.

Change-Id: I7758cb01b5c6c0c75166536fc0d99277995d5da0
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
5 years agoFixes for access creation and removal 65/63965/1
Parker Berberian [Tue, 23 Oct 2018 20:11:36 +0000 (16:11 -0400)]
Fixes for access creation and removal

Fixes include:
 - creating ssh access jobs for users with ssh keys
 - ensuring vpn access is revoked after booking ends

Creates ssh access jobs with the user's ssh keys, if they exist

Change-Id: Ia2e9f0c5a2f90b45732a5767a62b87a5a5492b94
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
5 years agoFix Booking List 57/63957/1
Parker Berberian [Wed, 24 Oct 2018 14:04:41 +0000 (10:04 -0400)]
Fix Booking List

The table that lists all active bookings at /booking/list/
was using booking.user. This doesn't exist anymore, changed to booking.owner

Change-Id: I76c8d498f4dbe64d88c4c6f7b5e380559b125e44
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
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 23/63923/1
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 77/63877/1
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 77/63777/1
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 73/63673/1
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 71/63671/2
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 67/63667/1
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 65/63665/1
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 35/63535/1
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 85/63385/7
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 19/63219/3
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 23/63223/1
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 81/63081/1
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 79/63079/1
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 25/60025/1
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 97/54497/3
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 71/53171/3
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 87/52687/2
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" stable/fraser
Parker Berberian [Wed, 28 Feb 2018 15:05:26 +0000 (15:05 +0000)]
Merge "Allow Configuring 'DEFAULT_EMAIL_FROM' in Django"