Open AlbertDeFusco opened 4 years ago
Updated
/opt/anaconda/storage/object/anaconda-objects/global
/opt/anaconda/storage/object/anaconda-objects/global
directoryhttps://<domain>/platform/storage/api/v1/global/objects/<filename>
With ae5-tools you will need to login as an ae-admin
user.
from ae5_tools.api import AEUserSession
import json
DOMAIN = '<your ae5 hostname>'
FILENAME = '<file name of project uploaded to master node>'
ae5 = AEUserSession(DOMAIN, 'anaconda-enterprise', 'anaconda-enterprise')
download_url = f'https://{DOMAIN}/platform/storage/api/v1/global/objects/{FILENAME}'
new_sample_project = {}
new_sample_project['id'] = '<short-name-for-project>'
new_sample_project['name'] = '<full-name-for-project>'
new_sample_project['description'] = '<project-description>'
new_sample_project['owner'] = 'anaconda-enterprise'
new_sample_project['download_url'] = download_url
new_sample_project['is_template'] = False # set to True to add to Create Project list
ae5._post('sample_projects', data=json.dumps(new_sample_project))
Here's the current known procedure to promote a project to the sample gallery.