Skip to content

policy_map.proto

PolicyMapMgrService

watch

rpc watch(PolicyMapWatchRequest) PolicyMapWatchResponse

Subscription to monitor changes on a specified policy map. This request stays active until the client cancels or the server shuts down.

EosSdk reference: eos::policy_map_handler (class)

resync_init

rpc resync_init(PolicyMapResyncInitRequest) PolicyMapResyncInitResponse

Initiates a policy map resync process. Starts a blank configuration to be applied once resync_complete is called.

EosSdk reference: eos::policy_map_mgr::resync_init

resync_complete

rpc resync_complete(PolicyMapResyncCompleteRequest) PolicyMapResyncCompleteResponse

Ends the current policy map resync process.

EosSdk reference: eos::policy_map_mgr::resync_complete

exists

rpc exists(PolicyMapExistsRequest) PolicyMapExistsResponse

Queries whether the specified policy map is configured or not.

EosSdk reference: eos::policy_map_mgr::exists

policy_map

rpc policy_map(PolicyMapRequest) PolicyMapResponse

Queries a policy map given its key.

EosSdk reference: eos::policy_map_mgr::policy_map

policy_map_is

rpc policy_map_is(PolicyMapIsRequest) PolicyMapIsResponse

Creates or updates a policy map.

EosSdk reference: eos::policy_map_mgr::policy_map_is

bulk_policy_map_is

rpc bulk_policy_map_is(BulkPolicyMapIsRequest) BulkPolicyMapIsResponse

Creates or updates multiple policy maps in a single call.

EosSdk reference: eos::policy_map_mgr::policy_map_is

policy_map_del

rpc policy_map_del(PolicyMapDelRequest) PolicyMapDelResponse

Deletes a policy map.

EosSdk reference: eos::policy_map_mgr::policy_map_del

bulk_policy_map_del

rpc bulk_policy_map_del(BulkPolicyMapDelRequest) BulkPolicyMapDelResponse

Deletes multiple policy maps in a single call.

EosSdk reference: eos::policy_map_mgr::policy_map_del

policy_maps

rpc policy_maps(PolicyMapsRequest) PolicyMapsResponse

Returns a list of the keys of the configured policy maps for a policy feature.

EosSdk reference: eos::policy_map_mgr::policy_map_iter

policy_map_apply

rpc policy_map_apply(PolicyMapApplyRequest) PolicyMapApplyResponse

Applies or unapplies a policy map on the given interface and direction.

EosSdk reference: eos::policy_map_mgr::policy_map_apply

bulk_policy_map_apply

rpc bulk_policy_map_apply(BulkPolicyMapApplyRequest) BulkPolicyMapApplyResponse

Applies or unapplies multiple policy maps on the given interfaces and directions in a single call.

EosSdk reference: eos::policy_map_mgr::policy_map_apply

policy_map_hw_statuses

rpc policy_map_hw_statuses(PolicyMapHwStatusesRequest) PolicyMapHwStatusesResponse

Returns a list of the policy maps in hardware for a policy feature.

EosSdk reference: eos::policy_map_mgr::policy_map_hw_status_iter

hw_status

rpc hw_status(PolicyMapHwStatusRequest) PolicyMapHwStatusResponse

Queries the hardware status for a specified policy map.

EosSdk reference: eos::policy_map_mgr::hw_status

traffic_policy_exists

rpc traffic_policy_exists(TrafficPolicyExistsRequest) TrafficPolicyExistsResponse

Queries whether the specified traffic policy is configured or not.

EosSdk reference: eos::policy_map_mgr::traffic_policy_exists

traffic_policy

rpc traffic_policy(TrafficPolicyRequest) TrafficPolicyResponse

Queries a traffic policy given its key.

EosSdk reference: eos::policy_map_mgr::traffic_policy

traffic_policy_is

rpc traffic_policy_is(TrafficPolicyIsRequest) TrafficPolicyIsResponse

