Commit Graph

13 Commits

Author SHA1 Message Date
Jeff Mitchell 13dab7dd24
Divest api/ package of deps elsewhere in the nomad repo. (#5488)
* Divest api/ package of deps elsewhere in the nomad repo.

This will allow making api/ a module without then pulling in the
external repo, leading to a package name conflict.

This required some migration of tests to an apitests/ folder (can be
moved anywhere as it has no deps on it). It also required some
duplication of code, notably some test helpers from api/ -> apitests/
and part (but not all) of testutil/ -> api/testutil/.

Once there's more separation and an e.g. sdk/ folder those can be
removed in favor of a dep on the sdk/ folder, provided the sdk/ folder
doesn't depend on api/ or /.

* Also remove consul dep from api/ package

* Fix stupid linters

* Some restructuring
2019-03-29 14:47:40 -04:00
Mahmood Ali b768b31e3e api: embed pointer conversion functions
Embed pointer conversion functions in the API package to avoid
unnecessary package dependency.  `helper` package imports more
dependencies relevant for internal use (e.g. `hcl`).
2019-01-18 15:31:04 -05:00
Michael Schurter 2832853bfa Add DesiredTransition.ShouldMigrate to api pkg 2018-03-21 16:51:45 -07:00
Preetha Appan 5714a6b8bf
Add method on API alloc to calculate attempted and remaining reschedule events 2018-01-31 09:58:05 -06:00
Alex Dadgar 4173834231 Enable more linters 2017-09-26 15:26:33 -07:00
Alex Dadgar 789751d84e Parallel 2017-07-21 16:33:04 -07:00
Alex Dadgar 5be806a3df Fix vet script and fix vet problems
This PR fixes our vet script and fixes all the missed vet changes.

It also fixes pointers being printed in `nomad stop <job>` and `nomad
node-status <node>`.
2017-02-27 16:00:19 -08:00
Diptanu Choudhury 7567209857 Making the job spec return api.Job 2017-02-16 13:52:39 -08:00
Ivo Verberk 0c01ca49e6 Refactoring continued
* Refactor other cli commands to new design
* Add PrefixList method to api package
* Add more tests
2015-12-24 20:53:37 +01:00
Ryan Uber 61b8249d08 api: sort all list responses 2015-09-17 13:10:20 -07:00
Ryan Uber 7926aed642 api: more tests for jobs 2015-09-09 17:29:43 -07:00
Ryan Uber a807612091 api: allow query options everywhere 2015-09-09 13:18:50 -07:00
Ryan Uber 05cd0b7990 api: look up allocations by job ID 2015-09-08 17:52:47 -07:00
Renamed from api/allocs_test.go (Browse further)