API v1

Admin API

These APIs are meant for infrastructure admin who is in charge of triggering the rolling maintenance and upgrade workflow sessions.

Admin workflow session API

POST
/v1/maintenance

Create maintenance session

Create a new maintenance session. You can specify a list of ‘hosts’ to be maintained or have an empty list to indicate those should be self-discovered. You need to have an initial state for the workflow in ‘state’. ‘workflow’ indicates the name of a Python plug-in to be used in the maintenance.

Request

Name In Type Description
hosts (Optional) body list of strings Hosts to be maintained. An empty list can indicate hosts are to be discovered.
state body string Maintenance workflow state (States explained in the user guide)
maintenance_at body string Maintenance workflow start time.
workflow body string Maintenance workflow to be used.
metadata body dictionary Hint to project/tenant/VNF to know what capability the infrastructure is offering to instance when it moves to already maintained host in ‘PLANNED_MAINTENANCE’ state action. This may have impact on how the instance is to be moved or if instance is to be upgraded and VNF needs to re-instantiate it as its ‘OWN_ACTION’. This could be the case with new hardware or instance could be wanted to be upgraded anyhow at the same time of the infrastructure maintenance.
download (Optional) body list of dictionaries

List of needed SW upgrade packages:

Default download directory is /tmp/<session_id>. Download URL with filename including ‘workflow’ or ‘actions’ are automatically extracted to /tmp/<session_id>/<workflow|actions>. Plugins will be used straight from those directories if Fenix did not have a plugin with the same name. Your plugin can have other files also that it is going to need, everything will be extracted under those defined directories with the directory hiararchy inside the package. Download directory and the content will be recursively removed when the session is deleted by the admin.
actions (Optional) body list of dictionaries List of action plug-ins.
actions.plugin body string plug-in name. Default workflow executes same type of plug-ins in an alphabetical order.
actions.type body integer

Type of the action plug-in. Default workflow supports:

  • pre: executed before the host specific plug-ins
  • post: executed after the host specific plug-ins
  • host: executed for every host
  • compute: executed for every compute host
  • controller: executed for every controller host
actions.metadata body dictionary Metadata; hints to plug-ins.
{
    "hosts": [],
    "state": "MAINTENANCE",
    "maintenance_at": "2018-02-28 06:06:03",
    "metadata": {"openstack_release": "Stein"},
    "workflow": "default",
    "download": ["https://my.sw.upgrades.com/compute.tar.gz",
                 "https://my.sw.upgrades.com/controller.tar.gz",
                 "https://my.sw.upgrades.com/esw.tar.gz",
                 "https://my.sw.upgrades.com/os.tar.gz",
                 "https://my.sw.upgrades.com/actions.tar.gz"],
    "actions": [
        {"plugin": "prepare", "type": "pre"},
        {"plugin": "compute", "type": " compute ", "metadata": {"upgrade": " compute.tar.gz "}},
        {"plugin": "controller", "type": " controller ", "metadata": {"upgrade": " controller.tar.gz "}},
        {"plugin": "esw_upgrade", "type": "host", "metadata": {"upgrade": "esw.tar.gz"}},
        {"plugin": "os_upgrade", "type": "host", "metadata": {"upgrade": "os.tar.gz"}},
        {"plugin": "finalize", "type": "post"}]
}

Response codes

Success
Code Reason
200 - OK
Name In Type Description
session_id body string uuid
{
    "session_id": "695030ee-1c4d-11e8-a9b0-0242ac110002"
}
Error
Code Reason
400 - Bad Request Some content in the request was invalid.
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.
509 - Unknown There is too many parallel sessions.
PUT
/v1/maintenance/{session_id}

Update maintenance session (planned future functionality)

Update existing maintenance session. This can be used to continue a failed session after manually fixing what failed. Workflow should then run succesfully to the end.

Request

Name In Type Description
session_id path string Session ID
state (Optional) body string Maintenance workflow state or previous state if not given. The workflow will continue from this state.

Response codes

Success
Code Reason
200 - OK
Name In Type Description
session_id body string uuid
{
    "state": "PLANNED_MAINTENANCE"
}
Error
Code Reason
400 - Bad Request Some content in the request was invalid.
422 - Unknown The entity of the request is not inline with resource schema
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.
GET
/v1/maintenance

Get maintenance sessions

Get all ongoing maintenance sessions.

Response codes

