Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
openapi_stacking.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-2018 Broadcom.
12 *
13 * Licensed under the Apache License, Version 2.0 (the "License");
14 * you may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at
16 *
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
24 *
25 **********************************************************************
26 *
27 * @filename openapi_stacking.h
28 *
29 * @purpose Stacking Configuration and Status
30 *
31 * @component OpEN
32 *
33 * @create 10/22/2015
34 *
35 * @end
36 *
37 **********************************************************************/
38 #ifndef OPENAPI_STACKING_H_INCLUDED
39 #define OPENAPI_STACKING_H_INCLUDED
40 
41 #include "openapi_common.h"
42 
44 typedef enum
45 {
55 
57 typedef enum
58 {
63 
65 typedef enum
66 {
85 
87 typedef enum
88 {
92 
94 typedef enum
95 {
101 
102 #define OPEN_UNITMGR_ROOTFS_VER_SIZE 33
103 #define OPEN_UNITMGR_ROOTFS_VER_LENGTH 32
104 #define OPEN_UNITMGR_ROOTFS_SNAPSHOT_FILE "/mnt/fastpath/upper1.tgz"
105 #define OPEN_UNITMGR_ROOTFS_SNAPSHOT_VER_FILE "/mnt/fastpath/upper1.md5"
106 #define OPEN_CDA_FILE_NAME_LENGTH 128
107 
108 /*****************************************************************/
124  uint32_t startUnit,
125  uint32_t *nextUnit);
126 
127 /*****************************************************************/
142  uint32_t *unit);
143 
144 /*****************************************************************/
162  uint32_t unit,
163  open_buffdesc *serialNumber);
164 
165 /*****************************************************************/
183  uint32_t unit,
184  open_buffdesc *serviceTag);
185 
186 /*****************************************************************/
205  uint32_t unit,
206  open_buffdesc *modelId);
207 
208 /*****************************************************************/
225  uint32_t unit,
226  OPEN_BOOL_t *isValid);
227 
228 /*****************************************************************/
244  uint32_t *unit);
245 
246 /*****************************************************************/
262  uint32_t unit,
264 
265 /*****************************************************************/
281  uint32_t unit,
282  OPEN_USMDB_UNITMGR_MGMT_FLAG_t *mgmtStatus);
283 
284 /*****************************************************************/
306  uint32_t unit,
307  open_buffdesc *modelId,
308  open_buffdesc *preconfigModelId);
309 
310 /*****************************************************************/
326  uint32_t unit,
327  open_revision_data_t *codeVersion);
328 
329 /*****************************************************************/
345  uint32_t unit,
346  open_revision_data_t *codeVersion);
347 
348 /*****************************************************************/
365  uint32_t unit,
367  OPEN_USMDB_UNITMGR_MGMTPREF_t *adminPref);
368 
369 /*****************************************************************/
387  uint32_t unit,
388  uint32_t *unitType,
389  uint32_t *unitTypeIndex);
390 
391 /*****************************************************************/
409  uint32_t unitTypeIndex,
410  open_buffdesc *unitDescr);
411 
412 /*****************************************************************/
428  uint32_t unit,
429  OPEN_UNIT_MGR_SFS_SWITCH_STATUS_t *firmwareSyncStatus);
430 
431 /*****************************************************************/
447  OPEN_UNIT_MGR_SFS_SWITCH_STATUS_t *firmwareSyncStatus);
448 
449 /*****************************************************************/
466  uint32_t unit,
467  uint32_t *lastAttemptStatus);
468 
469 /*****************************************************************/
486  uint32_t unit,
487  uint32_t *templateId);
488 
489 /*****************************************************************/
506  uint32_t templateId,
507  open_buffdesc *templateDescr);
508 
509 /*****************************************************************/
525  uint32_t unit,
526  uint32_t *upTime);
527 
528 /*****************************************************************/
546  uint32_t unitTypeIndex,
547  uint32_t *unitType);
548 
549 /*****************************************************************/
568  uint32_t unitTypeIndex,
569  uint32_t *nextUnitTypeIndex,
570  uint32_t *unitType);
571 
572 /*****************************************************************/
593  uint32_t unit,
594  uint32_t unitTypeIndex,
595  OPEN_BOOL_t synchMode);
596 
597 /*****************************************************************/
614  uint32_t unit);
615 
616 /*****************************************************************/
632  uint32_t targetUnit);
633 
634 /*****************************************************************/
652  OPEN_CONTROL_t *fpsQosMode);
653 
654 /*****************************************************************/
671  OPEN_CONTROL_t fpsQosMode);
672 
673 /*****************************************************************/
691  uint32_t *configUnit,
692  uint32_t *standbyUnit,
693  OPEN_BOOL_t *standbyAdminMode);
694 
695 /*****************************************************************/
711  uint32_t standbyUnit,
712  OPEN_BOOL_t standbyAdminMode);
713 
714 /*****************************************************************/
735  uint32_t unit,
736  uint32_t slot,
737  uint32_t port,
738  OPEN_BOOL_t *stackPortMode);
739 
740 /*****************************************************************/
760  uint32_t unit,
761  uint32_t slot,
762  uint32_t port,
763  OPEN_BOOL_t stackPortMode);
764 
765 
766 
767 /*****************************************************************/
785  uint32_t unit,
786  uint32_t slot,
787  OPEN_BOOL_t *isValid);
788 
789 /**********************************************************************/
808  uint32_t unit,
809  uint32_t *count,
810  open_buffdesc *bufd);
811 
812 /*****************************************************************/
832  uint32_t unit,
833  uint32_t slot,
834  OPEN_BOOL_t *isFull);
835 
836 /*****************************************************************/
857  uint32_t unit,
858  uint32_t slot,
859  OPEN_CONTROL_t *adminMode);
860 
861 /*****************************************************************/
882  uint32_t unit,
883  uint32_t slot,
884  OPEN_CONTROL_t adminMode);
885 
886 /*****************************************************************/
907  uint32_t unit,
908  uint32_t slot,
909  OPEN_CONTROL_t *powerMode);
910 
911 /*****************************************************************/
932  uint32_t unit,
933  uint32_t slot,
934  OPEN_CONTROL_t powerMode);
935 
936 /*****************************************************************/
956  uint32_t unit,
957  uint32_t slot,
958  uint32_t *cardIdConfig,
959  uint32_t *cardIdInsert);
960 
961 /*****************************************************************/
979  uint32_t cardId,
980  open_buffdesc *bufd);
981 
982 /*****************************************************************/
1000  uint32_t cardId,
1001  open_buffdesc *bufd);
1002 
1003 /*****************************************************************/
1023  uint32_t unit,
1024  uint32_t slot,
1025  OPEN_BOOL_t *isPluggable);
1026 
1027 /*****************************************************************/
1047  uint32_t unit,
1048  uint32_t slot,
1049  OPEN_BOOL_t *isPowerdown);
1050 
1051 /*****************************************************************/
1076  uint32_t unit,
1077  open_buffdesc *srcFileName,
1078  open_buffdesc *dstFileName);
1079 
1080 /*****************************************************************/
1100  uint32_t unit,
1101  open_buffdesc *version);
1102 
1103 /*****************************************************************/
1123  uint32_t unit,
1124  open_buffdesc *version);
1125 
1126 /*****************************************************************/
1146  uint32_t unit,
1147  open_buffdesc *version);
1148 
1149 /*****************************************************************/
1169  uint32_t unit,
1170  open_buffdesc *version);
1171 
1172 /*****************************************************************/
1188  uint32_t unit);
1189 
1190 #endif /* OPENAPI_STACKING_H_INCLUDED */
1191 
open_error_t openapiStmTemplateDescriptionGet(openapiClientHandle_t *client_handle, uint32_t templateId, open_buffdesc *templateDescr)
Gets description of specified template id.
OPEN_USMDB_UNITMGR_MGMT_FLAG_t
Management Flag.
open_error_t openapiUnitMgrDebianRootfsOperVerSet(openapiClientHandle_t *client_handle, uint32_t unit, open_buffdesc *version)
Given a unit, set the Debian Rootfs changes snapshot version currently in use.
open_error_t openapiUnitMgrUnitMaxGet(openapiClientHandle_t *client_handle, uint32_t *unit)
Gets the maximum stacking unit number (largest possible number of units in the stack).
open_error_t openapiUnitMgrStackFirmwareSyncMemberStatusGet(openapiClientHandle_t *client_handle, uint32_t unit, OPEN_UNIT_MGR_SFS_SWITCH_STATUS_t *firmwareSyncStatus)
Get stack firmware synchronization status of member unit.
open_error_t openapiSlotPowerModeGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t slot, OPEN_CONTROL_t *powerMode)
Given a unit and slot number, gets power mode of slot.
open_error_t openapiUnitMgrSerialNumberGet(openapiClientHandle_t *client_handle, uint32_t unit, open_buffdesc *serialNumber)
Given a unit, gets the unit's serial number.
OPEN_USMDB_UNITMGR_MGMTPREF_t
Unit's Management Preference.
open_error_t openapiUnitMgrSupportedDescriptionGet(openapiClientHandle_t *client_handle, uint32_t unitTypeIndex, open_buffdesc *unitDescr)
Get unit description that corresponds to the index provided.
open_error_t openapiUnitMgrStackFirmwareSyncStatusGet(openapiClientHandle_t *client_handle, OPEN_UNIT_MGR_SFS_SWITCH_STATUS_t *firmwareSyncStatus)
Get stack firmware synchronization status.
open_error_t openapiSpmFpsConfigQosModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t fpsQosMode)
Set QOS configuration for all front-panel stacking ports stack port.
open_error_t openapiUnitMgrUnitTransfer(openapiClientHandle_t *client_handle, uint32_t targetUnit)
Transfers the management function from the current unit to another.
OPEN_SFS_LAST_ATTEMPT_STATUS_t
Stack Firmware Synchronization Last Attempt Status.
open_error_t openapiSpmFpsConfigStackingModeSet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t slot, uint32_t port, OPEN_BOOL_t stackPortMode)
Set stacking mode configuration for a front-panel stack port.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiSlotSupportedPowerdownGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t slot, OPEN_BOOL_t *isPowerdown)
Given a unit and slot number, verify whether it powerdown indicator.
open_error_t openapiUnitMgrStackFirmwareSyncMemberLastAttemptStatusGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t *lastAttemptStatus)
Get stack firmware synchronization last attempt status.
open_error_t openapiUnitMgrSupportedUnitIdNextGet(openapiClientHandle_t *client_handle, uint32_t unitTypeIndex, uint32_t *nextUnitTypeIndex, uint32_t *unitType)
Get unit type identifier that corresponds to the next index.
open_error_t openapiUnitMgrDetectCodeVerRunningGet(openapiClientHandle_t *client_handle, uint32_t unit, open_revision_data_t *codeVersion)
Given a unit, gets the unit's running version of code.
open_error_t openapiCardTypeGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t slot, uint32_t *cardIdConfig, uint32_t *cardIdInsert)
Given a unit and slot number, gets configured card type and inserted card type.
open_error_t openapiUnitMgrDebianRootfsVerSet(openapiClientHandle_t *client_handle, uint32_t unit, open_buffdesc *version)
Given a unit, set the Debian Rootfs changes snapshot version stored.
open_error_t openapiSlotAdminModeGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t slot, OPEN_CONTROL_t *adminMode)
Given a unit and slot number, gets admin mode of slot.
open_error_t openapiSlotSupportedPluggableGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t slot, OPEN_BOOL_t *isPluggable)
Given a unit and slot number, verify whether it has pluggable indicator.
open_error_t openapiSlotIsFullGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t slot, OPEN_BOOL_t *isFull)
Given a unit and slot number, verify whether the slot exists in the unit.
open_error_t openapiCardSupportedCardDescriptionGet(openapiClientHandle_t *client_handle, uint32_t cardId, open_buffdesc *bufd)
Given card index, gets card description.
open_error_t openapiSlotGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t slot, OPEN_BOOL_t *isValid)
Given a unit and slot number, verify whether the slot exists in the unit.
open_error_t openapiSlotAdminModeSet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t slot, OPEN_CONTROL_t adminMode)
Given a unit, slot number and admin mode, configures it on device.
open_error_t openapiUnitMgrStandbySet(openapiClientHandle_t *client_handle, uint32_t standbyUnit, OPEN_BOOL_t standbyAdminMode)
Sets the unit as standby in the stack.
open_error_t openapiUnitMgrUnitTypeGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t *unitType, uint32_t *unitTypeIndex)
Given a unit, gets the unit's type and index.
open_error_t openapiUnitMgrMgmtUnitStatusGet(openapiClientHandle_t *client_handle, uint32_t unit, OPEN_USMDB_UNITMGR_MGMT_FLAG_t *mgmtStatus)
Given a unit, gets the unit's management status.
open_error_t openapiUnitMgrUnitStatusGet(openapiClientHandle_t *client_handle, uint32_t unit, OPEN_USMDB_UNITMGR_STATUS_t *status)
Given a unit, gets the unit's status.
open_error_t openapiSpmFpsConfigQosModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *fpsQosMode)
Get QOS configuration for all front-panel stacking ports stack port.
open_error_t openapiUnitMgrPreconfigModelIdGet(openapiClientHandle_t *client_handle, uint32_t unit, open_buffdesc *modelId)
Given a unit, gets the unit's model identifier string assigned by HPC(Hardware Platform Control) ...
open_error_t openapiCdaTransferFile(openapiClientHandle_t *client_handle, uint32_t unit, open_buffdesc *srcFileName, open_buffdesc *dstFileName)
Given a unit and filename, transfer file from current unit to the specified unit. ...
open_error_t openapiUnitMgrServiceTagGet(openapiClientHandle_t *client_handle, uint32_t unit, open_buffdesc *serviceTag)
Given a unit, gets the service tag.
open_error_t openapiUnitMgrDebianRootfsVerGet(openapiClientHandle_t *client_handle, uint32_t unit, open_buffdesc *version)
Given a unit, get the Debian Rootfs changes snapshot version stored.
open_error_t openapiUnitMgrStandbyGet(openapiClientHandle_t *client_handle, uint32_t *configUnit, uint32_t *standbyUnit, OPEN_BOOL_t *standbyAdminMode)
Gets the configured and standby unit number and admin mode in the stack.
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
open_error_t openapiUnitMgrModelIdentifierGet(openapiClientHandle_t *client_handle, uint32_t unit, open_buffdesc *modelId, open_buffdesc *preconfigModelId)
Given a unit, gets the unit's model identifier string assigned by HPC and pre-configured model identi...
Min Bootcode Version Not Present.
open_error_t openapiSlotPowerModeSet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t slot, OPEN_CONTROL_t powerMode)
Given a unit, slot number and power mode, configures it on device.
open_error_t openapiCardSupportedCardModelIdGet(openapiClientHandle_t *client_handle, uint32_t cardId, open_buffdesc *bufd)
Given card index, gets model Identifier.
open_error_t openapiUnitMgrUnitIsValid(openapiClientHandle_t *client_handle, uint32_t unit, OPEN_BOOL_t *isValid)
Given a unit, verify that it's within the valid range.
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
open_error_t openapiStmUnitActiveTemplateIdGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t *templateId)
Gets active template id of the stack unit.
open_error_t openapiUnitMgrUnitDelete(openapiClientHandle_t *client_handle, uint32_t unit)
Remove a unit only if it is not an active member of the stack.
open_error_t openapiUnitDbEntrySlotsGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t *count, open_buffdesc *bufd)
Given a unit number, it retrieves all slot information from the unit descriptor database.
open_error_t openapiUnitMgrDebianRootfsOperVerGet(openapiClientHandle_t *client_handle, uint32_t unit, open_buffdesc *version)
Given a unit, get the Debian Rootfs changes snapshot version currently in use.
open_error_t openapiUnitMgrUnitUpTimeGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t *upTime)
Given a unit, gets the unit's up time in seconds.
open_error_t openapiUnitMgrDetectCodeVerFlashGet(openapiClientHandle_t *client_handle, uint32_t unit, open_revision_data_t *codeVersion)
Given a unit, gets the unit's version of code in flash.
open_error_t openapiSpmFpsConfigStackingModeGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t slot, uint32_t port, OPEN_BOOL_t *stackPortMode)
Get stacking mode configuration for a front-panel stack port.
open_error_t openapiUnitMgrUnitCreate(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t unitTypeIndex, OPEN_BOOL_t synchMode)
Create a new unit record for unit.
open_error_t openapiUnitMgrMgmtPrefGet(openapiClientHandle_t *client_handle, uint32_t unit, OPEN_USMDB_UNITMGR_MGMTPREF_t *hwPref, OPEN_USMDB_UNITMGR_MGMTPREF_t *adminPref)
Given a unit, gets the unit's hardware and admin management preference.
open_error_t openapiUnitMgrSupportedUnitIdGet(openapiClientHandle_t *client_handle, uint32_t unitTypeIndex, uint32_t *unitType)
Get unit type identifier that corresponds to the index provided.
open_error_t openapiUnitMgrResetUnit(openapiClientHandle_t *client_handle, uint32_t unit)
Given a unit, reboot the corresponding switch.
OPEN_USMDB_UNITMGR_STATUS_t
Stacking Unit Status.
OPEN_UNIT_MGR_SFS_SWITCH_STATUS_t
Stack Firmware Synchronization Status.
open_error_t openapiUnitMgrStackMemberGetNext(openapiClientHandle_t *client_handle, uint32_t startUnit, uint32_t *nextUnit)
Given a unit, gets the next member of the current stack.
open_error_t openapiUnitMgrNumberGet(openapiClientHandle_t *client_handle, uint32_t *unit)
Get the manager's unit number.