Tomevision
Tomevision

Reputation: 33

get list of nodes using CloudifyClient

I am trying to get a list of Tosca nodes within my blueprint but it returns all the nodes in the whole cloudify (includes nodes from other blueprints)

nodes = client.nodes.list(_include=['id','type','properties'])

I expect to get a list of nodes in a specific blueprint.

Upvotes: 0

Views: 45

Answers (1)

Isaac
Isaac

Reputation: 16736

To obtain node templates for a blueprint:

blueprint = client.blueprints.get(blueprint_id, _include=['plan'])
nodes = blueprint.plan['nodes']

nodes will be a list of dictionaries, each one represents a node template.

Upvotes: 0

Related Questions