Go back to disallowing internet access in fake-juju.
Bug #1639276 reported by
Eric Snow
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fake Juju |
Triaged
|
Medium
|
Unassigned |
Bug Description
Some functionality in Juju (as exposed by fake-juju) requires internet access. The most significant case for fake-juju is downloading charms from the charm store. However, JujuConnSuite (the basis for fake-juju's daemon) disables internet access. As a short term fix to this conflict, we've reversed that restriction. However, the problem should be solved in some other way and then the restriction should be put back in place.
To post a comment you must log in.
One notable characteristic of Juju is that it does not try to download a charm if the charm is already in the controller's database. This presents several options for avoiding download attempts:
* Use the API's "upload charm" HTTP endpoint (POST on <UUID>/ charms) . [1] See: client/ client. go application/ charmstore. go
/model/
- apiserver/charms.go
- apiserver/
- apiserver/
- api/client.go
This could be accomplished (with some auth complexity) using:
- txjuju
- python-jujuclient,
- manually with httplib
* add the service with a "local" charm schema and then forcibly
change the charm's schema to "cs" in the DB
Other possible solutions:
* use a fake charm store API
* add an "upload-charm" command to fake-juju that forces a
charm into the DB
[1] This requires disabling the prohibition against uploading charms. go. Currently
charmstore charms found in apiserver/
this already done in fake-juju.