Success
Code Reason
200 - OK
Name In Type Description
session_id body string list of UUID strings
{
    "session_id": ["695030ee-1c4d-11e8-a9b0-0242ac110002"]
}
Error
Code Reason
400 - Bad Request Some content in the request was invalid.
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.
GET
/v1/maintenance/{session_id}

Get maintenance session

Get a maintenance session state.

Request

Name In Type Description
session_id path string Session ID

Response codes

Success
Code Reason
200 - OK
Name In Type Description
state body string Maintenance workflow state (States explained in the user guide)
{
    "state": "MAINTENANCE_DONE"
}
Error
Code Reason
400 - Bad Request Some content in the request was invalid.
404 - Not Found The requested resource could not be found.
422 - Unknown The entity of the request is not inline with resource schema
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.
GET
/v1/maintenance/{session_id}/detail

Get maintenance session details

Get a maintenance session details. This information can be usefull to see detailed status of a maintennace session or to troubleshoot a failed session. Usually session should fail on simple problem, that can be fast manually fixed. Then one can update maintenance session state to continue from ‘prev_state’.

Request

Name In Type Description
session_id path string Session ID

Response codes

Success
Code Reason
200 - OK
Name In Type Description
action body string ‘LIVE_MIGRATE’, ‘MIGRATE’ or ‘OWN_ACTION’ Own action is create new and delete old instance. Note! VNF need to obey resource_mitigation with own action This affects to order of delete old and create new to not over commit the resources. In Kubernetes also ‘EVICTION’ supported. There admin will delete instance and VNF automation like ReplicaSet will make a new instance.
action_done body boolean Boolean
created_at body string Date and time string according to ISO 8601.
details body string Workflow internal special usage detail. Example nova-compute service id.
disabled body boolean Boolean
host body string Name of the host.
hostname body string Name of the host.
id body string uuid
instance_id body string uuid
instance_name body string Instance name.
maintained body boolean Boolean
maintenance_at body string Date and time string according to ISO 8601.
meta body dictionary Hint to project/tenant/VNF to know what capability the infrastructure is offering to instance when it moves to already maintained host in ‘PLANNED_MAINTENANCE’ state action. This may have impact on how the instance is to be moved or if instance is to be upgraded and VNF needs to re-instantiate it as its ‘OWN_ACTION’. This could be the case with new hardware or instance could be wanted to be upgraded anyhow at the same time of the infrastructure maintenance.
percent_done body dictionary How many percent of hosts are maintained.
plugin body dictionary Action plugin name.
prev_state body string Maintenance workflow state (States explained in the user guide)
project_id body string uuid
project_state body string There can have different values depending on what is the maintenance session state to reply to. In the below example, the maintenance state is ‘PLANNED_MAINTENANCE’ and the reply state is formed by adding ‘ACK_’ or ‘NACK_’ as the prefix to reply value.
session_id body string uuid
state(action_plugin_instances) body string Action plug-in state. This is workflow and action plug-in specific information to be passed from action plug-in to workflow. Helps understanding how action plug-in was executed and to troubleshoot accordingly.
state(instances) body string State of the instance as in underlying cloud. Can be different in different clouds like OpenStack or Kubernetes.
state body string Maintenance workflow state (States explained in the user guide)
type (Optional) body list of strings Host type as it is wanted to be used in workflow implementation. Example workflows uses values as compute and controller.
updated_at body string Date and time string according to ISO 8601.
workflow body string Maintenance workflow to be used.
{
   "session_id": "47479bca-7f0e-11ea-99c9-2c600c9893ee",
   "instances": [
      {
         "instance_id": "da8f96ae-a1fe-4e6b-a852-6951d513a440",
         "action_done": false,
         "host": "overcloud-novacompute-2",
         "created_at": "2020-04-15T11:43:09.000000",
         "project_state": "INSTANCE_ACTION_DONE",
         "updated_at": null,
         "session_id": "47479bca-7f0e-11ea-99c9-2c600c9893ee",
         "instance_name": "demo_nonha_app_2",
         "state": "active",
         "details": null,
         "action": null,
         "project_id": "444b05e6f4764189944f00a7288cd281",
         "id": "73190018-eab0-4074-bed0-4b0c274a1c8b"
      },
      {
         "instance_id": "22d869d7-2a67-4d70-bb3c-dcc14a014d78",
         "action_done": false,
         "host": "overcloud-novacompute-4",
         "created_at": "2020-04-15T11:43:09.000000",
         "project_state": "ACK_PLANNED_MAINTENANCE",
         "updated_at": null,
         "session_id": "47479bca-7f0e-11ea-99c9-2c600c9893ee",
         "instance_name": "demo_nonha_app_3",
         "state": "active",
         "details": null,
         "action": "MIGRATE",
         "project_id": "444b05e6f4764189944f00a7288cd281",
         "id": "c0930990-65ac-4bca-88cb-7cb0e7d5c420"
      },
      {
         "instance_id": "89467f5c-d5f8-461f-8b5c-236ce54138be",
         "action_done": false,
         "host": "overcloud-novacompute-2",
         "created_at": "2020-04-15T11:43:09.000000",
         "project_state": "INSTANCE_ACTION_DONE",
         "updated_at": null,
         "session_id": "47479bca-7f0e-11ea-99c9-2c600c9893ee",
         "instance_name": "demo_nonha_app_1",
         "state": "active",
         "details": null,
         "action": null,
         "project_id": "444b05e6f4764189944f00a7288cd281",
         "id": "c6eba3ae-cb9e-4a1f-af10-13c66f61e4d9"
      },
      {
         "instance_id": "5243f1a4-9f7b-4c91-abd5-533933bb9c90",
         "action_done": false,
         "host": "overcloud-novacompute-3",
         "created_at": "2020-04-15T11:43:09.000000",
         "project_state": "INSTANCE_ACTION_DONE",
         "updated_at": null,
         "session_id": "47479bca-7f0e-11ea-99c9-2c600c9893ee",
         "instance_name": "demo_ha_app_0",
         "state": "active",
         "details": "floating_ip",
         "action": null,
         "project_id": "444b05e6f4764189944f00a7288cd281",
         "id": "d67176ff-e2e4-45e3-9a52-c069a3a66c5e"
      },
      {
         "instance_id": "4e2e24d7-0e5d-4a92-8edc-e343b33b9f10",
         "action_done": false,
         "host": "overcloud-novacompute-3",
         "created_at": "2020-04-15T11:43:09.000000",
         "project_state": "INSTANCE_ACTION_DONE",
         "updated_at": null,
         "session_id": "47479bca-7f0e-11ea-99c9-2c600c9893ee",
         "instance_name": "demo_nonha_app_0",
         "state": "active",
         "details": null,
         "action": null,
         "project_id": "444b05e6f4764189944f00a7288cd281",
         "id": "f2f7fd7f-8900-4b24-91dc-098f797790e1"
      },
      {
         "instance_id": "92aa44f9-7ce4-4ba4-a29c-e03096ad1047",
         "action_done": false,
         "host": "overcloud-novacompute-4",
         "created_at": "2020-04-15T11:43:09.000000",
         "project_state": "ACK_PLANNED_MAINTENANCE",
         "updated_at": null,
         "session_id": "47479bca-7f0e-11ea-99c9-2c600c9893ee",
         "instance_name": "demo_ha_app_1",
         "state": "active",
         "details": null,
         "action": "MIGRATE",
         "project_id": "444b05e6f4764189944f00a7288cd281",
         "id": "f35c9ba5-e5f7-4843-bae5-7df9bac2a33c"
      },
      {
         "instance_id": "afa2cf43-6a1f-4508-ba59-12b773f8b926",
         "action_done": false,
         "host": "overcloud-novacompute-0",
         "created_at": "2020-04-15T11:43:09.000000",
         "project_state": "ACK_PLANNED_MAINTENANCE",
         "updated_at": null,
         "session_id": "47479bca-7f0e-11ea-99c9-2c600c9893ee",
         "instance_name": "demo_nonha_app_4",
         "state": "active",
         "details": null,
         "action": "MIGRATE",
         "project_id": "444b05e6f4764189944f00a7288cd281",
         "id": "fea38e9b-3d7c-4358-ba2e-06e9c340342d"
      }
   ],
   "state": "PLANNED_MAINTENANCE",
   "session": {
      "workflow": "vnf",
      "created_at": "2020-04-15T11:43:09.000000",
      "updated_at": "2020-04-15T11:44:04.000000",
      "session_id": "47479bca-7f0e-11ea-99c9-2c600c9893ee",
      "maintenance_at": "2020-04-15T11:43:28.000000",
      "state": "PLANNED_MAINTENANCE",
      "prev_state": "START_MAINTENANCE",
      "meta": "{'openstack': 'upgrade'}"
   },
   "hosts": [
      {
         "created_at": "2020-04-15T11:43:09.000000",
         "hostname": "overcloud-novacompute-3",
         "updated_at": null,
         "session_id": "47479bca-7f0e-11ea-99c9-2c600c9893ee",
         "disabled": false,
         "maintained": true,
         "details": "3de22382-5500-4d13-b9a2-470cc21002ee",
         "type": "compute",
         "id": "426ea4b9-4438-44ee-9849-1b3ffcc42ad6",
      },
      {
         "created_at": "2020-04-15T11:43:09.000000",
         "hostname": "overcloud-novacompute-2",
         "updated_at": null,
         "session_id": "47479bca-7f0e-11ea-99c9-2c600c9893ee",
         "disabled": false,
         "maintained": true,
         "details": "91457572-dabf-4aff-aab9-e12a5c6656cd",
         "type": "compute",
         "id": "74f0f6d1-520a-4e5b-b69c-c3265d874b14",
      },
      {
         "created_at": "2020-04-15T11:43:09.000000",
         "hostname": "overcloud-novacompute-5",
         "updated_at": null,
         "session_id": "47479bca-7f0e-11ea-99c9-2c600c9893ee",
         "disabled": false,
         "maintained": true,
         "details": "87921762-0c70-4d3e-873a-240cb2e5c0bf",
         "type": "compute",
         "id": "8d0f764e-11e8-4b96-8f6a-9c8fc0eebca2",
      },
      {
         "created_at": "2020-04-15T11:43:09.000000",
         "hostname": "overcloud-novacompute-1",
         "updated_at": null,
         "session_id": "47479bca-7f0e-11ea-99c9-2c600c9893ee",
         "disabled": false,
         "maintained": true,
         "details": "52c7270a-cfc2-41dd-a574-f4c4c54aa78d",
         "type": "compute",
         "id": "be7fd08c-0c5f-4bf4-a95b-bc3b3c01d918",
      },
      {
         "created_at": "2020-04-15T11:43:09.000000",
         "hostname": "overcloud-novacompute-0",
         "updated_at": null,
         "session_id": "47479bca-7f0e-11ea-99c9-2c600c9893ee",
         "disabled": true,
         "maintained": false,
         "details": "ea68bd0d-a5b6-4f06-9bff-c6eb0b248530",
         "type": "compute",
         "id": "ce46f423-e485-4494-8bb7-e1a2b038bb8e",
      },
      {
         "created_at": "2020-04-15T11:43:09.000000",
         "hostname": "overcloud-novacompute-4",
         "updated_at": null,
         "session_id": "47479bca-7f0e-11ea-99c9-2c600c9893ee",
         "disabled": true,
         "maintained": false,
         "details": "d5271d60-db14-4011-9497-b1529486f62b",
         "type": "compute",
         "id": "efdf668c-b1cc-4539-bdb6-aea9afbcc897",
      },
      {
         "created_at": "2020-04-15T11:43:09.000000",
         "hostname": "overcloud-controller-0",
         "updated_at": null,
         "session_id": "47479bca-7f0e-11ea-99c9-2c600c9893ee",
         "disabled": false,
         "maintained": true,
         "details": "9a68c85e-42f7-4e40-b64a-2e7a9e2ccd03",
         "type": "controller",
         "id": "f4631941-8a51-44ee-b814-11a898729f3c",
      }
   ],
   "percent_done": 71,
   "action_plugin_instances": [
      {
         "created_at": "2020-04-15 11:12:16",
         "updated_at": null,
         "id": "4e864972-b692-487b-9204-b4d6470db266",
         "session_id": "47479bca-7f0e-11ea-99c9-2c600c9893ee",
         "hostname": "overcloud-novacompute-4",
         "plugin": "dummy",
         "state": null
      }
   ]
}
Error
Code Reason
400 - Bad Request Some content in the request was invalid.
404 - Not Found The requested resource could not be found.
422 - Unknown The entity of the request is not inline with resource schema
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.
DELETE
/v1/maintenance/{session_id}

