Open ghojeong opened 2 years ago
swagger generate server -f api/swagger.yaml
client.net_ifaces_namespace_put. ip route show 를 통해 라우팅 테이블 내용을 확인할 수 있다.
curl --request PUT 'http://127.0.0.1:8080/net-ifaces/fc1' \
--header 'Content-Type: application/json' \
--data-raw '{
"host_dev_name": "vmtap0",
"iface_id": "eth0",
"guest_mac": "AA:FC:00:00:00:01",
"guest_addr": "172.16.0.2",
"unique_addr": "192.168.0.3"
}'
curl --request POST 'http://127.0.0.1:8080/functions' \
--header 'Content-Type: application/json' \
--data-raw '{
"func_name": "hello",
"image": "debian",
"kernel": "v4.14",
"vcpu": 2
}'
ssIds = prepareVanilla or prepareMincore or prepareReap or prepareEmuMincore
client.vms_post
curl --request POST 'http://127.0.0.1:8080/vms' \
--header 'Content-Type: application/json' \
--data-raw '{
"func_name": "hello",
"namespace": "fc1"
}'
client.invocations_post
curl --request POST 'http://127.0.0.1:8080/invocations' \
--header 'Content-Type: application/json' \
--data-raw '{
"func_name": "hello",
"vmId": "lMCEyDL8",
"params": "{}",
"mincore": -1,
"enableReap": false
}'
client.snapshots_post. base_path 에 firecracker.sock 를 필요로 한다.
curl --request POST 'http://127.0.0.1:8080/snapshots' \
--header 'Content-Type: application/json' \
--data-raw '{
"vmId": "Y0fXWEzr",
"snapshot_type": "Full",
"snapshot_path": "/home/intern/test_dir/Full.snapshot1",
"mem_file_path": "/home/intern/test_dir/Full.memfile1",
"version": "0.23.0"
}'
client.vms_vm_id_delete. DELETE '/vms/{vmId}'
client.snapshots_put PUT '/snapshots'
client.snapshots_ss_id_patch PATCH '/snapshots/{ssId}'
Go 로 된 faasnap daemon 실행하기
Go 와는 별개로 실행하기
기타 들어가는 내용들