

ਯੂਜ਼ਰ ਗਾਈਡ
ਅੰਤਿਕਾ: ਕਸਟਮ ਟੈਂਪਲੇਟ
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 ਵਿੱਚ ਮਰਜ ਕਰਨ ਲਈ ਲੋਡ ਕਰਨ ਦੀ ਆਗਿਆ ਦਿੰਦਾ ਹੈ।
a. ਜੇਕਰ 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.
b. ਰਾਹੀਂ ਆਯਾਤ ਕਰਦੇ ਸਮੇਂ Web UI ਵਿੱਚ, ਲੋਡ/ਸੇਵ ਵਿਕਲਪ ਦੀ ਵਰਤੋਂ ਕਰੋ ਅਤੇ ਡੇਟਾ ਨੂੰ ਪੇਸਟ ਕਰਕੇ ਲੋਡ ਕਰਨ ਲਈ ਪੇਸਟ 'ਤੇ ਕਲਿੱਕ ਕਰੋ। ਨਵੇਂ ਬਦਲਾਅ ਸੰਰਚਨਾ ਲਾਗੂ ਕਰਨ ਲਈ Commit ਦੀ ਵਰਤੋਂ ਕਰਕੇ ਵੀ ਲਾਗੂ ਕੀਤੇ ਜਾਣੇ ਚਾਹੀਦੇ ਹਨ। - 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.
ਹੋਰ ਸਾਬਕਾ ਲਈ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] ਯੂਜ਼ਰ ਗਾਈਡ ਕਸਟਮ ਟੈਂਪਲੇਟ, ਕਸਟਮ, ਟੈਂਪਲੇਟ |