Creates or updates a traffic policy.

EosSdk reference: eos::policy_map_mgr::traffic_policy_is

bulk_traffic_policy_is

rpc bulk_traffic_policy_is(BulkTrafficPolicyIsRequest) BulkTrafficPolicyIsResponse

Creates or updates multiple traffic policies in a single call.

EosSdk reference: eos::policy_map_mgr::traffic_policy_is

traffic_policy_del

rpc traffic_policy_del(TrafficPolicyDelRequest) TrafficPolicyDelResponse

Deletes a traffic policy.

EosSdk reference: eos::policy_map_mgr::traffic_policy_del

bulk_traffic_policy_del

rpc bulk_traffic_policy_del(BulkTrafficPolicyDelRequest) BulkTrafficPolicyDelResponse

Deletes multiple traffic policies in a single call.

EosSdk reference: eos::policy_map_mgr::traffic_policy_del

traffic_policies

rpc traffic_policies(TrafficPoliciesRequest) TrafficPoliciesResponse

Returns a list of the keys of the configured traffic policies.

EosSdk reference: eos::policy_map_mgr::traffic_policy_iter

traffic_policy_apply

rpc traffic_policy_apply(TrafficPolicyApplyRequest) TrafficPolicyApplyResponse

Applies or unapplies a traffic policy on the given interface and direction.

EosSdk reference: eos::policy_map_mgr::traffic_policy_apply

bulk_traffic_policy_apply

rpc bulk_traffic_policy_apply(BulkTrafficPolicyApplyRequest) BulkTrafficPolicyApplyResponse

Applies or unapplies multiple traffic policies on the given interfaces and directions in a single call.

EosSdk reference: eos::policy_map_mgr::traffic_policy_apply

Messages

BulkPolicyMapApplyRequest

Name Value Description
requests repeated PolicyMapApplyRequest List of PolicyMapApplyRequests.

BulkPolicyMapApplyResponse

Name Value Description
processed uint64 Number of consecutive successful requests.
status RpcResponseStatus Success or error details in case of failure.

BulkPolicyMapDelRequest

Name Value Description
requests repeated PolicyMapDelRequest List of PolicyMapDelRequests.

BulkPolicyMapDelResponse

Name Value Description
processed uint64 Number of consecutive successful requests.
status RpcResponseStatus Success or error details in case of failure.

BulkPolicyMapIsRequest

Name Value Description
requests repeated PolicyMapIsRequest List of PolicyMapIsRequests.

BulkPolicyMapIsResponse

Name Value Description
processed uint64 Number of consecutive successful requests.
status RpcResponseStatus Success or error details in case of failure.

BulkTrafficPolicyApplyRequest

Name Value Description
requests repeated TrafficPolicyApplyRequest List of TrafficPolicyApplyRequests.

BulkTrafficPolicyApplyResponse

Name Value Description
processed uint64 Number of consecutive successful requests.
status RpcResponseStatus Success or error details in case of failure.

BulkTrafficPolicyDelRequest

Name Value Description
requests repeated TrafficPolicyDelRequest List of TrafficPolicyDelRequests.

BulkTrafficPolicyDelResponse

Name Value Description
processed uint64 Number of consecutive successful requests.
status RpcResponseStatus Success or error details in case of failure.

BulkTrafficPolicyIsRequest

Name Value Description
requests repeated TrafficPolicyIsRequest List of TrafficPolicyIsRequests.

BulkTrafficPolicyIsResponse

Name Value Description
processed uint64 Number of consecutive successful requests.
status RpcResponseStatus Success or error details in case of failure.

PolicyMapApplyRequest

Note: When unapplying a PBR policy map, the specified interface's policy map will be unapplied regardless of whether it matches the specified policy map name.

Name Value Description
key PolicyMapKey The key of the policy map to [un]apply.
intf_id IntfId The inteface ID of the interface to [un]apply the policy map.
direction AclDirection The direction in which to [un]apply the policy map.
apply bool True if the policy map should be applied otherwise false if it should be unapplied.