Delete maintenance session

Delete a maintenance session. Usually called after the session is successfully finished.

Success

Code Reason
200 - OK Request was successful.

Error

Code Reason
400 - Bad Request Some content in the request was invalid.
422 - Unknown The entity of the request is not inline with resource schema
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.

Project API

These APIs are meant for projects (tenant/VNF) having instances on top of the infrastructure under corresponding rolling maintenance or upgrade session. Usage of these APIs expects there is an application manager (VNFM) that can interact with Fenix workflow via these APIs. If this is not the case, workflow should have a default behavior for instances owned by projects, that are not interacting with Fenix.

Project workflow session API

These APIs are generic for any cloud as instance ID should be something that can be matched to virtual machines or containers regardless of the cloud underneath.

GET
/v1/maintenance/{session_id}/{project_id}

Get project maintenance session

Get project instances belonging to the current state of maintenance session. the Project-manager receives an AODH event alarm telling about different maintenance states. Event data field length is very limited, so instances cannot be given as a list in the event. Instead, there will be an URL given to below API to get a project-specific list of instances.

Request

Name In Type Description
session_id path string uuid
project_id path string uuid

Response codes

Success
Code Reason
200 - OK
Name In Type Description
instance_ids body list of strings List of instance IDs.
{
    "instance_ids": ["109e14d9-6566-42b3-93e4-76605f264d8f",
                     "71285107-f0fc-4428-a8b2-0b3edd64bcad"]
}
Error
Code Reason
400 - Bad Request Some content in the request was invalid.
422 - Unknown The entity of the request is not inline with resource schema
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.
PUT
/v1/maintenance/{session_id}/{project_id}

