Commit Graph

38 Commits

Author SHA1 Message Date
Josh Soref
bd0c48f155 spelling: configurations 2018-03-11 17:47:24 +00:00
Alex Dadgar
dab5dc70e1 allow setting timeout on any api config 2018-02-15 13:59:03 -08:00
Alex Dadgar
4f2725bb98 Enhance API pkg to utilize Server's Client Tunnel
This PR enhances the API package by having client only RPCs route
through the server when they are low cost and for filesystem access to
first attempt a direct connection to the node and then falling back to
a server routed request.
2018-02-15 13:59:03 -08:00
Michael Schurter
fae8e7f699 SecretID -> AuthToken 2017-10-12 15:16:33 -07:00
Alex Dadgar
2c4c6b6ff6 Nomad UI Command 2017-10-09 23:01:55 -07:00
Alex Dadgar
de870afdd5 sync acls 2017-09-13 11:38:29 -07:00
Alex Dadgar
ac1539d5d9 Sync namespace changes 2017-09-07 17:04:21 -07:00
Armon Dadgar
425f0514a6 api: Fixing double region merge conflict 2017-09-04 13:20:51 -07:00
Armon Dadgar
d3a3575898 api: Adding support for ACL tokens 2017-09-04 13:09:34 -07:00
Armon Dadgar
e24fa79aab agent: thread ACLs for Job Register 2017-09-04 13:05:53 -07:00
Alex Dadgar
d759dc8100 Address feedback 2017-08-29 16:09:53 -07:00
Alex Dadgar
f5fb62c7cc Node Client doesn't share HTTP client 2017-08-29 14:22:11 -07:00
Alex Dadgar
4d3b75d867 Fix TLSServerName for Node API Client
This PR fixes the construction of the TLSServerName when connecting to a
node that has TLS enabled and adds tests for all possible permutations.

Fixes https://github.com/hashicorp/nomad/issues/3013
2017-08-29 11:11:19 -07:00
Michael Schurter
52857a6a9d Simplify region handling 2017-08-28 14:58:15 -07:00
Michael Schurter
2f30827205 Refactor GetNodeClient weirdness
- No need to for a pointer to a pointer
- Properly set and use QueryOptions.Region
2017-08-28 14:41:21 -07:00
Michael Schurter
1bb8a54ffb Fix TLS support in api pkg / cli
Fixes #3013

It's a little weird that Client now has a method for returning a
NewClient, but it's a convenient way to dedupe the logic to
connect-directly-to-a-node which is nontrivial and had sutble
differences between locations.
2017-08-28 11:46:28 -07:00
Alex Dadgar
4d97b302a0 Search respects QueryOptions and returns QueryMeta
@chelseakomlo heads up on this change
2017-08-27 22:17:51 -07:00
Ben Barnard
ce1fa4651a Remove duplicate check 2017-03-08 16:19:38 +01:00
Michael Schurter
2b7e091424 Fix API panic and bad missing port check
The format of the missing port error message changed from Go 1.7 to 1.8.
The fix is to just use strings.Contains instead of strings.HasPrefix
when looking for the "missing port" part.

Also add an error return to Client.newRequest as parsing the path
processes arbitrary user input and would panic if given an invalid URL.

See: https://groups.google.com/d/topic/nomad-tool/gi3-CTE7oXo/discussion
2017-02-20 11:12:34 -08:00
Diptanu Choudhury
a829e46c55 Remove timeout 2016-11-04 15:06:21 -07:00
Diptanu Choudhury
722433b4f9 Making the cli use TLS if the client has enabled TLS 2016-10-26 11:13:53 -07:00
Diptanu Choudhury
0e6e5b3e7b Enabling TLS on cli 2016-10-25 10:39:17 -07:00
Kyle Havlovitz
145312c3ac Added NOMAD_HTTP_AUTH env var for basic auth 2016-08-17 15:13:35 -04:00
Alex Dadgar
fdaf530813 api.fs uses the api.Client rather than making raw requests 2016-07-28 14:27:17 -07:00
Mathias Lafeldt
a61494166b Add HTTP basic auth support to Nomad client code
In order to authenticate against protected endpoints, e.g.

```
export NOMAD_ADDR=https://$USER:$PASSWORD@nomad.example.net
nomad status
```

Instead of adding username and password to `api.Config`, this is a
rather simple change to the request handler code that passes along any
basic auth information.
2016-07-18 15:34:34 +02:00
Alex Dadgar
cc80c2442f Run and plan automatically sets the region 2016-06-07 11:28:07 -07:00
Alex Dadgar
ef77f58947 nil protection 2016-05-24 11:18:32 -07:00
Alex Dadgar
05ea2bd583 Compress HTTP API responses and have the api client utilize this 2016-05-24 10:26:53 -07:00
Sean Chittenden
29be52f762 Speling police 2016-05-15 09:41:34 -07:00
Alex Dadgar
20a009e180 Make inspect output submittable 2016-04-13 16:53:39 -07:00
Alex Dadgar
52347d42f9 Add nomad inspect command 2016-03-21 12:46:35 -07:00
Ivo Verberk
e89b5af338 Refactoring
* Reverted changes to get methods
* Added prefix query parameter
* Updated node status to use prefix based searching
* Fixed tests
* Removed truncation logic
2015-12-22 23:44:33 +01:00
Jeff Mitchell
b13df73ee8 Update the location of cleanhttp 2015-10-22 14:21:07 -04:00
Jeff Mitchell
b0aac09da8 Use cleanhttp for truly clean clients and transports. 2015-10-22 10:58:23 -04:00
Jeff Mitchell
38db63f7f4 Remove usage of http.DefaultClient 2015-10-16 16:56:43 -04:00
Ryan Uber
7e26f938a2 command: use meta struct for common options 2015-09-14 13:24:03 -07:00
Ryan Uber
e2e1e4c3fb api: allow query parameters in query/write/delete 2015-09-08 14:26:26 -07:00
Armon Dadgar
ddf83409f1 api: Adding basic skeleton 2015-09-06 13:29:51 -07:00