<commit_before># Nova 模块实践

## Nova api 流程
<commit_msg>Update 8.nova.md<commit_after># Nova 模块实践

## Nova api 流程

- create a instance

if the command is : $ nova --debug boot test2 --flavor 1 --image cirros-0.3.4-x86_64-uec --num-instance 1  
```
REQ: curl -g -i -X GET http://192.168.6.131:5000/v2.0 -H "Accept: application/json" -H "User-Agent: keystoneauth1/2.8.0 python-requests/2.10.0 CPython/2.7.6"

REQ: curl -g -i -X GET http://192.168.6.131:8774/v2.1 -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {<PASSWORD>"


REQ: curl -g -i -X GET http://192.168.6.131:8774/v2.1/images/5e35d3f2-075d-4990-80d6-251b73da8ba4 -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-OpenStack-Nova-API-Version: 2.25" -H "X-Auth-Token: {<PASSWORD>"

REQ: curl -g -i -X GET http://192.168.6.131:8774/v2.1/flavors/1 -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-OpenStack-Nova-API-Version: 2.25" -H "X-Auth-Token: {<PASSWORD>"

REQ: curl -g -i -X POST http://192.168.6.131:8774/v2.1/servers -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-OpenStack-Nova-API-Version: 2.25" -H "X-Auth-Token: {<PASSWORD>" -d '{"server": {"min_count": 1, "flavorRef": "1", "name": "test2", "imageRef": "5e35d3f2-075d-4990-80d6-251b73da8ba4", "max_count": 1}}'


REQ: curl -g -i -X GET http://192.168.6.131:8774/v2.1/servers/eccb896a-528f-40f4-bf51-d6e13529a713 -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-OpenStack-Nova-API-Version: 2.25" -H "X-Auth-Token: {<PASSWORD>"
```

{'fraction_non_alphanumeric': 0.2059738643434972, 'fraction_numerical': 0.1238332296204107, 'mean_word_length': 3.5811965811965814, 'pattern_counts': {'":': 6, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '284321', 'n_tokens_mistral': 825, 'n_tokens_neox': 725, 'n_words': 152}