aboutsummaryrefslogtreecommitdiffstats
path: root/src/api
AgeCommit message (Collapse)AuthorFilesLines
2020-12-10Fix job serialization error for specific_job2.1.0-rc32.1.0Sawyer Bergeron1-0/+3
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu> Change-Id: I8c49e33a33389cf362ff680735f6e538162a5414
2020-11-09Analytics changesSean Smith4-2/+153
Signed-off-by: Sean Smith <ssmith@iol.unh.edu> Change-Id: Iaea350b3042f9c866939a9d1a79bdef1e165c1a7 Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
2020-11-09Add migrations for pulling prod to current masterSawyer Bergeron1-0/+18
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu> Change-Id: I4f11316b161e6e04e1e5cb811482adc22e3e69f3
2020-07-31Merge "Fix Pod detail menu and re-imaging"Sawyer Bergeron1-3/+3
2020-07-31Fix Pod detail menu and re-imagingSean Smith1-3/+3
Signed-off-by: Sean Smith <ssmith@iol.unh.edu> Change-Id: I483c9e9c6dc8d492cc9340ab42b6b2d518f52950
2020-07-30Hotfix: disable deltas for prodSawyer Bergeron1-17/+4
Deltas are currently severely broken, and need to be turned into more granular tasks instead. This patch results in coarser tasks, but results in correct behavior at least Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu> Change-Id: Idd71b314355a1372e68e1f1161355bd4b8834c08
2020-07-30Fix clearing interface config on job endSawyer Bergeron1-4/+5
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu> Change-Id: Ia38de492c01de66a14f6966fcf35db5e51f007c5
2020-07-28Fixes for prod deploySawyer Bergeron1-1/+1
broken configstate causes hosts not to power on when they should vlan manager needs to actually return allocated vlans Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu> Change-Id: I1060a6599fb44bd2ca239d35fbf7e69d13f499a6
2020-07-27Merge "Fix Flake8 Violations"Sawyer Bergeron2-1/+3
2020-07-23Fixes get_user for api.Sean Smith1-7/+9
Change-Id: I2111c8dc3a66dc1e6d4b8ccab53d4a14acafd913 Signed-off-by: Sean Smith <ssmith@iol.unh.edu>
2020-07-15Fix Flake8 ViolationsTrevor Bramwell3-7/+9
Several minor issues found through flake8 should now be fixed in the code. Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org> Change-Id: I4f6e5dac5ed8378911598ded714602bbb3f6bd6b
2020-05-15Merge resource branchSawyer Bergeron1-1/+1
This pulls master up to date to include changes to models and surrounding infra that allow for multi-node templates and merging of pods Squashed commit of the following: commit abc8f27d9c6b05fb3afcb9b00dc35c0f2232d1a6 Author: Sawyer Bergeron <sawyerbergeron@gmail.com> Date: Thu Apr 2 14:05:26 2020 -0400 Start fixing workflow for model changes Change-Id: I79df975ef45abf2e6e69594d358bbd205938828f Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.com> Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu> commit 7a7e2182acd0ea94e19aba4926c3a12771b30a6d Author: sms1097 <ssmith@iol.unh.edu> Date: Tue Mar 31 15:13:06 2020 -0400 Working on workflow refactoring Change-Id: I4141b6aca98aff7bff9cb78a7d5594e25eb45e98 Signed-off-by: Sean Smith <ssmith@iol.unh.edu> commit c09050ae2814f07af58557b40f9ed3559063d2c7 Merge: 71438d9 b5ccdc4 Author: Parker Berberian <pberberian@iol.unh.edu> Date: Tue Mar 24 20:34:16 2020 +0000 Merge "Able to delete configurations and view lab details" into resource commit b5ccdc4ffbb883c20f2f6f69aeef5002aef5db53 Author: sms1097 <ssmith@iol.unh.edu> Date: Thu Mar 19 17:08:12 2020 -0400 Able to delete configurations and view lab details Change-Id: Ib15c86d84f4cc7e7745551889ce91c89b5de46e2 Signed-off-by: Sean Smith <ssmith@iol.unh.edu> Change-Id: Id6748c6bea67773a861921394d88579730246598 commit 71438d9a35cdb316cece865c9d410aeffb0053d8 Merge: 5460d0d a758223 Author: Parker Berberian <pberberian@iol.unh.edu> Date: Thu Mar 19 18:51:09 2020 +0000 Merge "Add / Fix tests for refactor" into resource commit 5460d0d447b075433a763f9bfa33448b88ec8393 Merge: a9063a3 f55d839 Author: Parker Berberian <pberberian@iol.unh.edu> Date: Wed Mar 18 15:59:37 2020 +0000 Merge "Fixed the quick booking form resource template filtering. Added some more models to the admin page." into resource commit f55d839a029ab1f5ab1273872e71a97fa1d5108b Author: Adam Hassick <ahassick@iol.unh.edu> Date: Tue Mar 17 11:35:40 2020 -0400 Fixed the quick booking form resource template filtering. Added some more models to the admin page. Signed-off-by: Adam Hassick <ahassick@iol.unh.edu> Change-Id: I2d2e7aeb96b10c231804a62f37a476039c954b7b commit a9063a347c4ebef0e53a17f198468bb135772810 Author: Parker Berberian <pberberian@iol.unh.edu> Date: Wed Mar 18 10:29:51 2020 -0400 Fixes Some Issues with Quick Booking Seen in the Akraino lab Signed-off-by: Parker Berberian <pberberian@iol.unh.edu> Change-Id: I2a1e843fbaa7984225f2f80742dad59dc348fbf2 commit a758223f44c6fec595b055d7c9b232b00e9174a0 Author: Parker Berberian <pberberian@iol.unh.edu> Date: Tue Mar 17 11:07:32 2020 -0400 Add / Fix tests for refactor Change-Id: I0526d1942f87707082a4eb1c8c98910f84481c23 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu> Author: Parker Berberian <pberberian@iol.unh.edu> Add "Pod" Column to booking list Signed-off-by: Parker Berberian <pberberian@iol.unh.edu> Change-Id: I270913283bf1e5815cadf622ba2fd5f98bb61675 Author: Parker Berberian <pberberian@iol.unh.edu> Fixes that make the Akraino dashboard work Signed-off-by: Parker Berberian <pberberian@iol.unh.edu> Change-Id: I81746473a4511ef7d46445a7b16809a6e9da100f Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu> Change-Id: I4b428e7c8a8d401d7bae95cba01077feb0332a7f Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
2020-04-14Add user + user list to APISawyer Bergeron3-1/+35
Change-Id: I15cf0c33b9d452fda47f97e3d9b43e00c1bf9bfd Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
2020-03-17Merge "Quick Deploy Fixes." into resourceSawyer Bergeron1-7/+13
2020-03-17Quick Deploy Fixes.Parker Berberian1-7/+13
Change-Id: I46d410af62e4962d235346ba56472aaacb9d3ff2 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2020-03-16Fix Query in api MakeHardwareConfigParker Berberian1-1/+1
Change-Id: I9ced78e73f49343bcb41b8e0de25d8b0223b14bd Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2020-02-27Improve Data MigrationParker Berberian4-26/+52
Improved migration files so that they preserve data Change-Id: I53283fd3fd207ed3f9773beea7b1ce2062b5bd9f Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2020-02-20Add Migration FilesParker Berberian2-0/+72
Adds migration files with some custom logic to accompany the refactoring in resource_inventory. Change-Id: Id3b3e46913c1f9a102426a5c33d7a282f46e8b28 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2020-02-13Fix ImportsParker Berberian1-2/+2
Fixes stale import statements. The dashboard can now come up and we can run our unit tests Change-Id: I7189afb2cd37aaa2492de065c236b6aa9a35de5b Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2020-02-12Modifies Resource Models for ongoing refactorParker Berberian1-79/+106
Change-Id: Ice88f53135f57aca8e2de4d69274e7d490f981a4 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2020-01-28Comments and DocumentationParker Berberian5-28/+86
This change adds a ton of comments and documentation across all the code. Change-Id: Ifee0a2f534e8584f14b0f13af4dda8dc70eb7553 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2020-01-28Begin Resource RefactorParker Berberian3-112/+83
Begins the Resource Refactor by creating new interfaces to the resources through a Resource super class and using that new interface in the api Change-Id: I15a8179bfe915d2cde6d658d056e11cbd2c70e43 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2019-10-08Rename pharos to laasAric Gardner1-1/+1
related to change: https://gerrit.opnfv.org/gerrit/c/releng/+/68161 Signed-off-by: Aric Gardner <agardner@linuxfoundation.org> Change-Id: I4985eb116fd2c214f3639eb991f27b5d75b5ab7c Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2019-08-13Adds Downtime AwarenessParker Berberian4-0/+88
This adds a Downtime model and relevant operations so that the dashboard knows when a lab is down for maintenance and can act accordingly. This change doesn't modify the front end at all, but it does pass relevant downtime info to the templates so that they can be updated in a future change. Change-Id: Idb88b15838b949f352f11a31a1fce9749d283d28 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2019-07-08Update DependenciesParker Berberian1-9/+1
Removes or upgrades the dependencies in requirements.txt Change-Id: I4e66348fc80259b4a2f64ca912556f7d847f0645 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2019-06-05Adds TestsParker Berberian2-12/+54
Adds more complete tests and fixes some bugs found in those tests Change-Id: Icc0433215df511bc0b2bfa264bacf8796d6de86f Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2019-05-24Add and Fix testsParker Berberian1-153/+102
Makes the existing code less terrible and adds more unit tests Change-Id: Ia3662323eb22ed238829418869ff0363f00337ef Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2019-05-08Adds pdf and idf into apiParker Berberian6-6/+171
The Pod Descriptor File (pdf) and Installer descriptor file (idf) are now hosted in the api. The url endpoint where the lab can retrieve them are now part of a software task. An OPNFV task also contains a new dictionary that describes how bridges should be configured on the jumphost. This information is not contained in the pdf/idf but is needed by the lab. Change-Id: I6971279979ba180725926035bd9db481aafb1073 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2019-05-03Merge "Implement OPNFV workflow"Parker Berberian2-27/+47
2019-05-03Implement OPNFV workflowSawyer Bergeron2-27/+47
This is a counterpart to an update to network models, and allows for configuring baremetal OPNFV and Openstack deploys Change-Id: I0185dbfa6c9105d7e63a7e7d7dd1f5cf228a8877 Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu> Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2019-04-29Fix change/reset image with multiple collaboratorsSawyer Bergeron1-5/+3
When a host on a booking with multiple collaborators has its image reset/changed, a 500 error is no longer returned Change-Id: Icafdf53059f35c838e0de675da6a8b8bffffe58a Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
2019-04-17Fixes the idf and pdf templates so that we can deploy opnfvParker Berberian1-0/+9
Change-Id: I0091629f8f0af423210b2e81210d65239e9662b4 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2019-03-14Respects lab_token from labParker Berberian1-0/+2
Change-Id: I322f876a21d25dc185a6f4930d2f2a5f463e2d24 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2019-03-14Add API testsSawyer Bergeron1-0/+278
Change-Id: Ic26d0b6de63405d239a9260b862158962c3140ac Signed-off-by: Sawyer Bergeron <sawyerbergeron@gmail.com>
2019-03-13Fix mismatched charfield max_lengthsSawyer Bergeron2-2/+25
Change-Id: I960710d800b614f93d06f5b0aff81d8b9508d5dd Signed-off-by: Sawyer Bergeron <sawyerbergeron@gmail.com>
2019-03-12Allow labs to retirieve and update some host information in the apiParker Berberian3-0/+30
Change-Id: Ib0682141351f7789c50d98a992ab166c2f033f4b Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2019-03-01Merge "Add test utils and tests for quick booking"Parker Berberian1-229/+0
2019-03-01Add test utils and tests for quick bookingSawyer Bergeron1-229/+0
Change-Id: Ie76c6fe26622ca8363055b8ebbe0dc6deaed5824 Signed-off-by: Sawyer Bergeron <sawyerbergeron@gmail.com> Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2019-02-27Update IPMI handlingParker Berberian3-1/+42
provides a way for the lab to report IPMI info to the dashboard. Necessary to allow the dashboard to fully generate a PDF for OPNFV deploy Change-Id: Ieef7a93e28b155ee90f3ffd3cfeedace332a6641 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2019-02-12Fixed all Flake8 errorsParker Berberian1-6/+6
Change-Id: I1186429df8989461e2384f1f3e533c55cebfb1b4 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2019-01-23Fix Reimaging HostsParker Berberian1-1/+28
When a User wants to reimage a host, the dashboard needs to also refresh the network and ssh configurations. Otherwise a host is reimaged and becomes unreachable. Change-Id: I534f200498c9217bda81190861021c482e052a81 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2019-01-18OverHaul the Snapshot WorkflowParker Berberian3-1/+162
Makes the Snapshot workflow much prettier and more functional. Change-Id: Icdd66f64e6d336ad49ed3cf638a301d0ca92fda9 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2019-01-04Fix API serializationParker Berberian1-1/+4
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>
2019-01-02Added missing migration fileParker Berberian1-0/+18
Change-Id: I7582360e3e5522cf06798200f80e5585864e945e Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
2018-12-21Fixes creation of ssh access jobParker Berberian1-3/+3
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>
2018-12-03BUG FIX: Properly decodes ssh public keyfileParker Berberian2-1/+3
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>
2018-11-26Fix all flake8 errorsParker Berberian8-99/+169
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>
2018-11-07Merge "Rewrite Notification subsystem"Trevor Bramwell4-15/+15
2018-11-07Rewrite Notification subsystemParker Berberian4-15/+15
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>
2018-10-24Fixes for access creation and removalParker Berberian1-14/+23
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>