SptPrimarySupport.GetPrimaryInterfaces()
This method returns the list of supporting interface and the status whether the interface is usable or not.
Signature
SptPrimarySupport.GetPrimaryInterfaces(ListOfSupportingInterface : List, ListOfSupportingInterfaceStatus : List) : Boolean
Arguments
| Name | Input/Output | Required? | Type | Comment |
|---|---|---|---|---|
ListOfSupportingInterface |
Output | Yes | List | List of supportinginterface port (VPMPort) |
ListOfSupportingInterfaceStatus |
Output | Yes | List | List of primary interface status |
ReturnType
Boolean
- True: If the supporting interfaces and their status are properly retrieved.
- False: If failed.
Example
/* Input argument:
ThisObject (SptPrimarySupportOccurrence)
*/
let pPrimarySupportRef(SptPrimarySupport)
let listOfSupportingInterface(List)
let listOfSupportingInterfaceStatus(List)
let index(Integer)
let pPort(VPMPort)
let PrimaryInterfaceStatus(SptPrimaryInterfaceStatus)
set pPrimarySupportRef = ThisObject.Reference
if (NULL <> pPrimarySupportRef)
{
if (true == pPrimarySupportRef.GetPrimaryInterfaces(listOfSupportingInterface, listOfSupportingInterfaceStatus))
{
if (0 == listOfSupportingInterface.Size())
{
Notify("No supporting interfaces!")
exit
}
if (listOfSupportingInterface.Size() <> listOfSupportingInterfaceStatus.Size())
{
Notify("The number of result is not same!")
exit
}
index = 1
for index while index <= listOfSupportingInterface.Size()
{
let sPortName(String)
let sStatus(String)
set pPort = listOfSupportingInterface.GetItem(index)
set PrimaryInterfaceStatus = listOfSupportingInterfaceStatus.GetItem(index)
if (NULL == pPort)
{
Notify("Wrong result!")
continue
}
if (PrimaryInterfaceStatus == "SptPSPrimaryItfStatus_Invalid")
sStatus = "SptPSPrimaryItfStatus_Invalid"
if (PrimaryInterfaceStatus == "SptPSPrimaryItfStatus_Valid")
sStatus = "SptPSPrimaryItfStatus_Valid"
sPortName = pPort.GetAttributeString("V_FunctionalName")
Notify("Name of supporting interface port : " + sPortName)
Notify("Status of supporting interface : " + sStatus)
}
}
}