Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[master][SAI-PTF] Convert generated enum code from ctypesgen into pythoon enum class #1758

Merged

Conversation

richardyu-ms
Copy link
Collaborator

@richardyu-ms richardyu-ms commented Feb 23, 2023

[SAI-PTF] Convert generated enum code from ctypesgen into pythoon enum class

why
When ctypesgen generated the python code for c++ enum, the python cannot be logged by it enum name, we need to change it to enum class.
the code like

/**
 * @brief SAI common API type
 */
typedef enum _sai_common_api_t
{
	SAI_COMMON_API_CREATE      = 0,
	SAI_COMMON_API_REMOVE      = 1,
	SAI_COMMON_API_SET         = 2,
	SAI_COMMON_API_GET         = 3,
	SAI_COMMON_API_BULK_CREATE = 4,
	SAI_COMMON_API_BULK_REMOVE = 5,
	SAI_COMMON_API_BULK_SET    = 6,
	SAI_COMMON_API_BULK_GET    = 7,
	SAI_COMMON_API_MAX         = 8,
} sai_common_api_t;

originally converted by ctypesgen

enum__sai_common_api_t = c_int# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_CREATE = 0# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_REMOVE = 1# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_SET = 2# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_GET = 3# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_CREATE = 4# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_REMOVE = 5# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_SET = 6# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_GET = 7# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_MAX = 8# /usr/include/sai/saitypes.h: 183

sai_common_api_t = enum__sai_common_api_t# /usr/include/sai/saitypes.h: 183

enum__sai_object_type_t = c_int# /usr/include/sai/saitypes.h: 294

new code

class sai_common_api(SAIEnum):

	SAI_COMMON_API_CREATE = 0# /usr/include/sai/saitypes.h: 183

	SAI_COMMON_API_REMOVE = 1# /usr/include/sai/saitypes.h: 183

	SAI_COMMON_API_SET = 2# /usr/include/sai/saitypes.h: 183

	SAI_COMMON_API_GET = 3# /usr/include/sai/saitypes.h: 183

	SAI_COMMON_API_BULK_CREATE = 4# /usr/include/sai/saitypes.h: 183

	SAI_COMMON_API_BULK_REMOVE = 5# /usr/include/sai/saitypes.h: 183

	SAI_COMMON_API_BULK_SET = 6# /usr/include/sai/saitypes.h: 183

	SAI_COMMON_API_BULK_GET = 7# /usr/include/sai/saitypes.h: 183

	SAI_COMMON_API_MAX = 8# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_CREATE = sai_common_api.SAI_COMMON_API_CREATE
SAI_COMMON_API_REMOVE = sai_common_api.SAI_COMMON_API_REMOVE
SAI_COMMON_API_SET = sai_common_api.SAI_COMMON_API_SET
SAI_COMMON_API_GET = sai_common_api.SAI_COMMON_API_GET
SAI_COMMON_API_BULK_CREATE = sai_common_api.SAI_COMMON_API_BULK_CREATE
SAI_COMMON_API_BULK_REMOVE = sai_common_api.SAI_COMMON_API_BULK_REMOVE
SAI_COMMON_API_BULK_SET = sai_common_api.SAI_COMMON_API_BULK_SET
SAI_COMMON_API_BULK_GET = sai_common_api.SAI_COMMON_API_BULK_GET
SAI_COMMON_API_MAX = sai_common_api.SAI_COMMON_API_MAX

how
Convert the python code after generated from ctypesgen

verify
pipeline
local testing

@richardyu-ms richardyu-ms force-pushed the add_header_converter branch 4 times, most recently from fcc33ad to 8fda361 Compare February 24, 2023 00:25
…m class