PolicyMapApplyResponse

Empty message.

PolicyMapDelRequest

Name Value Description
key PolicyMapKey The key of the policy map to delete.

PolicyMapDelResponse

Empty message.

PolicyMapExistsRequest

Name Value Description
key PolicyMapKey The key of the policy map to query.

PolicyMapExistsResponse

Name Value Description
exists bool True if the policy map is configured otherwise false.

PolicyMapHwStatusRequest

Name Value Description
key PolicyMapKey The key of the policy map to get the hardware status for.

PolicyMapHwStatusResponse

Name Value Description
hw_statuses PolicyMapHwStatuses The hardware status of the policy map.

PolicyMapHwStatusesRequest

Name Value Description
feature PolicyFeature The policy feature.

PolicyMapHwStatusesResponse

Name Value Description
key PolicyMapKey The keys of the policy maps for the feature.

PolicyMapIsRequest

Name Value Description
policy_map PolicyMap The policy map to create or update.

PolicyMapIsResponse

Empty message.

PolicyMapRequest

Name Value Description
key PolicyMapKey The key of the policy map to query.

PolicyMapResponse

Name Value Description
policy_map PolicyMap The policy map corresponding to the key or empty if not found.

PolicyMapResyncCompleteRequest

Empty message.

PolicyMapResyncCompleteResponse

Empty message.

PolicyMapResyncInitRequest

Empty message.

PolicyMapResyncInitResponse

Empty message.

PolicyMapWatchRequest

Name Value Description
oneof overloads.all bool True if all policy maps should be watched.
oneof overloads.key PolicyMapKey The key of the policy map to recieve notifications for.
ack bool Set to true if an immediate acknowledgment is desired.

PolicyMapWatchResponse

Name Value Description
key PolicyMapKey The key of the policy map that triggered the event.
oneof policy_map_event.event_type PolicyMapEventType The type of event.
oneof policy_map_event.sync_fail_message string Provides details when policy map commit or apply operation fails.
ack bool If true, this is not an event and the fields below are invalid.

PolicyMapsRequest

Name Value Description
feature PolicyFeature The policy feature.

PolicyMapsResponse

Name Value Description
key PolicyMapKey The key of the feature's configured policy maps.

TrafficPoliciesRequest

Empty message.

TrafficPoliciesResponse

Name Value Description
key PolicyMapKey The key of one of the feature's configured policy maps.

TrafficPolicyApplyRequest

Name Value Description
key string The key of the traffic policy to [un]apply.
intf_id IntfId The inteface ID of the interface to [un]apply the policy map.
direction TrafficPolicyDirection The direction in which to [un]apply the traffic policy.
apply bool True if the traffic policy should be applied otherwise false if it should be unapplied.

TrafficPolicyApplyResponse

Empty message.

TrafficPolicyDelRequest

Name Value Description
key string The key of the traffic policy to delete.

TrafficPolicyDelResponse

Empty message.

TrafficPolicyExistsRequest

Name Value Description
key string The key of the traffic policy to query.

TrafficPolicyExistsResponse

Name Value Description
exists bool True if the traffic policy is configured otherwise false.

TrafficPolicyIsRequest

Name Value Description
traffic_policy TrafficPolicy The traffic policy to create or update.

TrafficPolicyIsResponse

Empty message.

TrafficPolicyRequest

Name Value Description
key string The key of the traffic policy to query.

TrafficPolicyResponse

Name Value Description
traffic_policy TrafficPolicy The traffic policy corresponding to the key or empty if not found.

Enums

PolicyMapEventType

Name Value Description
POLICY_MAP_EVENT_NULL 0
POLICY_MAP_EVENT_SYNC 1
POLICY_MAP_EVENT_CONFIG_SET 2
POLICY_MAP_EVENT_TP_CONFIG_SET 3