Comment 1 for bug 1639276

Revision history for this message
Eric Snow (ericsnowcurrently) wrote :

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
  /model/<UUID>/charms). [1] See:
    - apiserver/charms.go
    - apiserver/client/client.go
    - apiserver/application/charmstore.go
    - 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
    charmstore charms found in apiserver/charms.go. Currently
    this already done in fake-juju.