Translating an Access Profile to a Policy

entry  entry-5  {
	If  {
		nlri    22.16.0.0/14;
	}
	then  {
		permit;
	}
}
entry  entry-10  {
	if  {
		nlri   192.168.0.0/18 exact;
	}
	then  {
		permit;
	}
}
entry  entry-15  {
	if  {
		nlri   any/8;
	}
	then  {
		deny;
	}
}
entry  entry-20  {
	if  {
		nlri   10.10.0.0/18;
}
Then  {
	permit;
}
}
entry  entry-25  {
	if  {
		nlri   22.44.66.0/23  exact;
	}
	then  {
		deny;
	}
}

The policy above can be optimized by combining some of the if statements into a single expression.

The compact form of the policy looks like this:

entry  permit_entry  {
	If match any {
		nlri    22.16.0.0/14;
		nlri   192.168.0.0/18 exact ;
		nlri   10.10.0.0/18;
	}
	then  {
		permit;
	}
}
entry  deny_entry  {
	if match any {
		nlri   any/8;
		nlri   22.44.66.0/23  exact;
	}
	then  {
		deny;
	}
}