semvec/pypi-packages huggingface dataset:
RESTApi-prasanth 6.7.0.2
REST API Automation study

# RestApi Automation

Using RestApi to Automate the Test cases -> Backup, Restore

## Before Start

The Setup should be ready with Avamar server connected to vCenter and proxy registered with the Avamar Server.


## Installation

Python Version --> Preferably 3.5.0 and above.

Use the package manager [pip] if possible the latest Version.

```bash
apt-get install python-pip
```
#### Other Libraries

```bash pip install requests```  --> to  install the requests module

```bash pip install yaml```  --> For Yaml Configuration

```bash pip install logging``` --> For Log creation


## Usage

Fill the Config.yaml file for User Entries. Some of them are explained below,

Authorization : Authorization Token to access Avamar Server(Use Postman to retrieve one).<br/>
vCenterSessionId : Session Id of the vCenter server.<br/>
vmType : The type of VM whose backup has to be taken(Windows, Linux)<br/>
FolderPath : Folder where the VM is kept <br/>
NewVMName : While Restoring the New VM name <br/>


For Eg.

```Yaml

IP: 10.110.211.252
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiUk9PVCIsInVzZXJfbmFtZSI6Ik1DVXNlciIsInNjb3BlIjpbIndyaXRlIl0sImRvbWFpbiI6Ii8iLCJhdXRob3JpemVkX2RvbWFpbiI6Ii8iLCJleHAiOjE1NTI2NDc2NzksImF1dGhvcml0aWVzIjpbIlJPT1QiXSwianRpIjoiNjBlZTUyNWItZjBmYi00NTE2LWIyMTEtYmZiNThiMzQ3Y2E3IiwiY2xpZW50X2lkIjoiM2MwNDFiODctNTIyYi00NThlLTgwZmYtYjY5MTZiMmU5N2JmIn0.EpkFA2litAI_CigsTK1s3GYFmG6BP48_EOj-IIPXgNX5-SwpDlg32-MP8XgCbMYXOpPLRUzlPnIIBA8jANBVL9Tg3esF_u2qmKU7CMLVyJTIfZhB9x1NAoE5S0_6Fb8Z68PkbUWkUYc0ubaoGEhMzc775bLxU4g_ULUdtkQSGKYCTg2CLnmqhONZaWTw5M83Y-L8qZ7T4DvgEbkWtXHZ0jdnLcSiAXtv1qX3rEESk8LYVSuvoeLIPSnNK50vydh_H_cPTw9jfF_J8Qfa5mTAAfnuzTZBPGtyA2zodtOin1yyEOC1VPz7HpHU-0NMOKF1YCVleZXzV35BdNw-JxBfS1c92BMZQoF-yqyTf1Q5qwGCMA0lghxd0ClNwTM4YCCe-o3FBcVeCWLehL5MyGDuLk0JI8uGRJPR7XHpwpy8KTSF8L_9A-0i3xS0ZZQf9AxTDIEMIheEAF0VWgu3ulZ92Ud_9qThICTUWvqkHonuLiKs2FoPxrGfFyOeSeLlaZEO
vCenterSessionId: 4f99479faf19893b1dd86507b7fcfc7e
vCenter: 10.110.211.168
PolicyName: Gsan-Policy
PolicyDomain: /10.110.211.168/VirtualMachines
Content-Type: application/json
VM_id: c146dd0ebed42ff4cd94460ddeb509fb6cbdf7e7
vmType: Windows
VcCid: 14bda782e11827a1c69201a43ac0e3cc2b4a24a8
Datastore: datastore1
FolderPath: /AVE_A10N_DC/vm/Automation/
NewVMName: Restore-VM-2019_18
ResourcePoolPath: /AVE_A10N_DC/host/10.110.211.22/Resources/Compute-ResourcePool/
DatacenterName: AVE_A10N_DC


```

## Running

After filling the yaml file run the below command in the terminal,
```bash
python REST_Automation.py
```
Log file produced is

##  Contributing

All suggestions and trial are welcome.
taobao-sdk-top 0.0.1
taobao sdk for python 3

python sdk 目前还处于起步阶段，希望大家一起来完善它

Version 1.1

设计背景：本SDK参考了facebook和twitter的pythonSDK的组织结构，同时结合top的SDK自动生成的机制，系统生成。

使用方法：

拷贝依赖包top到你的工程下，同时引入到PYTHONPATH中，具体怎么搞，就看你自己的系统啦。
总之一句话，让执行器可以找到top这个依赖包就OK拉。

调用方式，请参考
test.py

注意事项：

SDK在设计的时候，每次请求都让传入appkey和secret，但是一定不要把appkey和secret写的满项目都是，这还蛮坑爹的。
请大家像爱护自己密码一样爱护secret

希望大家一起来完善它。TKS。