This repository hosts the DASH API definition for the SONiC project. The schema of DASH APP DB is at DASH APP DB and all entries of DASH APP DB will be encoded as protobuf.
- File name use underscore case, E.G.
acl_rule.proto
- All file except common utility should include and only include one message of entry and one message of its key.
- Message name of entry use camel case. E.G.
AclRule
. - Message name of entry key use the entry name with a fixed postfix
Key
. E.G.AclRuleKey
. - If the value of entry is a list, the item use the entry name with a fixed postfix
Item
. E.G.RouteTypeItem
. - Member variable use underscore case. E.G.
src_addr
. - For enumerations type, the enum name use camel case, E.G.
IpVersion
- The field of enum use full capital with underscore case, and the enum name use as the prefix for each field. E.G.
IP_VERSION_IPV4
- Table name will be full capital with underscore. And the prefix
DASH
and postfixTable
will be added to entry name. E.G.DASH_VNET_MAPPING_TABLE
- The key message is sequentially joint as the Redis key with colon separator. E.G.
AclRuleKey{group_id=group1, rule_num=3}
, the key of Redis entry will beDASH_ACL_RULE_TABLE:group1:3
- The value is the entry message with the bytes array of protobuf
TODO