File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,6 +41,16 @@ async def is_subordinate(self, charm_name):
4141 # TODO (caner) : we should be able to recreate the channel-map through the
4242 # api call without needing the CharmHub facade
4343
44+ async def list_resources (self , charm_name ):
45+ conn , headers , path_prefix = self .model .connection ().https_connection ()
46+
47+ model_conf = await self .model .get_config ()
48+ charmhub_url = model_conf ['charmhub-url' ]
49+ url = "{}/v2/charms/info/{}?fields=default-release.resources" .format (charmhub_url .value , charm_name )
50+ _response = self .request_charmhub_with_retry (url , 5 )
51+ response = json .loads (_response .text )
52+ return response ['default-release' ]['resources' ]
53+
4454 async def info (self , name , channel = None ):
4555 """info displays detailed information about a CharmHub charm. The charm
4656 can be specified by the exact name.
You can’t perform that action at this time.
0 commit comments