

استعمال ڪندڙ ھدايت
ضميمو: ڪسٽم ٽيمپليٽ
This section explains the following topics:
- Custom Templates Configuration, on page 1
ڪسٽم ٽيمپليٽ جي ترتيب
مقصد
Custom templates are user-defined templates that allow for the customization and automation of network services not supported by the function pack. They define specific configurations and settings that can be applied to network devices and services, making deploying and managing network resources more efficient and consistent.
To use custom templates in Crosswork Network Controller, you must pre-configure them in Crosswork Network Services Orchestration (NSO). Once configured in NSO, the Crosswork Network Controller will display your custom template for selection when you provision a device or a service. NSO uses XML-based configuration (config) templates, which you can invoke from provisioning code or link directly to devices or services. XML templates are snippets of configuration, similar to the CDB init files، پر وڌيڪ طاقتور.
ڪم فلو
To illustrate the capabilities of custom templates, we have provided an example that uses variable substitution to create an XML template. We then walk you through importing the template in NSO and referencing it in the L2VPN service in the Crosswork Network Controller.
To use custom templates:
- جي طور تي ٺاهيوample مثال روٽر تي گهربل ڊوائيس ترتيب سان هيٺ ڏنل آهي:
policy-map TEST-POLICY
class class-default
police rate 200 mbps
!
!
آخري پاليسي- نقشو - Log in to NSO CLI and sync from that device.
admin@ncs# ڊوائيسز ڊوائيس PE99-55A1 هم وقت سازي کان - In NSO CLI, get the running config for the policy map. Display the configuration in an XML format.

- ڪاپي ڪريو file ٽيڪسٽ يا ڪوڊ ايڊيٽر ڏانهن آئوٽ پُٽ. متغير بيان ڪريو جيڪي توهان جي ضرورتن مطابق متبادل يا پيرا ميٽرائيز ڪري سگهجن ٿا c استعمال ڪندي.urly بريڪس ۽ هڪ ڊالر جو نشان، {$VARIABLE}. توهان متغير نالو کي وڏو رکڻ کي ترجيح ڏئي سگهو ٿا ته جيئن اهو ٻين XML عنصرن کان وڌيڪ نمايان ٿئي. file. هتي، اسان پنهنجي ٽيمپليٽ لاءِ ٻه متغير، $POLICY_VAR ۽ $RATE_MBS ٺاهيا آهن.

- Create a skeleton template package in NSO. This will help you generate the XML structure with the correct headers. Copy the <devices> code in the below example کي پنھنجي اسڪيليٽن ٽيمپليٽ ڏانھن موڪليو. ھوسٽ نالي جي ترتيب اختياري آھي ۽ XML جي حصي جي طور تي ضروري ناھي.
نوٽ The custom-templates name must start with either ct- or CT- and should not include an underscore character.
- Copy the policy-map <config> code you created in step 4 from your text editor.

- Paste it in your skeleton template.


- Save and import your new XML template into NSO using NSO web UI يا CLI. هي قدم توهان کي ڪسٽم ٽيمپليٽس کي لاڳو ڪرڻ کان اڳ NSO ۾ ضم ڪرڻ جي اجازت ڏئي ٿو.
الف. جيڪڏهن NSO CLI استعمال ڪري رهيا آهيو، ته ٽيمپليٽ کي NSO ۾ ضم ڪريو هيٺ ڏنل طريقي سان لوڊ ڪريو:
admin@ncs% load merge user-device-template.xml
[ok] admin@ncs%
commit [ok] For details on applying custom templates, refer to Using Custom-Templates– CFP Services in the Cisco NSO Transport SDN Function Pack Bundle 7.0.0 User Guide.
ب. جڏهن ذريعي درآمد ڪيو وڃي Web UI ۾، لوڊ/سيو آپشن استعمال ڪريو ۽ پيسٽ تي ڪلڪ ڪريو ڊيٽا کي پيسٽ ڪري لوڊ ڪرڻ لاءِ. ڪنفيگريشن لاڳو ڪرڻ لاءِ نئين تبديلين کي ڪمٽ استعمال ڪندي پڻ لاڳو ڪرڻ گهرجي. - Validate the new template in NSO.

- Let’s add this template to the L2VPN service in the Crosswork Network Controller.
a. Choose Services & Traffic Engineering> Provisioning (NSO)> L2VPN> L2VPN-Service
ب. ڪلڪ ڪريو
to create a new service. The L2VPN-Service page is displayed.
c. Enter a name for the VPN Identifier and click Continue.
d. Under Custom-templates, click
to apply your custom template. The Crosswork Network Controller will display your custom template for selection.
e. پنھنجو ڪسٽم ٽيمپليٽ چونڊيو ۽ گھربل متغير لاڳو ڪريو. تبديلين کي انجام ڏيو تي ڪلڪ ڪريو. نوٽ ڪريو ته روٽر جي تصديق پاليسي نقشي جو نالو ۽ 250 Mbps جي پوليس جي شرح ڏيکاري ٿي.
- Repeat the process for adding the policy to the interfaces. Ensure to add the policy at the device level, as the interface numbers may be different on each side of the L2VPN.
و moreيڪ لاءِ سابقamples of configuring custom templates, refer to Using Custom-Templates– CFP Services in the Cisco NSO Transport SDN Function Pack Bundle 7.1.0 User Guide.

دستاويز / وسيلا
![]() |
سسکو ڪسٽم ٽيمپليٽس [pdf] استعمال ڪندڙ ھدايت ڪسٽم ٽيمپليٽ، ڪسٽم، ٽيمپليٽ |