Input from project to maintenance session

Project having instances on top of the infrastructure handled by a maintenance session might need to make own action for its instances on top of a host going into maintenance next, or reply an admin action to be done. This is, as the host can go down or even be removed and the instances should be then running safely somewhere else. Project manager receives an AODH event alarm telling which instances are affected and when the project is ready, it makes its own action or replies back an action which needs the admin privileges.

Request

Name In Type Description
session_id path string uuid
project_id path string uuid
instance_actions body dictionary instance ID : action string. This variable is not needed in reply to state MAINTENANCE, SCALE_IN or MAINTENANCE_COMPLETE.
state body string There can have different values depending on what is the maintenance session state to reply to. In the below example, the maintenance state is ‘PLANNED_MAINTENANCE’ and the reply state is formed by adding ‘ACK_’ or ‘NACK_’ as the prefix to reply value.
{
    "instance_actions": {"109e14d9-6566-42b3-93e4-76605f264d8f": "MIGRATE",
                         "71285107-f0fc-4428-a8b2-0b3edd64bcad": "MIGRATE"},
    "state": "ACK_PLANNED_MAINTENANCE"
}

Response codes

Success
Code Reason
200 - OK Request was successful.
Error
Code Reason
400 - Bad Request Some content in the request was invalid.
422 - Unknown The entity of the request is not inline with resource schema
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.

Project NFV constraints API

These APIs are for VNFs, VNMF and EM that are made to support ETSI defined standard VIM interface for sophisticated interaction to optimize rolling maintenance, upgrade, scaling and lifecycle management. These interface enhancements guarantees zero impact to VNF service during these operations and defining real time constraints for optimal operation performace.

PUT
/v1/maintenance/{session_id}/{project_id}/{instance_id}

Input from project instance to maintenance session

When using workflow utilizing ETSI constraints the ‘state’ ‘PREPARE_MAINTENANCE’ and ‘PLANNED_MAINTENANCE’ notifications will be instance specific. This means also the reply needs to be instance specific instead the project specific above.

Request

Name In Type Description
session_id path string uuid
project_id path string uuid
instance_id path string uuid
instance_action body string Action string
state body string There can have different values depending on what is the maintenance session state to reply to. In the below example, the maintenance state is ‘PLANNED_MAINTENANCE’ and the reply state is formed by adding ‘ACK_’ or ‘NACK_’ as the prefix to reply value.
{
    "instance_action": "MIGRATE",
    "state": "ACK_PLANNED_MAINTENANCE"
}

Response codes

Success
Code Reason
200 - OK Request was successful.
Error
Code Reason
400 - Bad Request Some content in the request was invalid.
422 - Unknown The entity of the request is not inline with resource schema
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.
GET
/v1/instance/{instance_id}

Get instance constraints saved in Fenix DB

Get instance constraints saved in Fenix DB. Initially this information is coming from VNF(M) and needs to be syncronized to Fenix.

Request

Name In Type Description
project_id body string uuid
instance_id path string uuid
instance_id body string uuid
group_id body string Instance group uuid. Should match with OpenStack server group if one exists.
instance_name body string Instance name.
migration_type body string ‘LIVE_MIGRATE’, ‘MIGRATE’ or ‘OWN_ACTION’ Own action is create new and delete old instance. Note! VNF need to obey resource_mitigation with own action This affects to order of delete old and create new to not over commit the resources. In Kubernetes also ‘EVICTION’ supported. There admin will delete instance and VNF automation like ReplicaSet will make a new instance.
max_interruption_time body integer Seconds of how long live migration can take.
resource_mitigation body boolean Instance needs double allocation when being migrated. This is true also if instance first scaled out and only then the old instance is removed. It must be True also if VNF needed to scale down, since we go over that scaled down capacity.
lead_time body integer How long lead time VNF needs for ‘migration_type’ operation. VNF needs to report back to Fenix as soon as it is ready, but at least within this time. Reporting as fast as can is crucial for optimizing infrastructure upgrade/maintenance. Zero value means interaction with VNFM is not used for this instance, but instance_group recovery_time needs to be obeyed towards max_impacted_members.
{
    "instance_id": "28d226f3-8d06-444f-a3f1-c586d2e7cb39",
    "project_id": "1ad1154137ac41799cefd5caebae379b",
    "group_id": "a01d192c-328e-4708-9b3c-9d716cd24a92",
    "instance_name": "VM1",
    "max_interruption_time": 120,
    "migration_type": "LIVE_MIGRATION",
    "resource_mitigation": True,
    "lead_time": 40
}

Response codes

Success
Code Reason
200 - OK Request was successful.
Error
Code Reason
400 - Bad Request Some content in the request was invalid.
404 - Not Found The requested resource could not be found.
422 - Unknown The entity of the request is not inline with resource schema
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.
PUT
/v1/instance/{instance_id}

Update instance constraints saved to Fenix DB

Update instance constraints to Fenix DB. Initially this information is coming from VNF(M) and needs to be syncronized to Fenix.

Request

Name In Type Description
project_id body string uuid
instance_id path string uuid
instance_id body string uuid
group_id body string Instance group uuid. Should match with OpenStack server group if one exists.
instance_name body string Instance name.
migration_type body string ‘LIVE_MIGRATE’, ‘MIGRATE’ or ‘OWN_ACTION’ Own action is create new and delete old instance. Note! VNF need to obey resource_mitigation with own action This affects to order of delete old and create new to not over commit the resources. In Kubernetes also ‘EVICTION’ supported. There admin will delete instance and VNF automation like ReplicaSet will make a new instance.
max_interruption_time body integer Seconds of how long live migration can take.
resource_mitigation body boolean Instance needs double allocation when being migrated. This is true also if instance first scaled out and only then the old instance is removed. It must be True also if VNF needed to scale down, since we go over that scaled down capacity.
lead_time body integer How long lead time VNF needs for ‘migration_type’ operation. VNF needs to report back to Fenix as soon as it is ready, but at least within this time. Reporting as fast as can is crucial for optimizing infrastructure upgrade/maintenance. Zero value means interaction with VNFM is not used for this instance, but instance_group recovery_time needs to be obeyed towards max_impacted_members.
{
    "instance_id": "28d226f3-8d06-444f-a3f1-c586d2e7cb39",
    "project_id": "1ad1154137ac41799cefd5caebae379b",
    "group_id": "a01d192c-328e-4708-9b3c-9d716cd24a92",
    "instance_name": "VM1",
    "max_interruption_time": 120,
    "migration_type": "LIVE_MIGRATION",
    "resource_mitigation": True,
    "lead_time": 40
}

Response codes

Success
Code Reason
200 - OK Request was successful.
Error
Code Reason
400 - Bad Request Some content in the request was invalid.
422 - Unknown The entity of the request is not inline with resource schema
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.
DELETE
/v1/instance/{instance_id}

Delete instance constraints from Fenix DB

When instance is deleted, the constraints should also be deleted from the Fenix DB. As Fenix is aware of existing instances, this could later be enhanced so that Fenix houskeeping could take care of removing deleted instances.

Request

Name In Type Description
instance_id path string uuid

Response codes

Success
Code Reason
200 - OK Request was successful.
Error
Code Reason
400 - Bad Request Some content in the request was invalid.
422 - Unknown The entity of the request is not inline with resource schema
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.
GET
/v1/instance_group/{group_id}

Get instance group constraints saved in Fenix DB

Get instance group constraints saved in Fenix DB. Initially this information is coming from VNF(M) and needs to be syncronized to Fenix.