why
When ctypesgen generated the python code for c++ enum, the python cannot be logged by it enum name, we need to change it to enum class.
the code like
```C++
/**
 * @brief SAI common API type
 */
typedef enum _sai_common_api_t
{
    SAI_COMMON_API_CREATE      = 0,
    SAI_COMMON_API_REMOVE      = 1,
    SAI_COMMON_API_SET         = 2,
    SAI_COMMON_API_GET         = 3,
    SAI_COMMON_API_BULK_CREATE = 4,
    SAI_COMMON_API_BULK_REMOVE = 5,
    SAI_COMMON_API_BULK_SET    = 6,
    SAI_COMMON_API_BULK_GET    = 7,
    SAI_COMMON_API_MAX         = 8,
} sai_common_api_t;
```
original converted by ctypesgen
```
enum__sai_common_api_t = c_int# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_CREATE = 0# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_REMOVE = 1# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_SET = 2# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_GET = 3# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_CREATE = 4# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_REMOVE = 5# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_SET = 6# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_GET = 7# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_MAX = 8# /usr/include/sai/saitypes.h: 183

sai_common_api_t = enum__sai_common_api_t# /usr/include/sai/saitypes.h: 183

enum__sai_object_type_t = c_int# /usr/include/sai/saitypes.h: 294
```
new code
```
class sai_common_api(SAIEnum):

    SAI_COMMON_API_CREATE = 0# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_REMOVE = 1# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_SET = 2# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_GET = 3# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_BULK_CREATE = 4# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_BULK_REMOVE = 5# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_BULK_SET = 6# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_BULK_GET = 7# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_MAX = 8# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_CREATE = sai_common_api.SAI_COMMON_API_CREATE
SAI_COMMON_API_REMOVE = sai_common_api.SAI_COMMON_API_REMOVE
SAI_COMMON_API_SET = sai_common_api.SAI_COMMON_API_SET
SAI_COMMON_API_GET = sai_common_api.SAI_COMMON_API_GET
SAI_COMMON_API_BULK_CREATE = sai_common_api.SAI_COMMON_API_BULK_CREATE
SAI_COMMON_API_BULK_REMOVE = sai_common_api.SAI_COMMON_API_BULK_REMOVE
SAI_COMMON_API_BULK_SET = sai_common_api.SAI_COMMON_API_BULK_SET
SAI_COMMON_API_BULK_GET = sai_common_api.SAI_COMMON_API_BULK_GET
SAI_COMMON_API_MAX = sai_common_api.SAI_COMMON_API_MAX
```

how
Convert the python code after generated from ctypesgen

verify
pipeline
local testing

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

reformat code

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

