nutanix / calm-dsl

Keep Calm and DSL On!
https://nutanix.github.io/calm-dsl/
Apache License 2.0
32 stars 51 forks source link

Errors when working with endpoint targets in blueprint tasks #177

Closed nx-sbourdeaud closed 4 months ago

nx-sbourdeaud commented 3 years ago

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 commented 3 years ago

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.

dwivediprab commented 4 months ago

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