Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.12.0.1
openapi_image.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-2023 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_image.h
28 *
29 * @purpose Image Management and Configuration
30 *
31 * @component OpEN
32 *
33 * @create 11/13/2015
34 *
35 * @end
36 *
37 **********************************************************************/
38 #ifndef OPENAPI_IMAGE_H_INCLUDED
39 #define OPENAPI_IMAGE_H_INCLUDED
40 
41 #include "openapi_common.h"
42 
43 #define OPEN_UBOOT_VERSION_LENGTH 17 /* UBOOT_VERSION_LENGTH + 1 */
44 
45 #define OPEN_IMAGE_NAME_NONE "none"
46 
47 /*****************************************************************/
65  uint32_t unit);
66 
67 /*****************************************************************/
90  uint32_t unit,
91  open_buffdesc *imageLabel,
92  OPEN_BOOL_t updateBootCode);
93 
94 /*****************************************************************/
120  uint32_t unit,
121  open_buffdesc *imageLabel);
122 
123 /*****************************************************************/
141  open_buffdesc *imageLabel,
142  open_buffdesc *imageDescr);
143 
144 /*****************************************************************/
165  open_buffdesc *imageLabel,
166  open_buffdesc *imageDescr);
167 
168 /*****************************************************************/
204  open_buffdesc *imageLabel,
205  OPEN_BOOL_t *isValid);
206 
207 /*****************************************************************/
228  open_buffdesc *activeLabel,
229  open_buffdesc *backupLabel);
230 
231 /*****************************************************************/
256  uint32_t unit,
257  open_buffdesc *activeImage,
258  open_buffdesc *backupImage,
259  open_buffdesc *activatedImage);
260 
261 /*****************************************************************/
291  open_buffdesc *imagePath,
292  open_buffdesc *imageLabel);
293 
294 /*****************************************************************/
308  open_buffdesc *version);
309 
310 /*****************************************************************/
337  uint32_t unit,
338  open_buffdesc *activeImageVersion,
339  open_buffdesc *backupImageVersion,
340  open_buffdesc *currentActiveImage,
341  open_buffdesc *nextActiveImage);
342 #endif /* OPENAPI_IMAGE_H_INCLUDED */
343 
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 thi...
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.
open_error_t openapiBootCodeVersion(openapiClientHandle_t *client_handle, open_buffdesc *version)
Gets the boot code version from the current active image.
open_error_t openapiImageLabelsGet(openapiClientHandle_t *client_handle, open_buffdesc *activeLabel, open_buffdesc *backupLabel)
Get the label names for both active and backup images.
open_error_t
OPEN uses these enumerators to indicate the error codes.
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.
open_error_t openapiImageDelete(openapiClientHandle_t *client_handle, uint32_t unit, open_buffdesc *imageLabel)
Deletes the specified image.
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
open_error_t openapiImageVersionAndNameGet(openapiClientHandle_t *client_handle, uint32_t unit, open_buffdesc *activeImageVersion, open_buffdesc *backupImageVersion, open_buffdesc *currentActiveImage, open_buffdesc *nextActiveImage)
Get the image version name for both active and backup images.
open_error_t openapiBootCodeUpdate(openapiClientHandle_t *client_handle, uint32_t unit)
Updates the bootcode from the currently activated image.
open_error_t openapiImageDescrGet(openapiClientHandle_t *client_handle, open_buffdesc *imageLabel, open_buffdesc *imageDescr)
Get the text description for a given image.
open_error_t openapiImageDescrSet(openapiClientHandle_t *client_handle, open_buffdesc *imageLabel, open_buffdesc *imageDescr)
Set the text description for a given image.
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.