Cisco Systems A9014CFD Router User Manual


 
31-13
Cisco ASR 901 Series Aggregation Services Router Software Configuration Guide
OL-23826-09
Chapter 31 Microwave ACM Signaling and EEM Integration
Configuration Examples for Microwave ACM Signaling and EEM Integration
# action 233 syslog msg "233: cname: $cname"
action 234 end
! Calculate bandwidth for each of the classes
action 236 regexp "(priority|bandwidth) percent (.*)" $var line cmd ef_bw_perc
action 238 if $_regexp_result eq 1
action 256 string trimright "$ef_bw_perc"
# action 258 syslog msg "258: cb_bps: $nb_bps, ef_bw_perc:$_string_result"
action 260 divide $nb_bps 100
action 262 multiply $_result $_string_result
action 263 set bw_demand $_result
action 264 add $cpmap_bw $_result
action 266 syslog msg "266: cpmap_bw: $_result, bw_demand: $bw_demand"
action 268 set cpmap_bw $_result
action 269 syslog msg "269: cpmap_bw sub-sum: $cpmap_bw"
action 270 regexp "priority percent (.*)" $line match
action 272 if $_regexp_result eq 1
action 274 add $pri_bw $bw_demand
action 276 multiply $bw_demand 100
action 278 divide $_result $cb_bps
action 279 if $_remainder gt 0
action 280 increment _result
action 281 end
action 282 set match1 "priority percent $_result"
action 283 set match2 "priority percent $_result"
action 284 end
action 286 regexp "bandwidth percent (.*)" $line match
action 288 if $_regexp_result eq 1
action 290 set match1 "$match"
action 292 set match2 "bandwidth percent 1"
action 294 end
action 296 else
action 298 set match1 "$var"
action 300 set match2 "$var"
action 302 end
action 304 append cfg_out1 "$match1 \n"
action 306 append cfg_out2 "$match2 \n"
action 308 end
! Check if there is enough bandwidth on a uwave link
action 310 syslog msg "310: cpmap_bw sum: $cpmap_bw"
action 312 if $cpmap_bw lt $cb_bps
action 314 set cfg_out "$cfg_out1"
action 316 elseif $pri_bw lt $cb_bps
action 318 set cfg_out "$cfg_out2"
action 320 else
action 322 set metric 1000000
action 323 set ifcfg 0
action 324 end
! Configuration of a child QoS policy
action 325 if $ifcfg eq 1
action 326 foreach var "$cfg_out" "\n"
action 328 cli command "$var"
action 330 end
action 331 end
! Configuration of a parent QoS policy
action 332 cli command "policy-map $s1$pmap"
action 334 syslog msg "config 334: policy-map $s1$pmap"
action 336 cli command "class class-default"