166 + attributes = json.loads(body)
167 + anon_url = attributes.get('anon_url')
168 + if anon_url is None:
169 + # MAAS doesn't provide an anonymous download URL. Generate it
170 + # the old way. If the file was uploaded by a legacy provider,
171 + # MAAS will honour this legacy URL.
172 + returnValue(compose_legacy_file_url(self._base_url, name))
173 + else:
174 + # Success. Return the anonymous file download URL that MAAS
175 + # sent us.
176 + returnValue(anon_url)
With that change, I was able to successfully deploy bootrap an environment and deploy a mysql and a mediawiki charms. But look at the record of the calls to the file storage API endpoint: https://pastebin.canonical.com/85392/. Line 13 and 27, you can see the bootstrap node still using the old version of the anonymous urls. Note that the nodes themselves use the new version of the anonymous urls.
[1]
166 + attributes = json.loads(body) get('anon_ url') compose_ legacy_ file_url( self._base_ url, name)) anon_url)
167 + anon_url = attributes.
168 + if anon_url is None:
169 + # MAAS doesn't provide an anonymous download URL. Generate it
170 + # the old way. If the file was uploaded by a legacy provider,
171 + # MAAS will honour this legacy URL.
172 + returnValue(
173 + else:
174 + # Success. Return the anonymous file download URL that MAAS
175 + # sent us.
176 + returnValue(
The 'anon_url' does not include the host part (see the discussion on bug 1131692). You need to change that part to something along the lines of https:/ /pastebin. canonical. com/85388/ plus s/anon_ url/anon_ resource_ uri/ (to account for the fix I just committed in lp:~rvb/maas/bug-1123986-key-api).
[2]
With that change, I was able to successfully deploy bootrap an environment and deploy a mysql and a mediawiki charms. But look at the record of the calls to the file storage API endpoint: https:/ /pastebin. canonical. com/85392/. Line 13 and 27, you can see the bootstrap node still using the old version of the anonymous urls. Note that the nodes themselves use the new version of the anonymous urls.