Re: grabbing resources when deploying via api Application.Deploy

2016-06-29 Thread Adam Stokes
There is also a open bug about the inconsistency between the 'resources'
facade and all other facades

https://launchpad.net/bugs/1597519

On Wed, Jun 29, 2016 at 4:56 PM, Katherine Cox-Buday <
katherine.cox-bu...@canonical.com> wrote:

>
> So just to follow up on our conversation in IRC:
>
> - You do need to upload resource metadata prior to deploying a charm. You
> can do so via the "resources" facade, version 1. Call "AddPendingResources".
> - This will give you a list of IDs back; associate these in a map of
> resource-name -> id, and include those in the deploy request.
>
> Hope this helps anyone else trying to use the resources feature
> programatically.
>
> Adam Stokes  writes:
>
> > I've noticed a difference between calling:
> >
> > juju deploy cs:~containers/trusty/etcd-3
> >
> > And using the API:
> >
> > Application.Deploy({'applications': [{'constraints': {},
> > 'application': 'etcd', 'num-units': 3, 'charm-url':
> > 'cs:~containers/trusty/etcd-3'}]})
> >
> > Using the juju client it'll automatically pull down the resources
> > associated with it in the charmstore. Using the API call will not.
> >
> > Question is if this is intended? Do I need to pass something to my
> > Deploy call to grab those resources as well?
>
> --
> Katherine
>
-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev


Re: grabbing resources when deploying via api Application.Deploy

2016-06-29 Thread Katherine Cox-Buday

So just to follow up on our conversation in IRC:

- You do need to upload resource metadata prior to deploying a charm. You can 
do so via the "resources" facade, version 1. Call "AddPendingResources".
- This will give you a list of IDs back; associate these in a map of 
resource-name -> id, and include those in the deploy request.

Hope this helps anyone else trying to use the resources feature programatically.

Adam Stokes  writes:

> I've noticed a difference between calling:
>
> juju deploy cs:~containers/trusty/etcd-3
>
> And using the API:
>
> Application.Deploy({'applications': [{'constraints': {},
> 'application': 'etcd', 'num-units': 3, 'charm-url':
> 'cs:~containers/trusty/etcd-3'}]})
>
> Using the juju client it'll automatically pull down the resources
> associated with it in the charmstore. Using the API call will not.
>
> Question is if this is intended? Do I need to pass something to my
> Deploy call to grab those resources as well?

-- 
Katherine

-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev