#Hands-on: VESagent #vars export DMaaP_IP=10.12.6.170 export DCAE_IP=10.12.6.79 export MC_EP_IP=10.12.7.8 export MC_EP_PORT=9005 export MC_EP=http://$MC_EP_IP:$MC_EP_PORT/api/multicloud-titanium_cloud/v0/CloudOwner2_RegionOne #query VES provision curl -v -s -H "Content-Type: application/json" -X GET $MC_EP/vesagent |json_pp #update VES provision #monitor all VMs curl -v -s -H "Content-Type: application/json" -d '{"vesagent_config":{"backlogs":[ {"domain":"fault","type":"vm","tenant":"VIM"}],"poll_interval_default":10,"ves_subscription":{"username":"admin","password":"admin","endpoint":"http://10.12.6.79:8081/eventListener/v5"}}}' -X POST $MC_EP/vesagent #monitor specified VMs curl -v -s -H "Content-Type: application/json" -d '{"vesagent_config":{"backlogs":[ {"source":"onap-robot", "domain":"fault","type":"vm","tenant":"VIM"}],"poll_interval_default":10,"ves_subscription":{"username":"admin","password":"admin","endpoint":"http://10.12.6.79:8081/eventListener/v5"}}}' -X POST $MC_EP/vesagent #delete VES provision curl -v -s -H "Content-Type: application/json" -X DELETE $MC_EP/vesagent #DMaaP subscription while :; do curl -H “Content-Type:text/plain” -X GET http://$DMaaP_IP:3904/events/unauthenticated.SEC_FAULT_OUTPUT/group19/C1?timeout=50000; echo; done; Browser: http://10.12.6.170:3904/events/unauthenticated.SEC_FAULT_OUTPUT/biny993/C1?timeout=120 ### pause onap-nbi ["{\"event\":{\"commonEventHeader\":{\"startEpochMicrosec\":1529349457240730,\"sourceId\":\"5c66fbfa-0ef6-43bf-b521-75c59e130d1a\",\"eventId\":\"5ab7b4fa-4223-416e-8bc1-f6c3f533567a\",\"reportingEntityId\":\"CloudOwner2_RegionOne\",\"internalHeaderFields\":{\"collectorTimeStamp\":\"Mon, 06 18 2018 07:17:04 GMT\"},\"eventType\":\"\",\"priority\":\"High\",\"version\":3,\"reportingEntityName\":\"CloudOwner2_RegionOne\",\"sequence\":0,\"domain\":\"fault\",\"lastEpochMicrosec\":1529349457240730,\"eventName\":\"Fault_MultiCloud_VMFailure\",\"sourceName\":\"onap-nbi\"},\"faultFields\":{\"eventSeverity\":\"CRITICAL\",\"alarmCondition\":\"Guest_Os_Failure\",\"faultFieldsVersion\":2,\"specificProblem\":\"Fault_MultiCloud_VMFailure\",\"alarmInterfaceA\":\"aaaa\",\"alarmAdditionalInformation\":[{\"name\":\"objectType\",\"value\":\"VIM\"},{\"name\":\"eventTime\",\"value\":\"2018-06-18 19:17:37.240803\"}],\"eventSourceType\":\"virtualMachine\",\"vfStatus\":\"Active\"}}}"] #resume onap-nbi ["{\"event\":{\"commonEventHeader\":{\"startEpochMicrosec\":1529349457240730,\"sourceId\":\"5c66fbfa-0ef6-43bf-b521-75c59e130d1a\",\"eventId\":\"5ab7b4fa-4223-416e-8bc1-f6c3f533567a\",\"reportingEntityId\":\"CloudOwner2_RegionOne\",\"internalHeaderFields\":{\"collectorTimeStamp\":\"Mon, 06 18 2018 07:17:49 GMT\"},\"eventType\":\"\",\"priority\":\"Normal\",\"version\":3,\"reportingEntityName\":\"CloudOwner2_RegionOne\",\"sequence\":1,\"domain\":\"fault\",\"lastEpochMicrosec\":1529349502521350,\"eventName\":\"Fault_MultiCloud_VMFailureCleared\",\"sourceName\":\"onap-nbi\"},\"faultFields\":{\"eventSeverity\":\"NORMAL\",\"alarmCondition\":\"Vm_Restart\",\"faultFieldsVersion\":2,\"specificProblem\":\"Fault_MultiCloud_VMFailure\",\"alarmInterfaceA\":\"aaaa\",\"alarmAdditionalInformation\":[{\"name\":\"objectType\",\"value\":\"VIM\"},{\"name\":\"eventTime\",\"value\":\"2018-06-18 19:18:22.521380\"}],\"eventSourceType\":\"virtualMachine\",\"vfStatus\":\"Active\"}}}"] #Hands-on: OpenStack proxy #authenticate curl -v -s -H "Content-Type: application/json" -X POST -d '{"auth": {"tenantName": "VIM", "passwordCredentials": {"username": "demo", "password": "onapdemo"}}}' $MC_EP/identity/v2.0/tokens curl -v -s -H "Content-Type: application/json" -X POST $MC_EP/identity/v2.0/tokens #proxied endpoints http://128.224.180.84:9005/api/multicloud-titanium_cloud/v0/onaplab_RegionOne/network http://128.224.180.84:9005/api/multicloud-titanium_cloud/v0/onaplab_RegionOne/compute/v2.1/0e148b76ee8c42f78d37013bf6b7b1ae #server list export MC_nova_EP=http://$MC_EP_IP:80/api/multicloud-titanium_cloud/v0/CloudOwner2_RegionOne/compute/v2.1/0e148b76ee8c42f78d37013bf6b7b1ae export TOKEN=e570b3cba7804a64bcb3cf6fd932a4e9 curl -v -s -H "Content-Type: application/json" -H "X-Auth-Token: $TOKEN" -X GET $MC_nova_EP/servers