Retrieve Blueprint Rendered ContentsΒΆ
You can retrieve the contents of the Blueprint build composition at any time using the contents
property.
This property will give you a very large dictionary of data organized in a way that is specific to the design
Template. The following is a short snippet of content values for the “links” area:
# each time you access the contents property the library will do a new GET.
# so make a variable so we only do a single GET for this example.
>>> contents = blueprint.contents
# examine a list of all the items in the contents
>>> print json.dumps(contents.keys(), indent=2)
[
"display_name",
"reference_architecture",
"service",
"created_at",
"custom_extension",
"system",
"last_modified_at",
"intent",
"tenant_connectivity",
"external_endpoints",
"id",
"constraints"
]
# access the system links contents. There are 23 links in this Blueprint
>>> links = contents['system']['links']
>>> len(links)
23
# now show the contents of one of the links
>>> print json.dumps(links[0], indent=2)
{
"role": "leaf_l3_server",
"endpoints": [
{
"interface": "eth0",
"display_name": "server_4_leaf_2",
"type": "l3_server",
"id": "server_4_leaf_2",
"ip": "172.21.0.17/31"
},
{
"interface": "swp4",
"display_name": "leaf_2",
"type": "leaf",
"id": "leaf_2",
"ip": "172.21.0.16/31"
}
],
"display_name": "leaf_2<->server_4_leaf_2"
}