refactor code

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
@richardyu-ms richardyu-ms requested a review from lolyu February 24, 2023 03:32
@richardyu-ms richardyu-ms changed the title [SAI-PTF] Convert generated enum code from ctypesgen into pythoon enum class [master][SAI-PTF] Convert generated enum code from ctypesgen into pythoon enum class Feb 24, 2023
@richardyu-ms richardyu-ms merged commit f3d0061 into opencomputeproject:master Feb 24, 2023
@richardyu-ms richardyu-ms deleted the add_header_converter branch February 24, 2023 05:28
richardyu-ms added a commit that referenced this pull request Feb 24, 2023
…en into pythoon enum class (#1760)

why
cherry-pick from #1758
When ctypesgen generated the python code for c++ enum, the python cannot be logged by it enum name, we need to change it to enum class.
the code like
```C++
/**
 * @brief SAI common API type
 */
typedef enum _sai_common_api_t
{
    SAI_COMMON_API_CREATE      = 0,
    SAI_COMMON_API_REMOVE      = 1,
    SAI_COMMON_API_SET         = 2,
    SAI_COMMON_API_GET         = 3,
    SAI_COMMON_API_BULK_CREATE = 4,
    SAI_COMMON_API_BULK_REMOVE = 5,
    SAI_COMMON_API_BULK_SET    = 6,
    SAI_COMMON_API_BULK_GET    = 7,
    SAI_COMMON_API_MAX         = 8,
} sai_common_api_t;
```
original converted by ctypesgen
```
enum__sai_common_api_t = c_int# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_CREATE = 0# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_REMOVE = 1# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_SET = 2# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_GET = 3# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_CREATE = 4# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_REMOVE = 5# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_SET = 6# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_GET = 7# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_MAX = 8# /usr/include/sai/saitypes.h: 183

sai_common_api_t = enum__sai_common_api_t# /usr/include/sai/saitypes.h: 183

enum__sai_object_type_t = c_int# /usr/include/sai/saitypes.h: 294
```
new code
```
class sai_common_api(SAIEnum):

    SAI_COMMON_API_CREATE = 0# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_REMOVE = 1# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_SET = 2# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_GET = 3# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_BULK_CREATE = 4# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_BULK_REMOVE = 5# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_BULK_SET = 6# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_BULK_GET = 7# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_MAX = 8# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_CREATE = sai_common_api.SAI_COMMON_API_CREATE
SAI_COMMON_API_REMOVE = sai_common_api.SAI_COMMON_API_REMOVE
SAI_COMMON_API_SET = sai_common_api.SAI_COMMON_API_SET
SAI_COMMON_API_GET = sai_common_api.SAI_COMMON_API_GET
SAI_COMMON_API_BULK_CREATE = sai_common_api.SAI_COMMON_API_BULK_CREATE
SAI_COMMON_API_BULK_REMOVE = sai_common_api.SAI_COMMON_API_BULK_REMOVE
SAI_COMMON_API_BULK_SET = sai_common_api.SAI_COMMON_API_BULK_SET
SAI_COMMON_API_BULK_GET = sai_common_api.SAI_COMMON_API_BULK_GET
SAI_COMMON_API_MAX = sai_common_api.SAI_COMMON_API_MAX
```

how
Convert the python code after generated from ctypesgen

verify
pipeline
local testing



reformat



refactor code

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
richardyu-ms added a commit that referenced this pull request Feb 24, 2023
…n into pythoon enum class (#1761)

why
cherry-pick from #1758
When ctypesgen generated the python code for c++ enum, the python cannot be logged by it enum name, we need to change it to enum class.
the code like
```C++
/**
 * @brief SAI common API type
 */
typedef enum _sai_common_api_t
{
    SAI_COMMON_API_CREATE      = 0,
    SAI_COMMON_API_REMOVE      = 1,
    SAI_COMMON_API_SET         = 2,
    SAI_COMMON_API_GET         = 3,
    SAI_COMMON_API_BULK_CREATE = 4,
    SAI_COMMON_API_BULK_REMOVE = 5,
    SAI_COMMON_API_BULK_SET    = 6,
    SAI_COMMON_API_BULK_GET    = 7,
    SAI_COMMON_API_MAX         = 8,
} sai_common_api_t;
```
original converted by ctypesgen
```
enum__sai_common_api_t = c_int# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_CREATE = 0# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_REMOVE = 1# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_SET = 2# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_GET = 3# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_CREATE = 4# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_REMOVE = 5# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_SET = 6# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_GET = 7# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_MAX = 8# /usr/include/sai/saitypes.h: 183

sai_common_api_t = enum__sai_common_api_t# /usr/include/sai/saitypes.h: 183

enum__sai_object_type_t = c_int# /usr/include/sai/saitypes.h: 294
```
new code
```
class sai_common_api(SAIEnum):

    SAI_COMMON_API_CREATE = 0# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_REMOVE = 1# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_SET = 2# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_GET = 3# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_BULK_CREATE = 4# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_BULK_REMOVE = 5# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_BULK_SET = 6# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_BULK_GET = 7# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_MAX = 8# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_CREATE = sai_common_api.SAI_COMMON_API_CREATE
SAI_COMMON_API_REMOVE = sai_common_api.SAI_COMMON_API_REMOVE
SAI_COMMON_API_SET = sai_common_api.SAI_COMMON_API_SET
SAI_COMMON_API_GET = sai_common_api.SAI_COMMON_API_GET
SAI_COMMON_API_BULK_CREATE = sai_common_api.SAI_COMMON_API_BULK_CREATE
SAI_COMMON_API_BULK_REMOVE = sai_common_api.SAI_COMMON_API_BULK_REMOVE
SAI_COMMON_API_BULK_SET = sai_common_api.SAI_COMMON_API_BULK_SET
SAI_COMMON_API_BULK_GET = sai_common_api.SAI_COMMON_API_BULK_GET
SAI_COMMON_API_MAX = sai_common_api.SAI_COMMON_API_MAX
```

how
Convert the python code after generated from ctypesgen

verify
pipeline
local testing



reformat



refactor code

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
richardyu-ms added a commit that referenced this pull request Feb 24, 2023
…en into pythoon enum class (#1762)

why
cherry-pick from #1758
When ctypesgen generated the python code for c++ enum, the python cannot be logged by it enum name, we need to change it to enum class.
the code like
```C++
/**
 * @brief SAI common API type
 */
typedef enum _sai_common_api_t
{
    SAI_COMMON_API_CREATE      = 0,
    SAI_COMMON_API_REMOVE      = 1,
    SAI_COMMON_API_SET         = 2,
    SAI_COMMON_API_GET         = 3,
    SAI_COMMON_API_BULK_CREATE = 4,
    SAI_COMMON_API_BULK_REMOVE = 5,
    SAI_COMMON_API_BULK_SET    = 6,
    SAI_COMMON_API_BULK_GET    = 7,
    SAI_COMMON_API_MAX         = 8,
} sai_common_api_t;
```
original converted by ctypesgen
```
enum__sai_common_api_t = c_int# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_CREATE = 0# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_REMOVE = 1# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_SET = 2# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_GET = 3# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_CREATE = 4# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_REMOVE = 5# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_SET = 6# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_GET = 7# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_MAX = 8# /usr/include/sai/saitypes.h: 183

sai_common_api_t = enum__sai_common_api_t# /usr/include/sai/saitypes.h: 183

enum__sai_object_type_t = c_int# /usr/include/sai/saitypes.h: 294
```
new code
```
class sai_common_api(SAIEnum):

    SAI_COMMON_API_CREATE = 0# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_REMOVE = 1# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_SET = 2# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_GET = 3# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_BULK_CREATE = 4# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_BULK_REMOVE = 5# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_BULK_SET = 6# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_BULK_GET = 7# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_MAX = 8# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_CREATE = sai_common_api.SAI_COMMON_API_CREATE
SAI_COMMON_API_REMOVE = sai_common_api.SAI_COMMON_API_REMOVE
SAI_COMMON_API_SET = sai_common_api.SAI_COMMON_API_SET
SAI_COMMON_API_GET = sai_common_api.SAI_COMMON_API_GET
SAI_COMMON_API_BULK_CREATE = sai_common_api.SAI_COMMON_API_BULK_CREATE
SAI_COMMON_API_BULK_REMOVE = sai_common_api.SAI_COMMON_API_BULK_REMOVE
SAI_COMMON_API_BULK_SET = sai_common_api.SAI_COMMON_API_BULK_SET
SAI_COMMON_API_BULK_GET = sai_common_api.SAI_COMMON_API_BULK_GET
SAI_COMMON_API_MAX = sai_common_api.SAI_COMMON_API_MAX
```

how
Convert the python code after generated from ctypesgen

verify
pipeline
local testing



reformat code



refactor code

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
JaiOCP pushed a commit to JaiOCP/SAI that referenced this pull request Mar 10, 2023
…m class (opencomputeproject#1758)

why
When ctypesgen generated the python code for c++ enum, the python cannot be logged by it enum name, we need to change it to enum class.
the code like
```C++
/**
 * @brief SAI common API type
 */
typedef enum _sai_common_api_t
{
    SAI_COMMON_API_CREATE      = 0,
    SAI_COMMON_API_REMOVE      = 1,
    SAI_COMMON_API_SET         = 2,
    SAI_COMMON_API_GET         = 3,
    SAI_COMMON_API_BULK_CREATE = 4,
    SAI_COMMON_API_BULK_REMOVE = 5,
    SAI_COMMON_API_BULK_SET    = 6,
    SAI_COMMON_API_BULK_GET    = 7,
    SAI_COMMON_API_MAX         = 8,
} sai_common_api_t;
```
original converted by ctypesgen
```
enum__sai_common_api_t = c_int# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_CREATE = 0# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_REMOVE = 1# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_SET = 2# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_GET = 3# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_CREATE = 4# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_REMOVE = 5# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_SET = 6# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_BULK_GET = 7# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_MAX = 8# /usr/include/sai/saitypes.h: 183

sai_common_api_t = enum__sai_common_api_t# /usr/include/sai/saitypes.h: 183

enum__sai_object_type_t = c_int# /usr/include/sai/saitypes.h: 294
```
new code
```
class sai_common_api(SAIEnum):

    SAI_COMMON_API_CREATE = 0# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_REMOVE = 1# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_SET = 2# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_GET = 3# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_BULK_CREATE = 4# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_BULK_REMOVE = 5# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_BULK_SET = 6# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_BULK_GET = 7# /usr/include/sai/saitypes.h: 183

    SAI_COMMON_API_MAX = 8# /usr/include/sai/saitypes.h: 183

SAI_COMMON_API_CREATE = sai_common_api.SAI_COMMON_API_CREATE
SAI_COMMON_API_REMOVE = sai_common_api.SAI_COMMON_API_REMOVE
SAI_COMMON_API_SET = sai_common_api.SAI_COMMON_API_SET
SAI_COMMON_API_GET = sai_common_api.SAI_COMMON_API_GET
SAI_COMMON_API_BULK_CREATE = sai_common_api.SAI_COMMON_API_BULK_CREATE
SAI_COMMON_API_BULK_REMOVE = sai_common_api.SAI_COMMON_API_BULK_REMOVE
SAI_COMMON_API_BULK_SET = sai_common_api.SAI_COMMON_API_BULK_SET
SAI_COMMON_API_BULK_GET = sai_common_api.SAI_COMMON_API_BULK_GET
SAI_COMMON_API_MAX = sai_common_api.SAI_COMMON_API_MAX
```

how
Convert the python code after generated from ctypesgen

verify
pipeline
local testing



reformat code



refactor code

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants