S.No

Test case name

Repro steps

Verification

1

call deployVirtualmachine api with <=2k encoded user data on port 8080 with get request

  1. call deployVirtualmachine api with <2k user data on port 8080

API is successful and VM is created
DB table user-vm-view shows proper values for userdata

2

call deployVirtualmachine api with <=2k encoded user data on port 8096 with get request

  1. Open port 8096 for CS
  2. call deployVirtualmachine api with <2k user data on port 8096

API is successful and VM is created
DB table user-vm-view shows proper values for userdata

3

call deployVirtualmachine api with encoded user data between 2k to 32k on port 8080 with post request

  1. call deployVirtualmachine api with >32k user data on port 8080

API is successful and VM is created
DB table user-vm-view shows proper values for userdata

4

call deployVirtualmachine api with encoded user data between 2k to 32k on port 8096 with post request

  1. Open port 8096 for CS
  2. call deployVirtualmachine api with>32kuser data on port 8096

API is successful and VM is created
DB table user-vm-view shows proper values for userdata

5

call deployVirtualmachine api with encoded user data between 2k to 32k on port 8096 with get  request

  1. Open port 8096 for CS
  2. call deployVirtualmachine api with>32kuser data on port 8096

API fails

6

call deployVirtualmachine api with =<2k encoded user data on port 8096 with post  request

  1. Open port 8096 for CS
  2. call deployVirtualmachine api with <2k user data on port 8096

API is successful and VM is created
DB table user-vm-view shows proper values for userdata

7

call updateVM command with <=2k encoded user data on port 8080 with get request when userdata was not supplied during VM  creation

  1. Create a VM
  2. Stop a VM
  3. Call updateVM api with userdata <=2k on port 8080

API is successful and VM is created
DB table user-vm-view shows proper values for userdata

8

call updateVM command with <=2k encoded user data on port 8096 with get request when userdata was not supplied during VM  creation

  1. Open port 8096 for CS
  2. Create a VM
  3. Stop a VM
  4. Call updateVM api with userdata <=2k on port 8096

API is successful and VM is created
DB table user-vm-view shows proper values for userdata

9

call updateVM command with encoded user data between 2k to 32k on port 8080 with post request when userdata was not supplied during VM  creation

  1. Create a VM
  2. Stop a VM
  3. Call updateVM api with userdata between (2k to 32k)  on port 8080

API is successful and VM is created
DB table user-vm-view shows proper values for userdata

10

call updateVM command with encoded user data between 2k to 32k on port 8096 with post request  when userdata was not supplied during VM  creation

  1. Open port 8096 for CS
  2. Create a VM
  3. Stop a VM
  4. Call updateVM api with userdata between (2k to 32k)  on port 8096

API is successful and VM is created
DB table user-vm-view shows proper values for userdata

11

call updateVM command with encoded user data between 2k to 32k on port 8096 with get  request when userdata was not supplied during VM  creation

  1. Open port 8096 for CS
  2. Create a VM
  3. Stop a VM
  4. Call updateVM api with userdata between (2k to 32k)  on port 8096 using get request

Api should fail

12

call updateVM command with =<2k encoded user data on port 8096 with post  request when userdata was not supplied during VM  creation

  1. Open port 8096 for CS
  2. Create a VM
  3. Stop a VM
  4. Call updateVM api with userdata <=2k  on port 8096 using  post request

API is successful and VM is created
DB table user-vm-view shows proper values for userdata

13

call updateVM command with <=2k encoded user data on port 8080 with get request when userdata was supplied during VM  creation

  1. Create a VM
  2. Stop a VM
  3. Call updateVM api with userdata <=2k on port 8080

API is successful and VM is created
DB table user-vm-view shows proper values for userdata

14

call updateVM command with <=2k encoded user data on port 8096 with get request when userdata was supplied during VM  creation

  1. Open port 8096 for CS
  2. Create a VM
  3. Stop a VM
  4. Call updateVM api with userdata <=2k on port 8096

API is successful and VM is created
DB table user-vm-view shows proper values for userdata

15

call updateVM command with encoded user data between 2k to 32k on port 8080 with post request when userdata was  supplied during VM  creation

  1. Create a VM
  2. Stop a VM
  3. Call updateVM api with userdata between (2k to 32k)  on port 8080

API is successful and VM is created
DB table user-vm-view shows proper values for userdata

16

call updateVM command with encoded user data between 2k to 32k on port 8096 with post request  when userdata was supplied during VM  creation

  1. Open port 8096 for CS
  2. Create a VM
  3. Stop a VM
  4. Call updateVM api with userdata between (2k to 32k)  on port 8096

API is successful and VM is created
DB table user-vm-view shows proper values for userdata

17

call updateVM command with encoded user data between 2k to 32k on port 8096 with get request  when userdata was supplied during VM  creation

  1. Open port 8096 for CS
  2. Create a VM
  3. Stop a VM
  4. Call updateVM api with userdata between (2k to 32k)  on port 8096 using get request

Api should fail

18

call updateVM command with encoded user data <=2k on port 8096 with post  request when userdata was supplied during VM  creation

  1. Open port 8096 for CS
  2. Create a VM
  3. Stop a VM
  4. Call updateVM api with userdata <=2k  on port 8096 using  post request
  1. API is successful and VM is created
  2. DB table user-vm-view shows proper values for userdata
  1. In order to generate userdata I am using python functions

for <2k

Use :

userdata = b'MARKER' + b'%s'%(os.urandom(2*1024))

base64.b64encode(userdata)

For >32k

Use :

userdata = b'MARKER' + b'%s'%(os.urandom(20*1024))

base64.b64encode(userdata)

For sending Post request use

curl --globoff --data "" "url"

For sending get request use :

curl --globoff  "url"

  • No labels