Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 58a5ed7f authored by Jonathan Pastor's avatar Jonathan Pastor
Browse files

[oar generator] fix the URL for the jenkin test

parent 0dcb12f0
Branches
No related tags found
No related merge requests found
Pipeline #107297 passed
...@@ -598,10 +598,19 @@ end ...@@ -598,10 +598,19 @@ end
# Get all data from the OAR database # Get all data from the OAR database
def get_oar_data(site_uid, options) def get_oar_data(site_uid, options)
if options[:api][:uri] and not options[:api][:uri].include? "api.grid5000.fr"
api_uri = URI.parse(options[:api][:uri]+'/oarapi/resources/details.json?limit=999999') # If no API URL is given, set a default URL on https://api.grid5000.fr
else if not options[:api][:uri]
options[:api][:uri] = "https://api.grid5000.fr"
end
# Preparing the URL that will be used to fetch OAR resources
if options[:api][:uri].include? "api.grid5000.fr"
api_uri = URI.parse('https://api.grid5000.fr/stable/sites/' + site_uid + '/internal/oarapi/resources/details.json?limit=999999') api_uri = URI.parse('https://api.grid5000.fr/stable/sites/' + site_uid + '/internal/oarapi/resources/details.json?limit=999999')
elsif options[:api][:uri].include? "api-ext.grid5000.fr"
api_uri = URI.parse('https://api-ext.grid5000.fr/stable/sites/' + site_uid + '/internal/oarapi/resources/details.json?limit=999999')
else
api_uri = URI.parse(options[:api][:uri]+'/oarapi/resources/details.json?limit=999999')
end end
# Download the OAR properties from the OAR API (through G5K API) # Download the OAR properties from the OAR API (through G5K API)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment