Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Function

Single VM Creation

Description

To provision a VM in a particular cloud environment based on the configurations described 

in the payload. CMDB will be updated on each success case.

API

https://cmpuat.mphasis.com/Dev/vm/create

HTTP Method

POST

Additional headers

"x-api-key": {API-key}

"authorization_token": {auth-token}

Payload

{

“doc”: [{

"number": "VM 1",

"sl_no": 1,

"provider": "AZURE",

"OS": "Redhat Enterprise Linux (RHEL)",

"software": "",

"primary_owner": "Meinathan.P01@mphasis.com",

"secondary_owner": "Prakash.Rawat@mphasis.com",

"additional_user":"Meinathan.P01@mphasis.com,Prakash.Rawat@mphasis.com",

"disk_size": "128",

"extra_disk": "50,80",

"instance_type": "Standard_B2s",

"resource_group": "servicenow-rg",

"new_resource_group": "",

"price": "64.266”,

"sysID": "d77dcd24db6e4414218936cb7c9619db",

"resource": "VM",

"requested_by": "netalytics team",

"environment": "Nextgen-RD",

"project_code": "98203",

"request_number": "REQxxxxxx",

"project_name": "CIO_Cloud_CSP",

"application_name": "testappp"

“server_role”: “”,

“cpu”: “”,

“memory”: “”,

“autoshutdown”: “”

}]

}

Response:

{

“status”: “success”,

“Message”:  “The request has been approved and is being processed. Further updates will be sent via 

E-mail”}

Function

Multiple VM Creation

Description

Multi Cloud -Multi VM Provisioning based on the configurations described in the payload. 

CMDB will be updated on each success case.

API

https://cmpuat.mphasis.comDev/vm/create

HTTP Method

POST

Additional headers

"x-api-key": {API-key}

"authorization_token": {auth-token}

Payload

{

"doc": [ {

"number": "VM 1",

“sl_no": 1,

"provider": "AZURE",

"OS": "Redhat Enterprise Linux (RHEL)",

"software": "",

"primary_owner": "Meinathan.P01@mphasis.com",

"secondary_owner": "Prakash.Rawat@mphasis.com",

"additional_user":"Meinathan.P01@mphasis.com,Prakash.Rawat@mphasis.com",

"disk_size": "128",

"extra_disk": "50,80",

"instance_type": "Standard_B2s",

"resource_group": "servicenow-rg",

"new_resource_group": "",

"price": "64.266”,

"sysID": "d77dcd24db6e4414218936cb7c9619db",

"resource": "VM",

"requested_by": "netalytics team",

"environment": "Nextgen-RD",

"project_code": "98203",

"request_number": "REQxxxxxx",

"project_name": "CIO_Cloud_CSP",

"application_name": "testappp"

“server_role”: “”,

“cpu”: “”,

“memory”: “”,

“autoshutdown”: “”

},

{

"number": "VM 2",

“sl_no": 2,

"provider": "AZURE",

"OS": "Redhat Enterprise Linux (RHEL)",

"software": "",

"primary_owner": "Meinathan.P01@mphasis.com",

"secondary_owner": "Prakash.Rawat@mphasis.com",

"additional_user":"Meinathan.P01@mphasis.com,Prakash.Rawat@mphasis.com",

"disk_size": "128",

"extra_disk": "50,80",

"instance_type": "Standard_B2s",

"resource_group": "servicenow-rg",

"new_resource_group": "",

"price": "64.266”,

"sysID": "d77dcd24db6e4414218936cb7c9619db",

"resource": "VM",

"requested_by": "netalytics team",

"environment": "Nextgen-RD",

"project_code": "98203",

"request_number": "REQxxxxxx",

"project_name": "CIO_Cloud_CSP",

"application_name": "testappp"

“server_role”: “”,

“cpu”: “”,

“memory”: “”,

“autoshutdown”: “”

},

{

"number": "VM 3",

“sl_no": 3,

"provider": "AZURE",

"OS": "Redhat Enterprise Linux (RHEL)",

"software": "",

"primary_owner": "Meinathan.P01@mphasis.com",

"secondary_owner": "Prakash.Rawat@mphasis.com",

"additional_user":"Meinathan.P01@mphasis.com,Prakash.Rawat@mphasis.com",

"disk_size": "128",

"extra_disk": "50,80",

"instance_type": "Standard_B2s",

"resource_group": "servicenow-rg",

"new_resource_group": "",

"price": "64.266”,

"sysID": "d77dcd24db6e4414218936cb7c9619db",

"resource": "VM",

"requested_by": "netalytics team",

"environment": "Nextgen-RD",

"project_code": "98203",

"request_number": "REQxxxxxx",

"project_name": "CIO_Cloud_CSP",

"application_name": "testappp"

“server_role”: “”,

“cpu”: “”,

“memory”: “”,

“autoshutdown”: “”

}]

}

Response

{

“status”: “success”,

“Message”:  “The request has been approved and is being processed. Further updates will be sent via evia e-mail”

}

Function

Modify VM

Description

To modify VM configurations. CMDB will be updated on each success case

Functionality

Modify instance type(upgrade/ Degrade), upgrade disk size, add new discs

API

disks.https://cmpuat.mphasis.com/Dev/vm/update

HTTP Method

POST

Additional headers

"x-api-key": {API-key}

"authorization_token": {auth-token}

Payload

{

"doc": [ {

"resource":"VM",

"provider": "AZURE",

"environment": "Nextgen-RD",

"project_code": "98203",

"project_name": "CIO",

"hostname": "SRVAZUCHETES550",

"ip_address": "10.14.48.34",

"update_actions": ["compute_size"],

"new_instance_type": "Standard_B2s",

“Proposed_cpu”: “2”,

“Proposed_ram”: “4”,

"Propose_disk_list": "10,20",

"new_disk_list": "35,25",

"request_number":"REQxxxxxx"

}]

}

Response

{

“status”: “success”,

“Message”:  “The request has been approved and is being processed. Further updates will be sent via email”

}

Payload Key Details

  • provider: Azure/AWS

  • environment: same environment options as available in single vm form

  • hostname: hostname of the VM to be upgraded

  • ip_address: private ip address of the VM to be upgraded

  • resource_group: Must be sent if the VM to be upgraded is in Azure. If not in Azure, send as an empty 

string - ””.

  • update_actions: This specifies the type of upgrade. Must be passed in list of string format.

Possible values: compute_size (for modifying the instance_type of a vm)

data_disk_add: to add an additional disk

upgrade_disk: To upgrade an existing disk

For Instance, if u need to update both compute size and upgrade an existing disk you 

have to pass values in the following manner:

"update_actions": ["compute_size","upgrade_disk"]

  • new_instance_type: New instance type which the user has selected

  • new_disk_list: must be a string with comma-separated sizes of new disks

  • Propose_disk_list: must be a string with comma-separated sizes of new disks

  • request_number: Ticket number

Note: 

  • if no new disk to be added then new_disk_list value must be an empty string ("").

  • If no upgrade is required for any of the existing disk, you can send an empty string for Propose_disk_list.

  • If an upgrade is required then Propose_disk_list must have the disks in correct order with new size.        

 For Intance: existing disks of a vm: "10,20,30"

If the user wants to change disk2 size from 20 to 50 then, Propose_disk_list value will be: "10,50,30"


Function

VM Decommission

Description

To delete a VM and its sub-resources. CMDB will be updated on each success case

Functionality

Backup, Retention, Disjoin domain, Destroy VM

API

https://cmpuat.mphasis.com/Dev/vm/delete

HTTP Method

POST

Additional headers

"x-api-key": {API-key}

"authorization_token": {auth-token}

Payload

{

"doc": [{

"resource" : "VM",

"provider": "AZURE",

"project_code": "98203",

"environment": "Production",

"project_name": "New_HORIBA",

"hostname": "SRVAZUCH",

"ip_address": "10.14.0.52",

"backup": true,

“backup_disk_ids”: [“”]

"retention": 1,

"request_number":"REQxxxxxx"

}]

}

Payload Response Key Details

backup (boolean): true | false - true if backup is required else false.

backup_disk_ids (list/array): [<disk_ids>] - list of disk IDs which the user wants to backup

retention (number): 1 | 3 | 6 | 12 - backup retention period in months

Response

{

“status”: “success”,

“Message”:  “The request has been approved and is being processed. Further updates will be sent via email”via email”

}

Function

Retry

Description

When clicked failed VM to be initiated to create

Functionality

Retry function for both Single and Multiple VM

Payload

{

“doc”: [{

“retry”: “true”

"number": "VM 1",

"sl_no": 1,

"provider": "AZURE",

"OS": "Redhat Enterprise Linux (RHEL)",

"software": "",

"primary_owner": "Meinathan.P01@mphasis.com",

"secondary_owner": "Prakash.Rawat@mphasis.com",

"additional_user":"Meinathan.P01@mphasis.com,Prakash.Rawat@mphasis.com",

"disk_size": "128",

"extra_disk": "50,80",

"instance_type": "Standard_B2s",

"resource_group": "servicenow-rg",

"new_resource_group": "",

"price": "64.266”,

"sysID": "d77dcd24db6e4414218936cb7c9619db",

"resource": "VM",

"requested_by": "netalytics team",

"environment": "Nextgen-RD",

"project_code": "98203",

"request_number": "REQxxxxxx",

"project_name": "CIO_Cloud_CSP",

"application_name": "testappp"

“server_role”: “”,

“cpu”: “”,

“memory”: “”,

“autoshutdown”: “”

}]

}

...