Create a Blueprint from a Design TemplateΒΆ
Let’s create a Blueprint from a design Template called “My-Demo-Design”. We can verify that you’ve created this
template using the DesignTemplates
Session property:
>>> aos.DesignTemplates
{
"url": "design/templates",
"by_id": "id",
"item-names": [
"My-Demo-Design",
"vPOD-L3"
],
"by_label": "display_name"
}
To create a Blueprint, you must have the design Template id value, along with the name of the design reference architecture. For this example, the reference architecture is called two_stage_l3clos:
>>> template = aos.DesignTemplates['My-Demo-Design']
>>> template.id
u'ee0164ed-d9cf-46c8-a5e5-8b16d70d0a1c'
Let’s create a Blueprint called “My-Pod-A” from this design. The first step is to create a blueprint item using the collection:
>>> blueprint = aos.Blueprints['My-POD-A']
>>> blueprint.exists
False
We can see that AOS-Server does not yet know about this Bluerpint because the exists
property is False
. The
next step is to perform the create action:
>>> blueprint.create(template.id, reference_arch='two_stage_l3clos')
True
>>> blueprint.exists
True
>>> blueprint.id
u'a58e8c3f-84c5-472c-aaf8-a2292f4aa2c6'
At this point the blueprint exists in the AOS-Server, and you can verify that via the UI, for example: