#include <stdlib.h>
#include <unistd.h>
#include "rpcclt_openapi.h"
#include "proc_util.h"
void printStackingAppMenu()
{
printf("Usage: stacking_example <test#> <arg1> <arg2> ... \n");
printf("Test 1: Get the next member of the current stack: stacking_example 1 <start-unit> \n");
printf("Test 2: Get the manager's unit number: stacking_example 2 \n");
printf("Test 3: Get the unit's status: stacking_example 3 <unit> \n");
printf("Test 4: Get the unit's management status: stacking_example 4 <unit> \n");
printf("Test 5: Get the configured and standby unit number and admin mode in the stack: stacking_example 5 \n");
printf("Test 6: Get the unit's model identifier string and pre-configured model identifier string assigned by HPC: stacking_example 6 <unit> \n");
printf("Test 7: Get the unit's version of code in flash: stacking_example 7 <unit> \n");
printf("Test 8: Get the unit's running version of code: stacking_example 8 <unit> \n");
printf("Test 9: Get the unit's hardware and admin management preference: stacking_example 9 <unit> \n");
printf("Test 10: Get the unit's type and index: stacking_example 10 <unit> \n");
printf("Test 11: Get unit description that corresponds to the index provided: stacking_example 11 <unit-type-index> \n");
printf("Test 12: Get stack firmware synchronization status of member unit: stacking_example 12 <unit> \n");
printf("Test 13: Get stack firmware synchronization status: stacking_example 13 \n");
printf("Test 14: Get stack firmware synchronization last attempt status: stacking_example 14 <unit> \n");
printf("Test 15: Get active template id of the stack unit: stacking_example 15 <unit> \n");
printf("Test 16: Get description of specified template id: stacking_example 16 <template-id> \n");
printf("Test 17: Get the unit's up time in seconds: stacking_example 17 <unit> \n");
printf("Test 18: Get the unit's serial number: stacking_example 18 <unit> \n");
printf("Test 19: Get the unit's service tag: stacking_example 19 <unit> \n");
printf("Test 20: Get the unit's model identifier string assigned by HPC: stacking_example 20 <unit> \n");
printf("Test 21: Verify unit number: stacking_example 21 <unit> \n");
printf("Test 22: Get the maximum stacking unit number: stacking_example 22 \n");
printf("Test 23: Get unit type identifier that corresponds to the index provided: stacking_example 23 <unit-type-index> \n");
printf("Test 24: Get unit type identifier that corresponds to the next index: stacking_example 24 <unit-type-index> \n");
printf("Test 25: Create a new unit record for unit: stacking_example 25 <unit> <unit-type-index> <synch-mode> \n");
printf("Test 26: Remove a unit only if it is not an active member of the stack: stacking_example 26 <unit> \n");
printf("Test 27: Transfers the management function from the current unit to another: stacking_example 27 <target-unit> \n");
printf("Test 28: Get QOS configuration for all front-panel stacking ports stack port: stacking_example 28 \n");
printf("Test 29: Set QOS configuration for all front-panel stacking ports stack port: stacking_example 29 <fps-qos-mode> \n");
printf("Test 30: Set the unit as standby in the stack: stacking_example 30 <standby-unit> <standby-admin-mode> \n");
printf("Test 31: Get stacking mode configuration for a front-panel stack port: stacking_example 31 <unit> <slot> <port> \n");
printf("Test 32: Set stacking mode configuration for a front-panel stack port: stacking_example 32 <unit> <slot> <port> <stack-port-mode> \n");
printf("Test 33: Verify slot number: stacking_example 33 <unit> <slot> \n");
printf("Test 34: List available slot(s) on given unit: stacking_example 34 <unit> \n");
printf("Test 35: Verify the slot is full: stacking_example 35 <unit> <slot> \n");
printf("Test 36: Get the admin mode of slot: stacking_example 36 <unit> <slot> \n");
printf("Test 37: Set the admin mode of slot: stacking_example 37 <unit> <slot> <admin mode> \n");
printf("Test 38: Get the power of slot: stacking_example 38 <unit> <slot> \n");
printf("Test 39: Set the power mode of slot: stacking_example 39 <unit> <slot> <power mode> \n");
printf("Test 40: Get the card type: stacking_example 40 <unit> <slot> \n");
printf("Test 41: Get model id and description of configured card: stacking_example 41 <unit> <slot> \n");
printf("Test 42: Get model id and description of inserted card: stacking_example 42 <unit> <slot> \n");
printf("Test 43: Verify the slot is pluggable: stacking_example 43 <unit> <slot> \n");
printf("Test 44: Verify the slot is power down: stacking_example 44 <unit> <slot> \n");
printf("Test 45: Transfer arbitrary file from mgmr to member unit: stacking_example 45 <unit/-1> <src_file> <dst_file> \n");
return;
}
{
uint32_t nextUnit = 0;
{
printf("Bad return code trying to get next member of the current stack. (result = %d)\n", result);
}
else
{
printf("Next member of the current stack: %d\n", nextUnit);
}
return;
}
{
uint32_t unit = 0;
{
printf("Bad return code trying to get manager's unit number. (result = %d)\n", result);
}
else
{
printf("Manager's unit number: %d\n", unit);
}
return;
}
{
{
printf("Bad return code trying to get the unit's status. (result = %d)\n", result);
}
else
{
switch (status)
{
printf("Status for unit (%d): Ok\n", unit);
break;
printf("Status for unit (%d): Unsupported\n", unit);
break;
printf("Status for unit (%d): Code Mismatch\n", unit);
break;
printf("Status for unit (%d): Configuration Mismatch\n", unit);
break;
printf("Status for unit (%d): SDM Mismatch\n", unit);
break;
printf("Status for unit (%d): Unit Not Present\n", unit);
break;
printf("Status for unit (%d): Code Update\n", unit);
break;
printf("Status for unit (%d): STM Mismatch\n", unit);
break;
default:
break;
}
}
return;
}
{
{
printf("Bad return code trying to get the unit's management status. (result = %d)\n", result);
}
else
{
switch (mgmtStatus)
{
printf("Management status for unit (%d): Enable\n", unit);
break;
printf("Management status for unit (%d): Disable\n", unit);
break;
printf("Management status for unit (%d): Unassigned\n", unit);
break;
default:
break;
}
}
return;
}
{
uint32_t configUnit = 0;
uint32_t standbyUnit = 0;
{
printf("Bad return code trying to get the unit numbers and admin mode for standby unit. (result = %d)\n", result);
}
else
{
printf("Configured Unit : %d\n", configUnit);
printf("Standby Unit : %d\n", standbyUnit);
{
printf("Admin mode of Standby Unit (%d) is Enable\n", standbyUnit);
}
else
{
printf("Admin mode of Standby Unit (%d) is Disable\n", standbyUnit);
}
}
return;
}
{
char bufModelId[512] = {0};
char bufPreconfigModelId[512] = {0};
modelId.
pstart = bufModelId;
modelId.
size =
sizeof(bufModelId);
preconfigModelId.pstart = bufPreconfigModelId;
preconfigModelId.size = sizeof(bufPreconfigModelId);
{
printf("Bad return code trying to get the unit numbers and admin mode for standby unit. (result = %d)\n", result);
}
else
{
printf("Model identifier : %s\nPreconfigured model identifier : %s\n", (char *)modelId.pstart, (char *)preconfigModelId.pstart);
}
return;
}
{
{
printf("Bad return code trying to get the unit's version code in flash. (result = %d)\n", result);
}
else
{
printf(
"Release : %d\nVersion : %d\nMaintenance Level : %d\nBuild Parts : %d\n", codeVersion.
release, codeVersion.
version, codeVersion.
maint_level, codeVersion.
build_num);
}
return;
}
{
{
printf("Bad return code trying to get the unit's running version of code. (result = %d)\n", result);
}
else
{
printf("Release : %d\nVersion : %d\nMaintenance Level : %d\nBuild Parts : %d\n", codeVersion.release, codeVersion.version, codeVersion.maint_level, codeVersion.build_num);
}
return;
}
{
{
printf("Hardware ");
}
else
{
printf("Admin ");
}
switch (pref)
{
printf("management preference for unit (%d): Disable\n", unit);
break;
printf("management preference for unit (%d): Unassigned\n", unit);
break;
default:
printf("management preference for unit (%d): %d\n", unit, pref);
break;
}
}
{
{
printf("Bad return code trying to get the unit's hardware and admin management preference. (result = %d)\n", result);
}
else
{
}
return;
}
{
uint32_t unitType = 0;
uint32_t unitTypeIndex = 0;
{
printf("Bad return code trying to get the unit's type and index. (result = %d)\n", result);
}
else
{
printf("Unit type : 0x%x\nUnit type index : %d\n", unitType, unitTypeIndex);
}
return;
}
{
char bufUnitDescr[512] = {0};
unitDescr.pstart = bufUnitDescr;
unitDescr.size = sizeof(bufUnitDescr);
{
printf("Bad return code trying to get the unit description that corresponds to the index provided. (result = %d)\n", result);
}
else
{
printf("Description for unit index (%d): %s\n", unitTypeIndex, (char *)unitDescr.pstart);
}
return;
}
{
{
printf("Bad return code trying to get the stack firmware synchronization status of member unit. (result = %d)\n", result);
}
else
{
switch (firmwareSyncStatus)
{
printf("Stack firmware synchronization status of member unit(%d) : In Progress\n", unit);
break;
default:
printf("Stack firmware synchronization status of member unit(%d) : No Action\n", unit);
break;
}
}
return;
}
{
{
{
printf("Feature is not supported.\n");
}
else
{
printf("Bad return code trying to get the stack firmware synchronization status. (result = %d)\n", result);
}
}
else
{
switch (firmwareSyncStatus)
{
printf("Stack firmware synchronization status : In Progress\n");
break;
default:
printf("Stack firmware synchronization status : No Action\n");
break;
}
}
return;
}
void stackUnitMgrStackFirmwareSyncMemberLastAttemptStatusGet(
openapiClientHandle_t *clientHandle, uint32_t unit)
{
uint32_t lastAttemptStatus = 0;
{
{
printf("Feature is not supported.\n");
}
else
{
printf("Bad return code trying to get the stack firmware synchronization last attempt status of member unit. (result = %d)\n", result);
}
}
else
{
switch (lastAttemptStatus)
{
printf("Stack firmware synchronization last attempt status of member unit(%d) : Success\n", unit);
break;
printf("Stack firmware synchronization last attempt status of member unit(%d) : Failure\n", unit);
break;
printf("Stack firmware synchronization last attempt status of member unit(%d) : Min boot code version not present\n", unit);
break;
default:
printf("Stack firmware synchronization last attempt status of member unit(%d) : None\n", unit);
break;
}
}
return;
}
{
uint32_t templateId = 0;
{
{
printf("Feature is not supported.\n");
}
else
{
printf("Bad return code trying to get the active template id of the stack unit. (result = %d)\n", result);
}
}
else
{
printf("Active template id of the stack unit(%d) : %d\n", unit, templateId);
}
return;
}
{
char bufTemplateDescr[512] = {0};
templateDescr.pstart = bufTemplateDescr;
templateDescr.size = sizeof(bufTemplateDescr);
{
{
printf("Feature is not supported.\n");
}
else
{
printf("Bad return code trying to get the description of specified template id. (result = %d)\n", result);
}
}
else
{
printf("Description of template id(%d): %s\n", templateId, (char *)templateDescr.pstart);
}
return;
}
{
uint32_t upTime = 0;
{
printf("Bad return code trying to get the unit's up time in seconds. (result = %d)\n", result);
}
else
{
printf("Uptime in seconds for unit(%d) : %d\n", unit, upTime);
}
return;
}
{
char bufSerialNumber[512] = {0};
serialNumber.pstart = bufSerialNumber;
serialNumber.size = sizeof(bufSerialNumber);
{
printf("Bad return code trying to get the unit's serial number. (result = %d)\n", result);
}
else
{
printf("Serial Number for unit (%d): %s\n", unit, (char *)serialNumber.pstart);
}
return;
}
{
char bufServiceTag[512] = {0};
serviceTag.pstart = bufServiceTag;
serviceTag.size = sizeof(bufServiceTag);
{
printf("Bad return code trying to get the unit's service tag. (result = %d)\n", result);
}
else
{
printf("Service Tag for unit (%d): %s\n", unit, (char *)serviceTag.pstart);
}
return;
}
{
char bufModelId[512] = {0};
modelId.pstart = bufModelId;
modelId.size = sizeof(bufModelId);
{
printf("Bad return code trying to get the unit's pre-configured model identifier. (result = %d)\n", result);
}
else
{
printf("Pre-configured model identifier for unit (%d): %s\n", unit, (char *)modelId.pstart);
}
return;
}
{
{
printf("Bad return code trying to verify valid unit. (result = %d)\n", result);
}
else
{
{
printf("Unit (%d) is Valid\n", unit);
}
else
{
printf("Unit (%d) is Invalid\n", unit);
}
}
return;
}
{
uint32_t unit = 0;
{
printf("Bad return code trying to get the maximum stacking unit number. (result = %d)\n", result);
}
else
{
printf("Maximum stacking unit number: %d\n", unit);
}
return;
}
{
uint32_t unitType = 0;
{
printf("Bad return code trying to get unit type identifier that corresponds to the index provided. (result = %d)\n", result);
}
else
{
printf("Unit type identifier for index (%d): 0x%x\n", unitTypeIndex, unitType);
}
return;
}
{
uint32_t nextUnitTypeIndex = 0;
uint32_t unitType = 0;
{
printf("Bad return code trying to get unit type identifier that corresponds to the next index. (result = %d)\n", result);
}
else
{
printf("Unit type identifier for next index (%d): 0x%x\n", nextUnitTypeIndex, unitType);
}
return;
}
{
{
printf("Bad return code trying to create a new unit record for unit. (result = %d)\n", result);
}
else
{
printf("New unit record created successfully for unit(%d).\n", unit);
}
return;
}
{
{
{
printf("Failed to remove. Unit (%d) is an active member of the stack.\n", unit);
}
else
{
printf("Bad return code trying to remove a unit. (result = %d)\n", result);
}
}
else
{
printf("Unit (%d) removed successfully.\n", unit);
}
return;
}
{
{
printf("Bad return code trying to transfers the management function from the current unit to another. (result = %d)\n", result);
}
else
{
printf("Unit (%d) transfer successful.\n", targetUnit);
}
return;
}
{
{
{
printf("Feature is not supported.\n");
}
else
{
printf("Bad return code trying to get QOS configuration for all front-panel stacking ports stack port. (result = %d)\n", result);
}
}
else
{
{
printf("QOS Mode for all front-panel stacking ports stack port: Enable.\n");
}
else
{
printf("QOS Mode for all front-panel stacking ports stack port: Disable.\n");
}
}
return;
}
{
{
{
printf("Feature is not supported.\n");
}
else
{
printf("Bad return code trying to Set QOS configuration for all front-panel stacking ports stack port. (result = %d)\n", result);
}
}
else
{
printf("QOS Mode set successfully.\n");
}
return;
}
{
{
printf("Bad return code trying to set the unit as standby in the stack. (result = %d)\n", result);
}
else
{
printf("Unit (%d) set as standby in the stack successfully.\n", standbyUnit);
}
return;
}
uint32_t slot, uint32_t port)
{
{
{
printf("Feature is not supported.\n");
}
else
{
printf("Bad return code trying to get stacking mode configuration for a front-panel stack port. (result = %d)\n", result);
}
}
else
{
{
printf("Stacking mode configuration for a front-panel stack port is Enable.\n");
}
else
{
printf("Stacking mode configuration for a front-panel stack port is Disable.\n");
}
}
return;
}
uint32_t slot, uint32_t port,
OPEN_BOOL_t stackPortMode)
{
{
{
printf("Feature is not supported.\n");
}
else
{
printf("Bad return code trying to set stacking mode configuration for a front-panel stack port. (result = %d)\n", result);
}
}
else
{
printf("Stacking mode configuration for a front-panel stack port set successfully.\n");
}
return;
}
{
{
printf("Bad return code trying to verify slot is available. (result = %d)\n", result);
}
else
{
{
printf("Slot (%d) is available on Unit (%d)\n", slot, unit);
}
else
{
printf("Slot (%d) is not available on Unit (%d)\n", slot, unit);
}
}
return;
}
{
uint32_t size, i;
uint32_t bufSlot[3] = {0};
slot.pstart = bufSlot;
slot.size = sizeof(bufSlot);
{
printf("Bad return code trying to get the unit's slots. (result = %d)\n", result);
}
else
{
for(i = 0; i < size; i++)
{
printf("Slot (%d) is available on Unit (%d)\n", bufSlot[i], unit);
}
}
return;
}
{
{
printf("Bad return code trying to verify slot is full. (result = %d)\n", result);
}
else
{
{
printf("Slot (%d) is full\n", slot);
}
else
{
printf("Slot (%d) is not full\n", slot);
}
}
return;
}
{
uint32_t mode = 0;
{
printf("Bad return code trying to get the slot's admin mode. (result = %d)\n", result);
}
else
{
printf(
"Admin Mode for Slot(%d) : %s\n", slot, (mode ==
OPEN_ENABLE ?
"Enabled" :
"Disabled"));
}
return;
}
{
{
printf("Bad return code trying to set the slot's admin mode. (result = %d)\n", result);
}
else
{
printf(
"Admin Mode for Slot(%d) : %s is set\n", slot, (mode ==
OPEN_ENABLE ?
"Enabled" :
"Disabled"));
}
return;
}
{
uint32_t mode = 0;
{
printf("Bad return code trying to get the slot's power mode. (result = %d)\n", result);
}
else
{
printf(
"Power Mode for Slot(%d) : %s\n", slot, (mode ==
OPEN_ENABLE ?
"Enabled" :
"Disabled"));
}
return;
}
{
{
printf("Bad return code trying to set the slot's power mode. (result = %d)\n", result);
}
else
{
printf(
"Power Mode for Slot(%d) : %s is set\n", slot, (mode ==
OPEN_ENABLE ?
"Enabled" :
"Disabled"));
}
return;
}
{
uint32_t configured, inserted;
{
printf("Bad return code trying to get the slot's card type. (result = %d)\n", result);
}
else
{
printf("Configured card id for slot (%d): 0x%x (%d)\n", slot, configured, configured);
printf("Inserted card id for slot (%d): 0x%x (%d)\n", slot, inserted, inserted);
}
return;
}
void stackCardSupportedConfiguredCardInfoGet(
openapiClientHandle_t *clientHandle, uint32_t unit, uint32_t slot)
{
char bufModelId[256] = {0};
char bufDesc[256] = {0};
uint32_t configured, inserted;
{
printf("Bad return code trying to get the slot's card type. (result = %d)\n", result);
return;
}
modelId.pstart = bufModelId;
modelId.size = sizeof(bufModelId);
desc.pstart = bufDesc;
desc.size = sizeof(bufDesc);
{
printf("Bad return code trying to get the card's model identifier. (result = %d)\n", result);
}
else
{
printf("Model identifier for configured card (0x%x): %s\n", configured, bufModelId);
}
{
printf("Bad return code trying to get the card's description. (result = %d)\n", result);
}
else
{
printf("Description for configured card (0x%x): %s\n", configured, bufDesc);
}
return;
}
void stackCardSupportedInsertedCardInfoGet(
openapiClientHandle_t *clientHandle, uint32_t unit, uint32_t slot)
{
char bufModelId[256] = {0};
char bufDesc[256] = {0};
uint32_t configured, inserted;
{
printf("Bad return code trying to get the slot's card type. (result = %d)\n", result);
return;
}
modelId.pstart = bufModelId;
modelId.size = sizeof(bufModelId);
desc.pstart = bufDesc;
desc.size = sizeof(bufDesc);
{
printf("Bad return code trying to get the card's model identifier. (result = %d)\n", result);
}
else
{
printf("Model identifier for inserted card (0x%x): %s\n", inserted, bufModelId);
}
{
printf("Bad return code trying to get the card's description. (result = %d)\n", result);
}
else
{
printf("Description for inserted card (0x%x): %s\n", inserted, bufDesc);
}
return;
}
{
{
printf("Bad return code trying to verify slot is pluggable. (result = %d)\n", result);
}
else
{
{
printf("Slot (%d) is pluggable\n", slot);
}
else
{
printf("Slot (%d) is not pluggable\n", slot);
}
}
return;
}
{
{
printf("Bad return code trying to verify slot is power down. (result = %d)\n", result);
}
else
{
{
printf("Slot (%d) is power down\n", slot);
}
else
{
printf("Slot (%d) is not power down\n", slot);
}
}
return;
}
char *srcFileName, char *dstFileName)
{
buffDescSrcFileName.pstart = srcFileName;
buffDescSrcFileName.size = strlen(srcFileName) + 1;
buffDescDstFileName.pstart = dstFileName;
buffDescDstFileName.size = strlen(dstFileName) + 1;
{
printf("Bad return code trying to verify slot is power down. (result = %d)\n", result);
}
else
{
printf("ok\n");
}
return;
}
int main(int argc, char **argv)
{
uint32_t testNum;
char switch_os_revision_string[100];
uint32_t arg1, arg2, arg3, arg4;
if (argc < 2)
{
printStackingAppMenu();
exit(1);
}
testNum = atoi(argv[1]);
l7proc_crashlog_register();
{
printf("\nFailed to initialize RPC to OpEN. Exiting (result = %d)\n", result);
exit(2);
}
{
sleep(1);
}
L7PROC_LOGF(L7PROC_LOG_SEVERITY_INFO, 0, "Starting Stacking API example application");
printf("\n");
switch_os_revision.pstart = switch_os_revision_string;
switch_os_revision.size = sizeof(switch_os_revision_string);
printf("Network OS version = %s\n", switch_os_revision_string);
else
printf("Network OS version retrieve error\n");
printf("\n");
switch (testNum)
{
case 1:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrStackMemberGetNext(&clientHandle, arg1);
break;
case 2:
if (argc != 2)
{
printStackingAppMenu();
exit(1);
}
stackUnitMgrNumberGet(&clientHandle);
break;
case 3:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrUnitStatusGet(&clientHandle, arg1);
break;
case 4:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrMgmtUnitStatusGet(&clientHandle, arg1);
break;
case 5:
if (argc != 2)
{
printStackingAppMenu();
exit(1);
}
stackUnitMgrStandbyGet(&clientHandle);
break;
case 6:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrModelIdentifierGet(&clientHandle, arg1);
break;
case 7:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrDetectCodeVerFlashGet(&clientHandle, arg1);
break;
case 8:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrDetectCodeVerRunningGet(&clientHandle, arg1);
break;
case 9:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrMgmtPrefGet(&clientHandle, arg1);
break;
case 10:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrUnitTypeGet(&clientHandle, arg1);
break;
case 11:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrSupportedDescriptionGet(&clientHandle, arg1);
break;
case 12:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrStackFirmwareSyncMemberStatusGet(&clientHandle, arg1);
break;
case 13:
if (argc != 2)
{
printStackingAppMenu();
exit(1);
}
stackUnitMgrStackFirmwareSyncStatusGet(&clientHandle);
break;
case 14:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrStackFirmwareSyncMemberLastAttemptStatusGet(&clientHandle, arg1);
break;
case 15:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackStmUnitActiveTemplateIdGet(&clientHandle, arg1);
break;
case 16:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackStmTemplateDescriptionGet(&clientHandle, arg1);
break;
case 17:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrUnitUpTimeGet(&clientHandle, arg1);
break;
case 18:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrSerialNumberGet(&clientHandle, arg1);
break;
case 19:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrServiceTagGet(&clientHandle, arg1);
break;
case 20:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrPreconfigModelIdGet(&clientHandle, arg1);
break;
case 21:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrUnitIsValid(&clientHandle, arg1);
break;
case 22:
if (argc != 2)
{
printStackingAppMenu();
exit(1);
}
stackUnitMgrUnitMaxGet(&clientHandle);
break;
case 23:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrSupportedUnitIdGet(&clientHandle, arg1);
break;
case 24:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrSupportedUnitIdNextGet(&clientHandle, arg1);
break;
case 25:
if (argc != 5)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
arg2 = atoi(argv[3]);
arg3 = atoi(argv[4]);
stackUnitMgrUnitCreate(&clientHandle, arg1, arg2, (
OPEN_BOOL_t)arg3);
break;
case 26:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrUnitDelete(&clientHandle, arg1);
break;
case 27:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrUnitTransfer(&clientHandle, arg1);
break;
case 28:
if (argc != 2)
{
printStackingAppMenu();
exit(1);
}
stackSpmFpsConfigQosModeGet(&clientHandle);
break;
case 29:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
break;
case 30:
if (argc != 4)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
arg2 = atoi(argv[3]);
stackUnitMgrStandbySet(&clientHandle, arg1, arg2);
break;
case 31:
if (argc != 5)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
arg2 = atoi(argv[3]);
arg3 = atoi(argv[4]);
stackSpmFpsConfigStackingModeGet(&clientHandle, arg1, arg2, arg3);
break;
case 32:
if (argc != 6)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
arg2 = atoi(argv[3]);
arg3 = atoi(argv[4]);
arg4 = atoi(argv[5]);
stackSpmFpsConfigStackingModeSet(&clientHandle, arg1, arg2, arg3, (
OPEN_BOOL_t)arg4);
break;
case 33:
if (argc != 4)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
arg2 = atoi(argv[3]);
stackSlotGet(&clientHandle, arg1, arg2);
break;
case 34:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitDbEntrySlotsGet(&clientHandle, arg1);
break;
case 35:
if (argc != 4)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
arg2 = atoi(argv[3]);
stackSlotIsFullGet(&clientHandle, arg1, arg2);
break;
case 36:
if (argc != 4)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
arg2 = atoi(argv[3]);
stackSlotAdminModeGet(&clientHandle, arg1, arg2);
break;
case 37:
if (argc != 5)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
arg2 = atoi(argv[3]);
arg3 = atoi(argv[4]);
stackSlotAdminModeSet(&clientHandle, arg1, arg2, arg3);
break;
case 38:
if (argc != 4)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
arg2 = atoi(argv[3]);
stackSlotPowerModeGet(&clientHandle, arg1, arg2);
break;
case 39:
if (argc != 5)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
arg2 = atoi(argv[3]);
arg3 = atoi(argv[4]);
stackSlotPowerModeSet(&clientHandle, arg1, arg2, arg3);
break;
case 40:
if (argc != 4)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
arg2 = atoi(argv[3]);
stackCardTypeGet(&clientHandle, arg1, arg2);
break;
case 41:
if (argc != 4)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
arg2 = atoi(argv[3]);
stackCardSupportedConfiguredCardInfoGet(&clientHandle, arg1, arg2);
break;
case 42:
if (argc != 4)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
arg2 = atoi(argv[3]);
stackCardSupportedInsertedCardInfoGet(&clientHandle, arg1, arg2);
break;
case 43:
if (argc != 4)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
arg2 = atoi(argv[3]);
stackSlotSupportedPluggableGet(&clientHandle, arg1, arg2);
break;
case 44:
if (argc != 4)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
arg2 = atoi(argv[3]);
stackSlotSupportedPowerdownGet(&clientHandle, arg1, arg2);
break;
case 45:
if (argc != 5)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackCopyFile(&clientHandle, arg1, argv[3], argv[4]);
break;
default:
printStackingAppMenu();
break;
}
L7PROC_LOGF(L7PROC_LOG_SEVERITY_INFO, 0, "Stopping Stacking API example application");
return 0;
}