SAI Metadata
|
Defines attribute metadata. More...
#include <saimetadatatypes.h>
Public Attributes | |
sai_object_type_t | objecttype |
Specifies valid SAI object type. | |
sai_attr_id_t | attrid |
Specifies valid attribute id for this object type. | |
const char *const | attridname |
Specifies valid attribute id name for this object type. | |
const char *const | brief |
Extracted brief description from Doxygen comment. | |
sai_attr_value_type_t | attrvaluetype |
Specifies attribute value type for this attribute. | |
sai_attr_flags_t | flags |
Specifies flags for this attribute. | |
const sai_object_type_t *const | allowedobjecttypes |
Specified allowed object types. | |
size_t | allowedobjecttypeslength |
Length of allowed object types. | |
bool | allowrepetitiononlist |
Allows repetitions on object list. | |
bool | allowmixedobjecttypes |
Allows mixed object id types on list like port and LAG. | |
bool | allowemptylist |
Allows empty list to be set on list value type. | |
bool | allownullobjectid |
Allows null object id to be passed. | |
bool | isoidattribute |
Determines whether attribute contains OIDs. | |
const sai_default_value_type_t | defaultvaluetype |
Specifies default value type. | |
const sai_attribute_value_t *const | defaultvalue |
Provides default value. | |
sai_object_type_t | defaultvalueobjecttype |
Default value object type. | |
sai_attr_id_t | defaultvalueattrid |
Default value object id. | |
bool | storedefaultvalue |
Indicates whether default value needs to be saved. | |
bool | isenum |
Indicates whether attribute is enum value. | |
bool | isenumlist |
Indicates whether attribute is enum list value. | |
const sai_enum_metadata_t *const | enummetadata |
Provides enum metadata if attribute is enum or enum list. | |
sai_attr_condition_type_t | conditiontype |
Specifies condition type of attribute. | |
const sai_attr_condition_t *const *const | conditions |
Provide conditions for attribute under which this attribute will be mandatory on create. | |
size_t | conditionslength |
Length of the conditions. | |
bool | isconditional |
Indicates whether attribute is conditional. | |
sai_attr_condition_type_t | validonlytype |
Specifies valid only type of attribute. | |
const sai_attr_condition_t *const *const | validonly |
Provides conditions when this attribute is valid. | |
size_t | validonlylength |
Length of the valid only when conditions. | |
bool | isvalidonly |
Indicates whether attribute is valid only. | |
bool | getsave |
When calling GET API result will be put in local db for future use (extra logic). | |
bool | isvlan |
Determines whether value is vlan. | |
bool | isaclfield |
Determines whether attribute is ACL field. | |
bool | isaclaction |
Determines whether attribute is ACL action. | |
bool | isaclmask |
Determines whether attribute is ACL mask. | |
bool | ismandatoryoncreate |
Determines whether attribute is mandatory on create. | |
bool | iscreateonly |
Determines whether attribute is create only. | |
bool | iscreateandset |
Determines whether attribute is create and set. | |
bool | isreadonly |
Determines whether attribute is read only. | |
bool | iskey |
Determines whether attribute is key. | |
bool | isprimitive |
Determines whether attribute value is primitive. | |
int | notificationtype |
Notification type. | |
bool | iscallback |
Is callback function. | |
int | pointertype |
Pointer type. | |
const sai_attr_capability_metadata_t *const *const | capability |
Attribute capabilities. | |
size_t | capabilitylength |
Length of attribute capabilities. | |
bool | isextensionattr |
Indicates whether attribute is extension attribute. | |
bool | isresourcetype |
Tells if attribute is a resource type. | |
bool | isdeprecated |
Indicates whether attribute is deprecated. | |
bool | isconditionrelaxed |
Indicates whether condition is relaxed. | |
Defines attribute metadata.
Definition at line 914 of file saimetadatatypes.h.
const sai_object_type_t* const _sai_attr_metadata_t::allowedobjecttypes |
Specified allowed object types.
If object attr value type is OBJECT_ID this list specifies what object type can be used.
Definition at line 952 of file saimetadatatypes.h.
size_t _sai_attr_metadata_t::allowedobjecttypeslength |
Length of allowed object types.
Definition at line 957 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::allowemptylist |
Allows empty list to be set on list value type.
Definition at line 975 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::allowmixedobjecttypes |
Allows mixed object id types on list like port and LAG.
Definition at line 970 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::allownullobjectid |
Allows null object id to be passed.
If object attr value type is OBJECT_ID it tells whether SAI_NULL_OBJECT_ID can be used as actual id.
Definition at line 984 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::allowrepetitiononlist |
Allows repetitions on object list.
Can be useful when using object id list.
Definition at line 964 of file saimetadatatypes.h.
sai_attr_id_t _sai_attr_metadata_t::attrid |
Specifies valid attribute id for this object type.
Definition at line 924 of file saimetadatatypes.h.
const char* const _sai_attr_metadata_t::attridname |
Specifies valid attribute id name for this object type.
Definition at line 929 of file saimetadatatypes.h.
sai_attr_value_type_t _sai_attr_metadata_t::attrvaluetype |
Specifies attribute value type for this attribute.
Definition at line 939 of file saimetadatatypes.h.
const char* const _sai_attr_metadata_t::brief |
Extracted brief description from Doxygen comment.
Definition at line 934 of file saimetadatatypes.h.
const sai_attr_capability_metadata_t* const* const _sai_attr_metadata_t::capability |
Attribute capabilities.
Represents attribute capability for each specific ASIC. Since each vendor may support different capabilities for each attribute, this field is optional. Also, since SAI API supports multiple switches (switch ids) at the same time, then switches may support different capabilities on different attributes. Vendor ID is provided inside capability struct for difference.
This data is designed for vendor internal usage.
Definition at line 1245 of file saimetadatatypes.h.
size_t _sai_attr_metadata_t::capabilitylength |
Length of attribute capabilities.
Definition at line 1250 of file saimetadatatypes.h.
const sai_attr_condition_t* const* const _sai_attr_metadata_t::conditions |
Provide conditions for attribute under which this attribute will be mandatory on create.
Definition at line 1085 of file saimetadatatypes.h.
size_t _sai_attr_metadata_t::conditionslength |
Length of the conditions.
Definition at line 1090 of file saimetadatatypes.h.
sai_attr_condition_type_t _sai_attr_metadata_t::conditiontype |
Specifies condition type of attribute.
Definition at line 1079 of file saimetadatatypes.h.
const sai_attribute_value_t* const _sai_attr_metadata_t::defaultvalue |
Provides default value.
If creation flag is CREATE_ONLY or CREATE_AND_SET then default value must be provided for attribute.
Definition at line 1012 of file saimetadatatypes.h.
sai_attr_id_t _sai_attr_metadata_t::defaultvalueattrid |
Default value object id.
Required when default value type is pointing to different object attribute.
Definition at line 1028 of file saimetadatatypes.h.
sai_object_type_t _sai_attr_metadata_t::defaultvalueobjecttype |
Default value object type.
Required when default value type is pointing to different object type.
Definition at line 1020 of file saimetadatatypes.h.
const sai_default_value_type_t _sai_attr_metadata_t::defaultvaluetype |
Specifies default value type.
Default value can be a const assigned by switch (which is not known at compile), can be obtained by GET API, or a min/max value in specific range also assigned by switch at run time.
Default value can be also an object id.
Definition at line 1001 of file saimetadatatypes.h.
const sai_enum_metadata_t* const _sai_attr_metadata_t::enummetadata |
Provides enum metadata if attribute is enum or enum list.
Definition at line 1070 of file saimetadatatypes.h.
sai_attr_flags_t _sai_attr_metadata_t::flags |
Specifies flags for this attribute.
Definition at line 944 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::getsave |
When calling GET API result will be put in local db for future use (extra logic).
This flag must be taken with care, since when set on dynamic attribute it may provide inconsistent data.
Value should be updated after successful set or remove.
Definition at line 1141 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::isaclaction |
Determines whether attribute is ACL action.
This will become handy for fast determination whether default value is present.
Definition at line 1164 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::isaclfield |
Determines whether attribute is ACL field.
This will become handy for fast determination whether default value is present.
Definition at line 1156 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::isaclmask |
Determines whether attribute is ACL mask.
Can only be set for ACL table mask
Definition at line 1171 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::iscallback |
Is callback function.
Set to true if attribute is callback function but not notification.
Definition at line 1221 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::isconditional |
Indicates whether attribute is conditional.
Definition at line 1095 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::isconditionrelaxed |
Indicates whether condition is relaxed.
If attribute is MANDATORY_ON_CREATE and relaxed flag is set to true then given attribute can be passed to create function even if the condition is not met. If relaxed flag is set to false, then attribute is forbidden to be passed to create function is condition is not met.
Definition at line 1281 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::iscreateandset |
Determines whether attribute is create and set.
Definition at line 1186 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::iscreateonly |
Determines whether attribute is create only.
Definition at line 1181 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::isdeprecated |
Indicates whether attribute is deprecated.
If true, attribute is deprecated and should not be used. Is up to vendor to check this field and give run time warning about this attribute.
Definition at line 1271 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::isenum |
Indicates whether attribute is enum value.
Attribute type must be set as INT32.
Definition at line 1054 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::isenumlist |
Indicates whether attribute is enum list value.
Attribute value must be set INT32 LIST.
Definition at line 1064 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::isextensionattr |
Indicates whether attribute is extension attribute.
Definition at line 1255 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::iskey |
Determines whether attribute is key.
Definition at line 1196 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::ismandatoryoncreate |
Determines whether attribute is mandatory on create.
Definition at line 1176 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::isoidattribute |
Determines whether attribute contains OIDs.
Definition at line 989 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::isprimitive |
Determines whether attribute value is primitive.
Primitive values will not contain any pointers so value can be transferred by regular assignment operator.
Definition at line 1204 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::isreadonly |
Determines whether attribute is read only.
Definition at line 1191 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::isresourcetype |
Tells if attribute is a resource type.
If true, attribute is used in getting object type availability to distinguish between pools of resources.
Definition at line 1263 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::isvalidonly |
Indicates whether attribute is valid only.
Definition at line 1130 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::isvlan |
Determines whether value is vlan.
Can only be set on sai_uint16_t value type.
Definition at line 1148 of file saimetadatatypes.h.
int _sai_attr_metadata_t::notificationtype |
Notification type.
If attribute value type is POINTER then attribute value is pointer to switch notification. Enum sai_switch_notification_type_t is auto generated so it can't be used here, int will be used instead.
Definition at line 1214 of file saimetadatatypes.h.
sai_object_type_t _sai_attr_metadata_t::objecttype |
Specifies valid SAI object type.
Definition at line 919 of file saimetadatatypes.h.
int _sai_attr_metadata_t::pointertype |
Pointer type.
If attribute value type is POINTER then attribute value is pointer to switch. Enum sai_switch_pointer_type_t is auto generated so it can't be used here, int will be used instead.
Definition at line 1231 of file saimetadatatypes.h.
bool _sai_attr_metadata_t::storedefaultvalue |
Indicates whether default value needs to be saved.
When switch is created some objects are created internally like vlan 1, vlan members, bridge port, virtual router etc. Some of those objects has attributes assigned by vendor like switch MAC address. When user changes that value then there is no way to go back and set it's previous value if user didn't query it first. This member will indicate whether user needs to query it first (and store) before change, if he wants to bring original attribute value later.
Some of those attributes can be OID attributes with flags MANDATORY_ON_CREATE and CREATE_AND_SET.
Definition at line 1044 of file saimetadatatypes.h.
const sai_attr_condition_t* const* const _sai_attr_metadata_t::validonly |
Provides conditions when this attribute is valid.
If conditions are specified (OR condition assumed) then this attribute is only valid when different attribute has condition value set. Valid only attribute (against we check) can be dynamic so this attribute can't be marked as MANDATORY on create since default value will be required.
Definition at line 1120 of file saimetadatatypes.h.
size_t _sai_attr_metadata_t::validonlylength |
Length of the valid only when conditions.
Definition at line 1125 of file saimetadatatypes.h.
sai_attr_condition_type_t _sai_attr_metadata_t::validonlytype |
Specifies valid only type of attribute.
Definition at line 1104 of file saimetadatatypes.h.