How to get relationship values available under network interface instance page.

Vinay2509
Tera Contributor

Hi Team,

 

I am trying to achieve physical connection naming convention.

 

Naming format would be : A-end equipmentname/slot/card/port-Z-end equipmentname/slot/card/port-Linktype

 

Naming convention rule has to be implemented when user creates an instance using change model/change request (Create physical connection)

 

Vinay2509_0-1708410896545.png

Question here, at A-end interface and Z end interface we can only select port but will not come to know to which card and slot the selected port is associated. How to resolve this.

 

please help with logic and implementation.

 

Thanks

Vinay

1 ACCEPTED SOLUTION

Hi @Vinay2509 ,

 

I dont think you need business rule. You can achieve this in below ways:

1) Update the sn_ni_core.TNIDefaultCINameUtils script or
2) Update/create extension points for sn_ni_core.TNIDefaultCINameUtils.

 

Option 2 is the best practice.

Here is how you can do that.
(these steps are provided assuming you dont have any customization on this script and you are using the OOB version of the script)
- search for Extension points in navigator. click on Scripted Extension Points

AneeshD_0-1708727954791.png

 

search for sn_ni_core.TNIDefaultCINameUtils

AneeshD_1-1708728030757.png

Open this record and update the code: here is the changes I have made to achieve what you wanted.

AneeshD_3-1708728317974.png

AneeshD_2-1708728266430.png

attaching the complete file for your reference.

Once the code is added, save the code and "create implementation"

AneeshD_4-1708728648216.png

 

Once that is done, you are good to test your changes.

Here is what mine looks like:

AneeshD_5-1708728935577.png

 

 

Let me know if this was helpful. Please mark this as resolved or let me know if any further help needed.

 

Thanks,

Aneesh D

View solution in original post

5 REPLIES 5

Aneesh-D
Tera Guru
Tera Guru

Hi @Vinay2509 ,

 

If you are using the default naming patterns, then port name would ideally give the complete hierarchy from equipment->slot->card->port.

AneeshD_0-1708483219359.png

Now, regarding changing the default connection name. The default naming pattern is defined in the script include file: TNIDefaultCINameUtils

 

 

            case TNIConstants.INV_CATEGORY.PHYSICAL_CONNECTION:
                name = this.validateSiteCode(ciGr.site_a.clli_code).concat(SLASH).concat(this.validateSiteCode(ciGr.site_z.clli_code)).concat(SLASH).concat(ciGr.model_id.name).concat(SLASH).concat(number);
                break;​

 

 

you can override these defaults as per your requirement.

 

Thanks,

Aneesh D

@Aneesh-D Thanks for response!

 

Suggested naming format is : A-end equipmentname/slot/card/port-Z-end equipmentname/slot/card/port-Linktype

 

Can we use business rule on physical connection table and call script include? how things will work please help to understand.

 

Thanks

Vinay

Hi @Vinay2509 ,

 

I dont think you need business rule. You can achieve this in below ways:

1) Update the sn_ni_core.TNIDefaultCINameUtils script or
2) Update/create extension points for sn_ni_core.TNIDefaultCINameUtils.

 

Option 2 is the best practice.

Here is how you can do that.
(these steps are provided assuming you dont have any customization on this script and you are using the OOB version of the script)
- search for Extension points in navigator. click on Scripted Extension Points

AneeshD_0-1708727954791.png

 

search for sn_ni_core.TNIDefaultCINameUtils

AneeshD_1-1708728030757.png

Open this record and update the code: here is the changes I have made to achieve what you wanted.

AneeshD_3-1708728317974.png

AneeshD_2-1708728266430.png

attaching the complete file for your reference.

Once the code is added, save the code and "create implementation"

AneeshD_4-1708728648216.png

 

Once that is done, you are good to test your changes.

Here is what mine looks like:

AneeshD_5-1708728935577.png

 

 

Let me know if this was helpful. Please mark this as resolved or let me know if any further help needed.

 

Thanks,

Aneesh D

@Aneesh-D Thanks for your response and efforts!

I have doubt, how to fetch slot and port associated with physical naming part? we need slot and port and card & Linktype also in naming of physical connection.

 

A-end equipmentname/slot/card/port-Z-end equipmentname/slot/card/port-Linktype