Request

Name In Type Description
group_id path string Instance group uuid. Should match with OpenStack server group if one exists.
group_id body string Instance group uuid. Should match with OpenStack server group if one exists.
project_id body string uuid
instance_id path string uuid
instance_id body string uuid
group_name body string Instance group name. Should match with OpenStack server group if one exists.
migration_type body string ‘LIVE_MIGRATE’, ‘MIGRATE’ or ‘OWN_ACTION’ Own action is create new and delete old instance. Note! VNF need to obey resource_mitigation with own action This affects to order of delete old and create new to not over commit the resources. In Kubernetes also ‘EVICTION’ supported. There admin will delete instance and VNF automation like ReplicaSet will make a new instance.
max_interruption_time body integer Seconds of how long live migration can take.
resource_mitigation body boolean Instance needs double allocation when being migrated. This is true also if instance first scaled out and only then the old instance is removed. It must be True also if VNF needed to scale down, since we go over that scaled down capacity.
lead_time body integer How long lead time VNF needs for ‘migration_type’ operation. VNF needs to report back to Fenix as soon as it is ready, but at least within this time. Reporting as fast as can is crucial for optimizing infrastructure upgrade/maintenance. Zero value means interaction with VNFM is not used for this instance, but instance_group recovery_time needs to be obeyed towards max_impacted_members.
{
    "project_id": "1ad1154137ac41799cefd5caebae379b",
    "group_id": "a01d192c-328e-4708-9b3c-9d716cd24a92",
    "group_name": "vm_ha_group",
    "anti_affinity_group": True,
    "max_instances_per_host": 1,
    "max_impacted_members": 1,
    "recovery_time": 15,
    "resource_mitigation": True,
}

Response codes

Success
Code Reason
200 - OK Request was successful.
Error
Code Reason
400 - Bad Request Some content in the request was invalid.
422 - Unknown The entity of the request is not inline with resource schema
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.
PUT
/v1/instance_group/{group_id}

Update instance group constraints saved to Fenix DB

Update instance group constraints to Fenix DB. Initially this information is coming from VNF(M) and needs to be syncronized to Fenix.

Request

Name In Type Description
group_id path string Instance group uuid. Should match with OpenStack server group if one exists.
group_id body string Instance group uuid. Should match with OpenStack server group if one exists.
project_id body string uuid
group_name body string Instance group name. Should match with OpenStack server group if one exists.
anti_affinity_group body boolean Boolean
max_instances_per_host body integer Describes how many instance can be on same host if anti_affinity_group: True Already exist in OpenStack as ‘max_server_per_host’, but might not exist in different clouds.
max_impacted_members body integer Maximum amount of instances that can be impacted. Note! This can be dynamic to VNF load. This is important to know how many instances can be scaled down and still have this value above zero to be able to move VMs between nodes.
recovery_time body integer VNF recovery time after operation to instance. Workflow needs to take into account recovery_time for previous instance moved and only then start moving next obyeing max_impacted_members Note! regardless anti_affinity group or not.
resource_mitigation body boolean Instance needs double allocation when being migrated. This is true also if instance first scaled out and only then the old instance is removed. It must be True also if VNF needed to scale down, since we go over that scaled down capacity.
{
    "project_id": "1ad1154137ac41799cefd5caebae379b",
    "group_id": "a01d192c-328e-4708-9b3c-9d716cd24a92",
    "group_name": "vm_ha_group",
    "anti_affinity_group": True,
    "max_instances_per_host": 1,
    "max_impacted_members": 1,
    "recovery_time": 15,
    "resource_mitigation": True,
}

Response codes

Success
Code Reason
200 - OK Request was successful.
Error
Code Reason
400 - Bad Request Some content in the request was invalid.
422 - Unknown The entity of the request is not inline with resource schema
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.
DELETE
/v1/instance_group/{group_id}

Delete instance group constraints from Fenix DB

When instance group is deleted, the constraints should also be deleted from the Fenix DB. As Fenix is aware of existing instances, this could later be enhanced so that Fenix houskeeping could take care of removing deleted instances.

Request

Name In Type Description
group_id path string Instance group uuid. Should match with OpenStack server group if one exists.

Response codes

Success
Code Reason
200 - OK Request was successful.
Error
Code Reason
400 - Bad Request Some content in the request was invalid.
422 - Unknown The entity of the request is not inline with resource schema
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.