Example of container reprovisioning - adding a new NIC
The following example illustrates the changes that you would make to a network container blueprint to add a new NIC [AccessC] to a sample dynamic container blueprint and reprovision the container.
To add a new NIC
- Update the network container blueprint as follows:
Add the new revision number to the network container blueprint.
<revisionNum>1</revisionNum>Add the new address pool blueprint schema.
<addressPoolBlueprint>
<condition>-EXISTS- container.nicSegments[AccessC]</condition>
<name>AccessC</name>
<rangeBlueprintName>Data</rangeBlueprintName>
</addressPoolBlueprint>Add the new vlan blueprint.
<vlanBlueprint>
<condition>-EXISTS- container.nicSegments[AccessC]</condition>
<vlanName>AccessC</vlanName>
<vlanPoolName>Data</vlanPoolName>
</vlanBlueprint>Add the new NIC segment blueprint.
<nicSegmentBlueprint xsi:type="containerNicNetworkSegmentBlueprint" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<addressPoolName>AccessC</addressPoolName>
<customerFlag>true</customerFlag>
<defaultEnabledFlag>false</defaultEnabledFlag>
<lockedFlag>false</lockedFlag>
<managementFlag>false</managementFlag>
<name>AccessC</name>
<networkName>AccessC</networkName>
<tag>Purpose[Application]</tag>
<vlanName>AccessC</vlanName>
</nicSegmentBlueprint>Add the new network path blueprint.
<networkPathBlueprint>
<endpoint1Name>External</endpoint1Name>
<endpoint2Name>AccessC</endpoint2Name>
<name>External-AccessC</name>
</networkPathBlueprint>Modify the edge node to specify a gateway address, and configure and unconfigure action items.
<addressBlueprint>
<addressName>GatewayC</addressName>
<addressPoolName>AccessC</addressPoolName>
<condition>-EXISTS- container.nicSegments[AccessC]</condition>
<gatewayFlag>true</gatewayFlag>
<poolPosition></poolPosition>
</addressBlueprint>
<configureActionInfoBlueprint xsi:type="mergeActionInfoBlueprint" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<condition>-EXISTS- container.nicSegments[AccessC]</condition>
<name>Edge-C</name>
<templateGroups>
<item>SampleDynamicConfigureEdge-C</item>
</templateGroups>
</configureActionInfoBlueprint>
<unconfigureActionInfoBlueprint xsi:type="mergeActionInfoBlueprint" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<name>Edge-C</name>
<templateGroups>
<item>SampleDynamicUnconfigureEdge-C</item>
</templateGroups>
</unconfigureActionInfoBlueprint>Modify the hypervisor node to specify the port type, and configure and unconfigure action items for AccessC.
<configureActionInfoBlueprint xsi:type="mergeActionInfoBlueprint" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<condition>-EXISTS- container.nicSegments[AccessC]</condition>
<name>Access-C</name>
<templateGroups>
<item>SampleDynamicConfigureAccess-C</item>
</templateGroups>
</configureActionInfoBlueprint>
<portTypeBlueprint>
<name>AccessC</name>
<nameWithinSwitch>$\{container.node.portTypes[AccessC].vlan}</nameWithinSwitch>
<nicSegmentName>AccessC</nicSegmentName>
</portTypeBlueprint>
<unconfigureActionInfoBlueprint xsi:type="mergeActionInfoBlueprint" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<name>Access-C</name>
<templateGroups>
<item>SampleDynamicUnconfigureAccess-C</item>
</templateGroups>
</unconfigureActionInfoBlueprint>Add the template group SampleDynamicConfigureEdge-C.
interface vlan${container.vlans[AccessC]}
ip address
{container.node.addresses[GatewayC]} ${container.node.addresses[GatewayC].subnetMask.CIDR}
no shutdown
exitAdd the template group SampleDynamicUnconfigureEdge-C.
no vlan ${container.vlans[AccessC]}
no interface vlan${container.vlans[AccessC]}Add the template group SampleDynamicConfigureAccess-C (shown for vswitch).
port-profile ${container.node.portTypes[AccessC].name}
switchport mode access
switchport access vlan ${container.node.portTypes[AccessC].vlan}
vmware port-group ${container.node.portTypes[AccessC].vlan}
no shutdown
state enabled
exitAdd the template group SampleDynamicUnconfigureAccess-C.
no port-profile ${container.node.portTypes[AccessC].name}
- Import the new blueprint revision into BMC Network Automation by using the import script. See Creating-network-container-blueprints.
- From the BMC Cloud Lifecycle Management Administration Console, click the vertical Workspaces menu on the left side of the window and select Resources.
- Onboard the revised blueprint.
- Under Quick Links on the left, click Network Containers under the General section.
- Select the network container you want to reprovision.
Click the Reprovision Network Container icon
to launch the Reprovision Network Container dialog.
The Reprovision Network Container dialog is displayed.
- Select the blueprint version to which you want to reprovision the network container.
- Optionally, select Restricted mode. Selecting this option prevents the addition or deletion of any components (such as firewalls, load balancers, and so on) that cannot be rolled back at a later time. If this option is selected, and the container blueprint contains components that cannot be rolled back, then the reprovision operation will not be allowed. If you do not select the option, you risk reprovisioning the network container into a non-recoverable state. For more information see Restricted Reprovisioning Mode.
Click Reprovision.
- Enable the NIC. The newly added NIC segment is in disabled state, so you must follow the reprovision operation by modifying the network container to enable the NIC segment.