calm-dsl icon indicating copy to clipboard operation
calm-dsl copied to clipboard

Errors when working with endpoint targets in blueprint tasks

Open nx-sbourdeaud opened this issue 3 years ago • 1 comments

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)

nx-sbourdeaud avatar May 25 '21 16:05 nx-sbourdeaud

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.

nx-sbourdeaud avatar May 25 '21 16:05 nx-sbourdeaud

Issue is fixed in DSL v3.7.2.2 release, Hence closing it.

dwivediprab avatar May 02 '24 07:05 dwivediprab