Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nomad-FAIR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nomad-lab
nomad-FAIR
Commits
4842c5b4
Commit
4842c5b4
authored
5 years ago
by
Markus Scheidgen
Browse files
Options
Downloads
Patches
Plain Diff
Provide upload command as http.
parent
4390f471
No related branches found
No related tags found
1 merge request
!53
Merge for v0.5.2 release
Pipeline
#54095
passed
5 years ago
Stage: build
Stage: test
Stage: release
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
nomad/api/upload.py
+1
-1
1 addition, 1 deletion
nomad/api/upload.py
nomad/config.py
+3
-4
3 additions, 4 deletions
nomad/config.py
with
4 additions
and
5 deletions
nomad/api/upload.py
+
1
−
1
View file @
4842c5b4
...
@@ -528,7 +528,7 @@ class UploadCommandResource(Resource):
...
@@ -528,7 +528,7 @@ class UploadCommandResource(Resource):
@login_really_required
@login_really_required
def
get
(
self
):
def
get
(
self
):
"""
Get url and example command for shell based uploads.
"""
"""
Get url and example command for shell based uploads.
"""
upload_url
=
'
%s/uploads/?curl=True
'
%
config
.
api_url
()
upload_url
=
'
%s/uploads/?curl=True
'
%
config
.
api_url
(
ssl
=
False
)
upload_url_with_name
=
upload_url
+
'
&name=<name>
'
upload_url_with_name
=
upload_url
+
'
&name=<name>
'
# upload_command = 'curl -X PUT -H "X-Token: %s" "%s" -F file=@<local_file>' % (
# upload_command = 'curl -X PUT -H "X-Token: %s" "%s" -F file=@<local_file>' % (
...
...
This diff is collapsed.
Click to expand it.
nomad/config.py
+
3
−
4
View file @
4842c5b4
...
@@ -156,11 +156,10 @@ tests = NomadConfig(
...
@@ -156,11 +156,10 @@ tests = NomadConfig(
)
)
def
api_url
():
def
api_url
(
ssl
:
bool
=
True
):
return
'
%s://%s%s
%s
'
%
(
return
'
%s://%s%s
'
%
(
'
https
'
if
services
.
https
else
'
http
'
,
'
https
'
if
services
.
https
and
ssl
else
'
http
'
,
services
.
api_host
,
services
.
api_host
,
'
:%s
'
%
services
.
api_port
if
int
(
services
.
api_port
)
!=
80
else
''
,
services
.
api_base_path
)
services
.
api_base_path
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment