calm-dsl
calm-dsl copied to clipboard
Errors when working with endpoint targets in blueprint tasks
I have a blueprint which is targeting an existing endpoint in a pre-create task. When I decompile that blueprint using calm-dsl, it targets the substrate instead of the existing endpoint.
In a blueprint, if I use syntax like:
target_endpoint=Endpoint.use_existing(CALM_UTILITY_ENDPOINT),
in the blueprint.py file in the pre_create action definition and I then try to create the blueprint with calm create bp
, I get the following error:
[ERROR] [calm.dsl.builtins.models.runbook:134] type object '_Endpointbcec9383' has no attribute 'use_existing'
This is using calm.dsl==3.0.0a0 (latest available as of today afaik)
I was missing the following import statement for the calm create error:
from calm.dsl.runbooks import CalmEndpoint as Endpoint
The decompile error/issue is still accurate and needs to be resolved.
Issue is fixed in DSL v3.7.2.2 release, Hence closing it.