#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");
printf("Test 46: Get running speed for a front-panel stack port: stacking_example 46 <unit> <slot> <port> \n");
printf("Test 47: Get configured speed for a front-panel stack port: stacking_example 47 <unit> <slot> <port> \n");
printf("Test 48: Set speed configuration for a front-panel stack port: stacking_example 48 <unit> <slot> <port> <stack-port-speed> \n");
printf("Test 49: Get the unit index of the local unit: stacking_example 49\n");
printf("Test 50: Get the unit model identifier: stacking_example 50 <unit>\n");
printf("Test 51: Get default template id for selected unit type index: stacking_example 51\n");
printf("Test 52: Get management preference of the unit index: stacking_example 52 <unit>\n");
printf("Test 53: Get the first member of the current stack: stacking_example 53\n");
printf("Test 54: Get the unit system identifier key: stacking_example 54 <unit>\n");
printf("Test 55: Set the admin management preference: stacking_example 55 <unit> <admin pref>\n");
printf("Test 56: Initiate a warm failover to the backup unit: stacking_example 56\n");
printf("Test 57: Administratively enable or disable nonstop forwarding: stacking_example 57 <1/0>\n");
printf("Test 58: Get the administrative status of nonstop forwarding: stacking_example 58\n");
printf("Test 59: Get the reason for the last restart: stacking_example 59\n");
printf("Test 60: Convert a startup reason to a string: stacking_example 60 <reason number>\n");
printf("Test 61: Convert a run config status to a string: stacking_example 61 <config status>\n");
printf("Test 62: Get the age of the configuration on the backup unit: stacking_example 62\n");
printf("Test 63: Get the status of copying the running config to the backup unit: stacking_example 63\n");
printf("Test 64: Next running config copy to backup , if a copy is scheduled: stacking_example 64\n");
printf("Test 65: Get this unit's nonstop forwarding support: stacking_example 65 <unit>\n");
printf("Test 66: Get stack status information and display: stacking_example 66 <unit>\n");
printf("Test 67: Change a unit's number: stacking_example 67 <unit> <new unit>\n");
printf("Test 68: Erase the startup-config file on other connected units: stacking_example 68\n");
printf("Test 69: Erase the factory-defaults file on other connected units: stacking_example 69\n");
printf("Test 70: Set unit user description: stacking_example 70 <unit> <description>\n");
printf("Test 71: Get unit user description: stacking_example 71 <unit>\n");
printf("Test 72: Get stack firmware synchronication mode: stacking_example 72\n");
printf("Test 73: Set stack firmware synchronication mode: stacking_example 73 <0/1>\n");
printf("Test 74: Get stack firmware synchronication trap mode: stacking_example 74\n");
printf("Test 75: Set stack firmware synchronication trap mode: stacking_example 75 <0/1>\n");
printf("Test 76: Get stack firmware synchronication downgrade mode: stacking_example 76\n");
printf("Test 77: Set stack firmware synchronication downgrade mode: stacking_example 77 <mode>\n");
printf("Test 78: Set the mode of sample collection, size of sample: stacking_example 78 <mode> <size>\n");
printf("Test 79: Clear the sampling information of unit status: stacking_example 79 <unit>\n");
printf("Test 80: Reset stack config on a unit: stacking_example 80 <unit>\n");
printf("Test 82: Erase the DHCP client configuration file on the stand-by unit: stacking_example 82\n");
printf("Test 83: Clear stack counters for all stack ports: stacking_example 83\n");
printf("Test 84: Determine if a given port is stack capable: stacking_example 84\n");
printf("Test 85: Set hash mode configuration for all HG trunks: stacking_example 85 <mode>\n");
printf("Test 86: Get the hash mode configuration for all HG trunks: stacking_example 86\n");
printf("Test 87: To check if the hash mode is configurable: stacking_example 87 <mode>\n");
printf("Test 88: Get the unit's stored Debian rootfs sync status: stacking_example 88 <unit>\n");
return;
}
{
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Success\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;
}
{
switch (stackPortSpeed)
{
return "10G";
return "25G";
return "40G";
return "50G";
return "100G";
default:
return "Unknown";
}
return "";
}
uint32_t slot, uint32_t port)
{
{
{
printf("Feature is not supported.\n");
}
else
{
printf("Bad return code trying to get stacking speed configuration for a "
"front-panel stack port. (result = %d) for interface: %u/%u/%u\n",
result, unit, slot, port);
}
}
else
{
printf("Interface: %u/%u/%u\n",unit, slot, port);
printf("Stacking Running Speed: %s(%d)\n",
getStackPortSpeed(stackPortSpeed), stackPortSpeed);
}
return;
}
uint32_t slot, uint32_t port)
{
{
{
printf("Feature is not supported.\n");
}
else
{
printf("Bad return code trying to get stacking speed configuration for a "
"front-panel stack port. (result = %d) for interface: %u/%u/%u\n",
result, unit, slot, port);
}
}
else
{
printf("Interface: %u/%u/%u\n",unit, slot, port);
printf("Stacking Configured Speed: %s(%d)\n",
getStackPortSpeed(stackPortSpeed), stackPortSpeed);
}
return;
}
uint32_t slot, uint32_t port,
uint32_t stackPortSpeed)
{
{
{
printf("Feature is not supported.\n");
}
else
{
printf("Bad return code trying to set stacking speed %s (%d) configuration "
"for a front-panel stack port: %u/%u/%u. (result = %d)\n",
getStackPortSpeed(stackPortSpeed), stackPortSpeed, unit, slot, port, result);
}
}
else
{
printf("Stacking speed %s(%d) configuration for a front-panel stack port:%u/%u/%u is "
"set successfully.\n", getStackPortSpeed(stackPortSpeed), stackPortSpeed,
unit, slot, port);
}
return;
}
{
uint32_t unit;
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Get the unit index of the local unit: %d\n", unit);
}
return;
}
{
char buf[256];
unitDescr.pstart = buf;
unitDescr.size = sizeof(buf);
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Get the supported unit model identifier for unit index %d : %s\n",
unit_index, buf);
}
return;
}
{
uint32_t id;
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Get the default template id for unit %d : %d\n", unit, id);
}
return;
}
{
uint32_t pref;
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Get the management preference of unit %d : %d\n", unit, pref);
}
return;
}
{
uint32_t unit;
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Get the first member of the current stack: %d\n", unit);
}
return;
}
{
char buf[256];
key.pstart = buf;
key.size = sizeof(buf);
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Get the unit system identifier key of unit %d : %s\n", unit, buf);
}
return;
}
uint32_t unit, uint32_t adminPref)
{
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Set the admin management preference of unit %d : %d\n", unit, adminPref);
}
return;
}
{
printf("Disabled in examples\n");
return;
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Initiated the failover\n");
}
return;
}
{
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Administratively enable or disable nonstop forwarding : %d\n", nsf);
}
return;
}
{
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Administrative status of nonstop forwarding : %d\n", nsf);
}
return;
}
{
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Get the reason for the last restart : %d\n", r);
}
return;
}
{
char buf[256];
descr.pstart = buf;
descr.size = sizeof(buf);
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Get the reason string for the last restart : %s\n", buf);
}
return;
}
{
char buf[256];
descr.pstart = buf;
descr.size = sizeof(buf);
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Convert a run config status %d to a string : %s\n", s, buf);
}
return;
}
{
uint32_t age;
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Get the age of the configuration on the backup unit : %d\n", age);
}
return;
}
{
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Status of copying the running config to the backup unit : %d\n", sts);
}
return;
}
{
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Get unit's nonstop forwarding support of unit %d : %d\n", unit, nsf);
}
return;
}
{
const char *mode_str;
int i;
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
switch (unit_info.
sampleMode)
{
mode_str = "Cumulative Summing";
break;
mode_str = "History";
break;
default:
printf("Invalid Sampling configured: %d\n", unit_info.sampleMode);
return;
}
printf("stack Unit %d Status\n", unit);
printf("Sampling Mode: %s\n", mode_str);
{
printf(
"Sample Size: %d\n", unit_info.
sampleSize);
}
printf("Unit Current Average Min Max Dropped\n");
printf("--------------------------------------\n");
for (i = 1; i < 9; i++)
{
status_info = &unit_info.
status_info[i];
if (!status_info->
isValid)
{
continue;
}
printf ("%-2d %-4d %-4d %-4d %-4d %-4u\r\n",
status_info->
curTimeOffset,
status_info->
avgTimeOffset,
status_info->
minTimeOffset,
status_info->
maxTimeOffset,
}
}
return;
}
uint32_t unit, uint32_t new)
{
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Change a unit's number from %d to %d\n", unit, new);
}
return;
}
{
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Erase success\n");
}
return;
}
{
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Erase success\n");
}
return;
}
uint32_t unit, char *desc)
{
descr.pstart = desc;
descr.size = strlen(desc);
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Set unit user description unit %d desc %s\n", unit, desc);
}
return;
}
uint32_t unit)
{
char buf[256];
descr.pstart = buf;
descr.size = sizeof(buf);
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Get unit user description unit %d desc %s\n", unit, buf);
}
return;
}
{
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Get firmware synchronication mode: %d\n", mode);
}
return;
}
{
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Set firmware synchronication mode: %d\n", mode);
}
return;
}
{
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Get firmware synchronication trap mode: %d\n", mode);
}
return;
}
{
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Set firmware synchronication trap mode: %d\n", mode);
}
return;
}
{
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Get firmware synchronication downgrade mode: %d\n", mode);
}
return;
}
void stackUnitMgrStackFirmwareSyncAllowDowngradeModeSet(
openapiClientHandle_t *clientHandle, uint32_t mode)
{
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Set firmware synchronication downgrade mode: %d\n", mode);
}
return;
}
{
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Set mode of sample collection: %d, size of sample: %d\n", mode, size);
}
return;
}
uint32_t unit)
{
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Success clear the sampling information of unit status\n");
}
return;
}
uint32_t unit)
{
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Success reset stack config\n");
}
return;
}
uint32_t all, char *desc)
{
descr.pstart = desc;
descr.size = strlen(desc);
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Success erase the DHCP Client configuration file\n");
}
return;
}
{
uint32_t mode;
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Success, get hash mode configuration: %d\n", mode);
}
return;
}
{
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Success, set hash mode configuration: %d\n", mode);
}
return;
}
uint32_t mode)
{
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Hash mode %d is configurable ? valid: %d\n", mode, valid);
}
return;
}
uint32_t unit)
{
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Rootfs status of unit %d is: %d\n", unit, sts);
}
return;
}
uint32_t intIfNum)
{
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Intf %d is stack capable ? valid: %d\n", intIfNum, valid);
}
return;
}
{
uint32_t time;
{
printf("Bad return code. (result = %d)\n", result);
}
else
{
printf("Wait time: %d\n", time);
}
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;
case 46:
if (argc != 5)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
arg2 = atoi(argv[3]);
arg3 = atoi(argv[4]);
stackSpmFpsStackingRunningSpeedGet(&clientHandle, arg1, arg2, arg3);
break;
case 47:
if (argc != 5)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
arg2 = atoi(argv[3]);
arg3 = atoi(argv[4]);
stackSpmFpsConfigStackingSpeedGet(&clientHandle, arg1, arg2, arg3);
break;
case 48:
if (argc != 6)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
arg2 = atoi(argv[3]);
arg3 = atoi(argv[4]);
arg4 = atoi(argv[5]);
stackSpmFpsConfigStackingSpeedSet(&clientHandle, arg1, arg2, arg3, arg4);
break;
case 49:
if (argc != 2)
{
printStackingAppMenu();
exit(1);
}
stackUnitMgrSupportedLocalUnitIndexGet(&clientHandle);
break;
case 50:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrSupportedModelGet(&clientHandle, arg1);
break;
case 51:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrSupportedStmDefaultTemplateIdGet(&clientHandle, arg1);
break;
case 52:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrSupportedMgmtPrefGet(&clientHandle, arg1);
break;
case 53:
if (argc != 2)
{
printStackingAppMenu();
exit(1);
}
stackUnitMgrStackMemberGetFirst(&clientHandle);
break;
case 54:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrUnitIdKeyGet(&clientHandle, arg1);
break;
case 55:
if (argc != 4)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
arg2 = atoi(argv[3]);
stackUnitMgrAdminMgmtPrefSet(&clientHandle, arg1, arg2);
break;
case 56:
if (argc != 2)
{
printStackingAppMenu();
exit(1);
}
stackFailoverInitiate(&clientHandle);
break;
case 57:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrNsfAdminSet(&clientHandle, arg1);
break;
case 58:
if (argc != 2)
{
printStackingAppMenu();
exit(1);
}
stackUnitMgrNsfAdminGet(&clientHandle);
break;
case 59:
if (argc != 2)
{
printStackingAppMenu();
exit(1);
}
stackUnitMgrStartupReasonGet(&clientHandle);
break;
case 60:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrStartupReasonStrGet(&clientHandle, arg1);
break;
case 61:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrRunCfgStatusString(&clientHandle, arg1);
break;
case 62:
if (argc != 2)
{
printStackingAppMenu();
exit(1);
}
stackUnitMgrConfigAgeOnBackup(&clientHandle);
break;
case 63:
if (argc != 2)
{
printStackingAppMenu();
exit(1);
}
stackUnitMgrRunCfgStatusGet(&clientHandle);
break;
case 64:
if (argc != 2)
{
printStackingAppMenu();
exit(1);
}
stackUnitMgrNextConfigCopyTime(&clientHandle);
break;
case 65:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrNsfSupportGet(&clientHandle, arg1);
break;
case 66:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrUnitStatusInfoGet(&clientHandle, arg1);
break;
case 67:
if (argc != 4)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
arg2 = atoi(argv[3]);
stackUnitMgrUnitNumberChange(&clientHandle, arg1, arg2);
break;
case 68:
if (argc != 2)
{
printStackingAppMenu();
exit(1);
}
stackUnitMgrEraseStartupConfig(&clientHandle);
break;
case 69:
if (argc != 2)
{
printStackingAppMenu();
exit(1);
}
stackUnitMgrEraseFactoryDefaults(&clientHandle);
break;
case 70:
if (argc != 4)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrUserDescriptionSet(&clientHandle, arg1, argv[3]);
break;
case 71:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrUserDescriptionGet(&clientHandle, arg1);
break;
case 72:
if (argc != 2)
{
printStackingAppMenu();
exit(1);
}
stackUnitMgrStackFirmwareSyncModeGet(&clientHandle);
break;
case 73:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrStackFirmwareSyncModeSet(&clientHandle, arg1);
break;
case 74:
if (argc != 2)
{
printStackingAppMenu();
exit(1);
}
stackUnitMgrStackFirmwareSyncTrapModeGet(&clientHandle);
break;
case 75:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrStackFirmwareSyncTrapModeSet(&clientHandle, arg1);
break;
case 76:
if (argc != 2)
{
printStackingAppMenu();
exit(1);
}
stackUnitMgrStackFirmwareSyncAllowDowngradeModeGet(&clientHandle);
break;
case 77:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrStackFirmwareSyncAllowDowngradeModeSet(&clientHandle, arg1);
break;
case 78:
if (argc != 4)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
arg2 = atoi(argv[3]);
stackUnitMgrSampleModeSet(&clientHandle, arg1, arg2);
break;
case 79:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrUnitStatusClear(&clientHandle, arg1);
break;
case 80:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrStackConfigReset(&clientHandle, arg1);
break;
case 82:
if (argc != 4)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrEraseDhcpClientConfigFile(&clientHandle, arg1, argv[3]);
break;
case 83:
if (argc != 2)
{
printStackingAppMenu();
exit(1);
}
stackSpmStackPortCountersClear(&clientHandle);
break;
case 84:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackSpmIsPortStackCapable(&clientHandle, arg1);
break;
case 85:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackStackTrunkHashModeSet(&clientHandle, arg1);
break;
case 86:
if (argc != 2)
{
printStackingAppMenu();
exit(1);
}
stackStackTrunkHashModeGet(&clientHandle);
break;
case 87:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackStackIsTrunkHashModeConfigurable(&clientHandle, arg1);
break;
case 88:
if (argc != 3)
{
printStackingAppMenu();
exit(1);
}
arg1 = atoi(argv[2]);
stackUnitMgrDebianRootfsStatusGet(&clientHandle, arg1);
break;
default:
printStackingAppMenu();
break;
}
L7PROC_LOGF(L7PROC_LOG_SEVERITY_INFO, 0, "Stopping Stacking API example application");
return 0;
}