Calling model.consume as shown below causes an error.
await model.consume(
f"admin/{k8s_model.name}.grafana-dashboards",
application_alias="grafana",
controller_name=k8s_ctl.controller_name,
)
The error looks like this:
FAILED ... - juju.errors.JujuError: ['application offer "admin/current-model.grafana-dashboards" not found']
where, current-model is the model name, and grafana-dashboards offer is exposed.
As a workaround, using juju CLI works ie. the following works fine
cmd = [
"juju",
"consume",
"--model",
f"current-controller:current-model",
f"{k8s_ctl.controller_name}:admin/{k8s_model.name}.grafana-dashboards",
]
subprocess.run(cmd, check=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
The name of the model is the same in both controllers.
python-libjuju version is 3.3.1.1
Calling
model.consumeas shown below causes an error.The error looks like this:
where,
current-modelis the model name, andgrafana-dashboardsoffer is exposed.As a workaround, using juju CLI works ie. the following works fine
The name of the model is the same in both controllers.
python-libjuju version is
3.3.1.1