Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.6.0.3
|
Macros | |
#define | OPEN_IMAGE_NAME_NONE "none" |
#define | OPEN_UBOOT_VERSION_LENGTH 17 /* UBOOT_VERSION_LENGTH + 1 */ |
Functions | |
open_error_t | openapiBootCodeUpdate (openapiClientHandle_t *client_handle, uint32_t unit) |
Updates the bootcode from the currently activated image. More... | |
open_error_t | openapiBootCodeVersion (openapiClientHandle_t *client_handle, open_buffdesc *version) |
Gets the boot code version from the current active image. More... | |
open_error_t | openapiImageActivate (openapiClientHandle_t *client_handle, uint32_t unit, open_buffdesc *imageLabel, OPEN_BOOL_t updateBootCode) |
Sets the specified image as the active image for the subsequent re-boots. More... | |
open_error_t | openapiImageDelete (openapiClientHandle_t *client_handle, uint32_t unit, open_buffdesc *imageLabel) |
Deletes the specified image. More... | |
open_error_t | openapiImageDescrGet (openapiClientHandle_t *client_handle, open_buffdesc *imageLabel, open_buffdesc *imageDescr) |
Get the text description for a given image. More... | |
open_error_t | openapiImageDescrSet (openapiClientHandle_t *client_handle, open_buffdesc *imageLabel, open_buffdesc *imageDescr) |
Set the text description for a given image. More... | |
open_error_t | openapiImageLabelIsValid (openapiClientHandle_t *client_handle, open_buffdesc *imageLabel, OPEN_BOOL_t *isValid) |
Determines if the image label refers to a valid image name. More... | |
open_error_t | openapiImageLabelsGet (openapiClientHandle_t *client_handle, open_buffdesc *activeLabel, open_buffdesc *backupLabel) |
Get the label names for both active and backup images. More... | |
open_error_t | openapiImageNamesGet (openapiClientHandle_t *client_handle, uint32_t unit, open_buffdesc *activeImage, open_buffdesc *backupImage, open_buffdesc *activatedImage) |
Get the image names for both active, backup, and activated. More... | |
open_error_t | openapiImageUpgrade (openapiClientHandle_t *client_handle, open_buffdesc *imagePath, open_buffdesc *imageLabel) |
Get a locally copied image path, perform validation on it and on success, upgrade the switch with this image. More... | |
open_error_t openapiBootCodeUpdate | ( | openapiClientHandle_t * | client_handle, |
uint32_t | unit | ||
) |
Updates the bootcode from the currently activated image.
[in] | client_handle | Client handle from registration API. |
[in] | unit | Unit number |
- | Minimum value 1 | |
- | Maximum value openapiUnitMgrUnitMaxGet() |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters is not defined correctly. |
OPEN_E_UNAVAIL | Not supported for this platform. |
OpEN API Version: 1.8
open_error_t openapiBootCodeVersion | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | version | ||
) |
Gets the boot code version from the current active image.
[in] | client_handle | Client handle from registration API. |
[out] | version | Boot code version |
OPEN_E_NONE | Boot code version get successful. |
OPEN_E_FAIL | Boot code version get failed. |
OPEN_E_PARAM | Error in parameter passed. |
OpEN API Version: 1.19
open_error_t openapiImageActivate | ( | openapiClientHandle_t * | client_handle, |
uint32_t | unit, | ||
open_buffdesc * | imageLabel, | ||
OPEN_BOOL_t | updateBootCode | ||
) |
Sets the specified image as the active image for the subsequent re-boots.
[in] | client_handle | Client handle from registration API. |
[in] | unit | Unit number |
- | Minimum value 1 | |
- | Maximum value openapiUnitMgrUnitMaxGet() | |
[in] | imageLabel | Image label name |
- | Minimum length 1 | |
- | Maximum value openapiImageFileNameMaxLengthGet() | |
[in] | updateBootCode | OPEN_TRUE to activate, else OPEN_FALSE |
OPEN_E_NONE | if text set successful. |
OPEN_E_FAIL | if text set failed. |
OPEN_E_PARAM | if parameters is not defined correctly. |
OPEN_E_NOT_FOUND | if image not found. |
OPEN_E_UNAVAIL | if the specified image is not the backup image |
OPEN_E_EXISTS | if the image is already activated |
OpEN API Version: 1.8
open_error_t openapiImageDelete | ( | openapiClientHandle_t * | client_handle, |
uint32_t | unit, | ||
open_buffdesc * | imageLabel | ||
) |
Deletes the specified image.
[in] | client_handle | Client handle from registration API. |
[in] | unit | Unit number |
- | Minimum value 1 | |
- | Maximum value openapiUnitMgrUnitMaxGet() | |
[in] | imageLabel | Image label name |
- | Minimum length 1 | |
- | Maximum value openapiImageFileNameMaxLengthGet() |
OPEN_E_NONE | if text set successful. |
OPEN_E_FAIL | if text set failed. |
OPEN_E_PARAM | if parameters is not defined correctly. |
OPEN_E_NOT_FOUND | if image not found. |
OPEN_E_UNAVAIL | if the specified image is active/activated. |
OpEN API Version: 1.8
open_error_t openapiImageDescrGet | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | imageLabel, | ||
open_buffdesc * | imageDescr | ||
) |
Get the text description for a given image.
[in] | client_handle | Client handle from registration API |
[in] | imageLabel | Image label name |
- | Buffer size should be openapiImageFileNameMaxLengthGet() | |
[out] | imageDescr | Associated text |
- | Buffer size should be OPENAPI_DEFAULT_IMAGE_DESCR_MAX |
OPEN_E_NONE | if text get successful. |
OPEN_E_FAIL | if text get failed. |
OPEN_E_PARAM | if parameters is not defined correctly. |
OPEN_E_NOT_FOUND | if image not found. |
OpEN API Version: 1.8
open_error_t openapiImageDescrSet | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | imageLabel, | ||
open_buffdesc * | imageDescr | ||
) |
Set the text description for a given image.
[in] | client_handle | Client handle from registration API |
[in] | imageLabel | Image label name |
- | Minimum length 1 | |
- | Maximum value openapiImageFileNameMaxLengthGet() | |
[in] | imageDescr | Associated text |
- | Minimum length 1 | |
- | Maximum length OPENAPI_DEFAULT_IMAGE_DESCR_MAX |
OPEN_E_NONE | if text set successful. |
OPEN_E_FAIL | if text set failed. |
OPEN_E_PARAM | if parameters is not defined correctly. |
OPEN_E_NOT_FOUND | if image not found. |
OPEN_E_UNAVAIL | The image is currently in-use. |
OpEN API Version: 1.8
open_error_t openapiImageLabelIsValid | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | imageLabel, | ||
OPEN_BOOL_t * | isValid | ||
) |
Determines if the image label refers to a valid image name.
[in] | client_handle | Client handle from registration API. |
[in] | imageLabel | Image label name |
- | Minimum length 1 | |
- | Maximum value openapiImageFileNameMaxLengthGet() | |
[out] | isValid | Returns OPEN_TRUE if image label is valid, else OPEN_FALSE if not |
OPEN_E_NONE | validation was successful. isValid contains a legitimate value only in this case. |
OPEN_E_FAIL | validation failed. |
OPEN_E_PARAM | parameters were not defined correctly. |
OpEN API Version: 1.8
open_error_t openapiImageLabelsGet | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | activeLabel, | ||
open_buffdesc * | backupLabel | ||
) |
Get the label names for both active and backup images.
[in] | client_handle | Client handle from registration API |
[out] | activeLabel | Active label name |
[out] | backupLabel | Backup label name |
OPEN_E_NONE | if label get successful. |
OPEN_E_FAIL | if label get failed. |
OPEN_E_PARAM | if parameters is not defined correctly. |
OpEN API Version: 1.8
open_error_t openapiImageNamesGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | unit, | ||
open_buffdesc * | activeImage, | ||
open_buffdesc * | backupImage, | ||
open_buffdesc * | activatedImage | ||
) |
Get the image names for both active, backup, and activated.
[in] | client_handle | Client handle from registration API. |
[in] | unit | Unit number |
- | Minimum value 1 | |
- | Maximum value openapiUnitMgrUnitMaxGet() | |
[out] | activeImage | Active image name |
[out] | backupImage | Backup image name |
[out] | activatedImage | Activated image name |
OPEN_E_NONE | if name get successful. |
OPEN_E_FAIL | if name get failed. |
OPEN_E_PARAM | if parameters is not defined correctly. |
OpEN API Version: 1.8
open_error_t openapiImageUpgrade | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | imagePath, | ||
open_buffdesc * | imageLabel | ||
) |
Get a locally copied image path, perform validation on it and on success, upgrade the switch with this image.
[in] | client_handle | Client handle from registration API. |
[in] | imagePath | Complete path for the image in Linux |
[in] | imageLabel | Active or Backup image label |
OPEN_E_NONE | if image validation and upgrade are successful. |
OPEN_E_FAIL | if image validation or upgrade fails. |
OPEN_E_PARAM | if parameters is not defined correctly. |
OPEN_E_UNAVAIL | if platform does not support function. |
OpEN API Version: 1.14