Provides configuration for stack members including unit management and stack firmware as well as obtaining configured and operational status.
Stacking OpEN API
This document provides a brief description of the Stacking OpEN APIs. It provides the following services:
- Get the next member of the current stack.
- Get the manager's unit number.
- Get the unit's status.
- Get the unit's management status.
- Get the configured and standby unit number and admin mode in the stack.
- Get the unit's model identifier string and pre-configured model identifier string assigned by HPC.
- Get the unit's version of code in flash.
- Get the unit's running version of code.
- Get the unit's hardware and admin management preference.
- Get the unit's type and index.
- Get unit description that corresponds to the index provided.
- Get stack firmware synchronization status of member unit.
- Get stack firmware synchronization status.
- Get stack firmware synchronization last attempt status.
- Get active template id of the stack unit.
- Get description of specified template id.
- Get the unit's up time in seconds.
- Get the unit's serial number.
- Get the unit's service tag.
- Get the unit's model identifier string assigned by HPC.
- Verify unit number.
- Get the maximum stacking unit number.
- Get unit type identifier that corresponds to the index provided.
- Get unit type identifier that corresponds to the next index.
- Create a new unit record for unit.
- Remove a unit only if it is not an active member of the stack.
- Transfers the management function from the current unit to another.
- Get QOS configuration for all front-panel stacking ports stack port.
- Set QOS configuration for all front-panel stacking ports stack port.
- Set the unit as standby in the stack.
- Get stacking mode configuration for a front-panel stack port.
- Set stacking mode configuration for a front-panel stack port.
- Verify slot number.
- List available slot(s) on given unit.
- Verify the slot is full.
- Get the admin mode of slot.
- Set the admin mode of slot.
- Get the power of slot.
- Set the power mode of slot.
- Get the card type.
- Get model and description of configured card.
- Get model and description of inserted card.
- Verify the slot is pluggable.
- Verify the slot is power down.
All 'Set' operations may affect the Switch behavior and configuration.
Example C Application stacking_example
Initialization
In the main function, the sample application initializes the OpEN API RPC service by calling openapiClientRegister() and waits for the RPC service in switchdrvr to start. A Client Handle is returned by openapiClientRegister() which is used while invoking the OpEN APIs. The application then exercises the associated OpEN APIs and logs informational and/or error messages on the console. The example application runs to its completion and exits.
stacking_example
stacking_example.c is a sample application that demonstrates the use of the Stacking OpEN APIs. stacking_example is started from the command line and has the following usage syntax:
Usage: stacking_example <test#> <arg1> <arg2> ...
- Test 1: Get the next member of the current stack: stacking_example 1 <start-unit>
- Test 2: Get the manager's unit number: stacking_example 2
- Test 3: Get the unit's status: stacking_example 3 <unit>
- Test 4: Get the unit's management status: stacking_example 4 <unit>
- Test 5: Get the configured and standby unit number and admin mode in the stack: stacking_example 5
- Test 6: Get the unit's model identifier string and pre-configured model identifier string assigned by HPC: stacking_example 6 <unit>
- Test 7: Get the unit's version of code in flash: stacking_example 7 <unit>
- Test 8: Get the unit's running version of code: stacking_example 8 <unit>
- Test 9: Get the unit's hardware and admin management preference: stacking_example 9 <unit>
- Test 10: Get the unit's type and index: stacking_example 10 <unit>
- Test 11: Get unit description that corresponds to the index provided: stacking_example 11 <unit-type-index>
- Test 12: Get stack firmware synchronization status of member unit: stacking_example 12 <unit>
- Test 13: Get stack firmware synchronization status: stacking_example 13
- Test 14: Get stack firmware synchronization last attempt status: stacking_example 14 <unit>
- Test 15: Get active template id of the stack unit: stacking_example 15 <unit>
- Test 16: Get description of specified template id: stacking_example 16 <template-id>
- Test 17: Get the unit's up time in seconds: stacking_example 17 <unit>
- Test 18: Get the unit's serial number: stacking_example 18 <unit>
- Test 19: Get the unit's service tag: stacking_example 19 <unit>
- Test 20: Get the unit's model identifier string assigned by HPC: stacking_example 20 <unit>
- Test 21: Verify unit number: stacking_example 21 <unit>
- Test 22: Get the maximum stacking unit number: stacking_example 22
- Test 23: Get unit type identifier that corresponds to the index provided: stacking_example 23 <unit-type-index>
- Test 24: Get unit type identifier that corresponds to the next index: stacking_example 24 <unit-type-index>
- Test 25: Create a new unit record for unit: stacking_example 25 <unit> <unit-type-index> <synch-mode>
- Test 26: Remove a unit only if it is not an active member of the stack: stacking_example 26 <unit>
- Test 27: Transfers the management function from the current unit to another: stacking_example 27 <target-unit>
- Test 28: Get QOS configuration for all front-panel stacking ports stack port: stacking_example 28
- Test 29: Set QOS configuration for all front-panel stacking ports stack port: stacking_example 29 <fps-qos-mode>
- Test 30: Set the unit as standby in the stack: stacking_example 30 <standby-unit> <standby-admin-mode>
- Test 31: Get stacking mode configuration for a front-panel stack port: stacking_example 31 <unit> <slot> <port>
- Test 32: Set stacking mode configuration for a front-panel stack port: stacking_example 32 <unit> <slot> <port> <stack-port-mode>
- Test 33: Verify slot number: stacking_example 33 <unit> <slot>
- Test 34: List available slot(s) on given unit: stacking_example 34 <unit>
- Test 35: Verify the slot is full: stacking_example 35 <unit> <slot>
- Test 36: Get the admin mode of slot: stacking_example 36 <unit> <slot>
- Test 37: Set the admin mode of slot: stacking_example 37 <unit> <slot> <admin mode>
- Test 38: Get the power of slot: stacking_example 38 <unit> <slot>
- Test 39: Set the power mode of slot: stacking_example 39 <unit> <slot> <power mode>
- Test 40: Get the card type: stacking_example 40 <unit> <slot>
- Test 41: Get model and description of configured card: stacking_example 41 <unit> <slot>
- Test 42: Get model and description of inserted card: stacking_example 42 <unit> <slot>
- Test 43: Verify the slot is pluggable: stacking_example 43 <unit> <slot>
- Test 44: Verify the slot is power down: stacking_example 44 <unit> <slot>
- Test 45: Transfer arbitrary file from mgmr to member unit: stacking_example 45 <unit> <src_file> <dst_file>
It exercises all the Stacking OpEN APIs with appropriate arguments to manage the Stacking component in the ICOS main process (switchdrvr).
Stacking CLI/API Cross Reference