/***** Network Topology *****/ Channel Group: Manhattan Channel Partition: WTC Channel Pair: PON port Channel Termination: PON port V-Ont Ani: ATT Golden User Ont Ani: ATT Golden User V-Enet: Enet UNI 1 /***** CRUL *****/ =====CREATE===== curl -s -X POST -d '{"type": "ponsim_olt", "host_and_port": "172.17.0.1:50060"}' http://localhost:8881/api/v1/local/devices | jq '.' | tee olt.json export OLT_ID=$(jq .id olt.json | sed 's/"//g') curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' http://localhost:8881/api/v1/local/devices/$OLT_ID/enable curl -X POST --header 'Content-Type: application/json' --header 'Accept: text/html' -d '{ "interface": { "enabled": true, "name": "Manhattan", "description": "Channel Group for Manhattan" }, "data": { "polling_period": 100, "system_id": "000000", "raman_mitigation": "raman_none" }, "name": "Manhattan" }' 'http://localhost:8881/api/v1/channel_groups/Manhattan' curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "interface": { "enabled": true, "name": "WTC", "description": "Channel Partition for World Trace Center in Manhattan" }, "data": { "differential_fiber_distance": 20, "closest_ont_distance": 0, "fec_downstream": false, "multicast_aes_indicator": false, "authentication_method": "serial_number", "channelgroup_ref": "Manhattan" }, "name": "Manhattan" }' 'http://localhost:8881/api/v1/channel_partitions/WTC' curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "interface": { "enabled": true, "name": "PON port", "description": "Channel Pair for Freedom Tower in WTC" }, "data": { "channelpair_linerate": "down_10_up_10", "channelpair_type": "channelpair", "channelgroup_ref": "Manhattan", "gpon_ponid_interval": 0, "channelpartition_ref": "WTC", "gpon_ponid_odn_class": "class_a" }, "name": "PON port" }' 'http://localhost:8881/api/v1/channel_pairs/PON%20port' curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "interface": { "enabled": true, "name": "PON port", "description": "Channel Termination for Freedom Tower" }, "data": { "channelpair_ref": "PON port", "location": "AT&T WTC OLT" }, "name": "PON port" }' http://localhost:8881/api/v1/local/devices/$OLT_ID/channel_terminations/PON%20port curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "interface": { "enabled": true, "name": "ATT Golden User", "description": "ATT Golden User in Freedom Tower" }, "data": { "preferred_chanpair": "PON port", "expected_serial_number": "PSMO00000001", "parent_ref": "WTC", "onu_id": 1 }, "name": "ATT Golden User" }' 'http://localhost:8881/api/v1/local/v_ont_anis/ATT%20Golden%20User' curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "interface": { "enabled": true, "name": "ATT Golden User", "description": "ATT Golden User in Freedom Tower" }, "data": { "upstream_fec_indicator": true, "mgnt_gemport_aes_indicator": false }, "name": "ATT Golden User" }' 'http://localhost:8881/api/v1/ont_anis/ATT%20Golden%20User' curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "interface": { "enabled": true, "name": "Enet UNI 1", "description": "Ethernet port - 1" }, "data": { "v_ontani_ref": "ATT Golden User" }, "name": "Enet UNI 1" }' 'http://localhost:8881/api/v1/local/v_enets/Enet%20UNI%201' =====DELETE===== curl -X DELETE --header 'Accept: application/json' 'http://localhost:8881/api/v1/local/v_enets/Enet%20UNI%201/delete' curl -X DELETE --header 'Accept: application/json' 'http://localhost:8881/api/v1/local/ont_anis/ATT%20Golden%20User/delete' curl -X DELETE --header 'Accept: application/json' 'http://localhost:8881/api/v1/local/v_ont_anis/ATT%20Golden%20User/delete' curl -X DELETE --header 'Accept: application/json' http://localhost:8881/api/v1/local/devices/$OLT_ID/channel_terminations/PON%20port/delete curl -X DELETE --header 'Accept: application/json' 'http://localhost:8881/api/v1/channel_pairs/PON%20port/delete' curl -X DELETE --header 'Accept: application/json' 'http://localhost:8881/api/v1/channel_partitions/WTC/delete' curl -X DELETE --header 'Accept: application/json' 'http://localhost:8881/api/v1/channel_groups/Manhattan/delete' curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' http://localhost:8881/api/v1/local/devices/$OLT_ID/disable curl -s -X DELETE http://localhost:8881/api/v1/local/devices/$OLT_ID/delete /*****************/ /***** CLI *******/ ===== CREATE ===== preprovision_olt -t ponsim_olt -H 172.17.0.1:50060 enable xpon channel_group create -n "Manhattan" -d "Channel Group for Manhattan" -a up -p 100 -s 000000 -r raman_none channel_partition create -n "WTC" -d "Channel Partition for World Trace Center in Manhattan" -a up -r 20 -o 0 -f false -m false -u serial_number -c "Manhattan" channel_pair create -n "PON port" -d "Channel Pair for Freedom Tower in WTC" -a up -r down_10_up_10 -t channelpair -g "Manhattan" -p "WTC" -i 0 -o class_a channel_termination create -i -n "PON port" -d "Channel Termination for Freedom Tower" -a up -r "PON port" -c "AT&T WTC OLT" vont_ani create -n "ATT Golden User" -d "ATT Golden User in Freedom Tower" -a up -p "WTC" -s "PSMO00000001" -r "PON port" -o 1 ont_ani create -n "ATT Golden User" -d "ATT Golden User in Freedom Tower" -a up -u true -m false v_enet create -n "Enet UNI 1" -d "Ethernet port - 1" -a up -r "ATT Golden User" =====CLI DELETE===== xpon v_enet delete -n "Enet UNI 1" ont_ani delete -n "ATT Golden User" vont_ani delete -n "ATT Golden User" channel_termination delete -i -n "PON port" channel_pair delete -n "PON port" channel_partition delete -n "WTC" channel_group delete -n "Manhattan" disable delete /******************/