- Created by Yuriy Malakov, last modified by AMMAR ALBETAR on Jul 17, 2018
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 10 Next »
Table | Columns | |||||||||
ipam_ip_pool | ipam_serial_pool_id | create_date | prefix | prefix_id | address_family(v4/v6) | prefix_status:Pending, Activate, Delete | description (vfw-protect, or vfw-unprotected) | region (RegionOne, RegionTwo) | ||
ipam_ip_assignment | ipam_serial_ip_assignment_id | create_date | service_instance_id | vf_module_id | ip_adress | ip_address_type (vip, fixed, floating etc..) | prefix_id (string) | ip_address_id (string) | ip_status | ip_response |
Action | Verb | URI | JSON payload (Bare minimal) | Params | Type | Comments | JSON response | Note |
Create Prefix | POST | /api/ipam/prefixes/ | { "prefix": "192.168.10.0/24", "is_pool": true, "description": "IP Pool for private network - vFW" } | prefix | String | Pv4 or IPv6 network with mask | { "id": 10, "prefix": "10.10.10.0/24", "site": null, "vrf": null, "tenant": null, "vlan": null, "status": 1, "role": null, "is_pool": true, "description": "IP Pool for private network - vFW", "created": "2018-06-08", "last_updated": "2018-06-08T14:46:07.417407Z" } | There is a possibility to hook the prefix with the following notion: site, vft, tenant, vlan. For now, I kept things very simplistic. Casablanca: Robot to create the prefix. Robot to delete the prefix. |
is_pool | Boolean | All IP addresses within this prefix are considered usable | ||||||
description | String (100) | |||||||
Overview
The generic-resource-api is used to assign cloud parameter assignment during instantiation flow. The vf-module instantiation flow begins with the main DG, self-serve-vfmodule-assign, when the svc-action = assign in the rpc request.
The main DG will call a series of sub-DGs according to the execution order of all the predefined capability components, such as generate-name, vlan-tag-assignment, eipam-ip-assignment, etc.
For IP assignment, the main DG calls the sub-DG, self-serve-eipam-ip-assignment to start the ip assignment process.
This wiki serves as the blueprint for capability integration with generic-resource-api for ip assignments, and it is used to integrate EIPAM custom plugin to obtain ip address assignments during vf-module orchestration.
Prerequisite
The following parameters must be set in context memory prior to the self-serve-eipam-ip-assignment sub-DG is called.
- ss.capability-name
- value that matches the capability DG name; i.e. self-serve-eipam-ip-assignment
- ss.capability-action
- assign
- vnf-index
- The array index of the vnf that owns this vf-module in config tree
- vf-module-index
- The array index of this vf-module in config tree
- service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[].
Logic
1. Unresolved Parameter Resolution
- Calls self-serve-capability-param-resolution DG to resolve all the unresolved values in vf-module-parameters.param[].resource-resolution-data.resource-key[].value where resource-resolution-data.capability-name matches this DG name.
2. Call EIPAM Plugin
- The EIPAM plugin returns the ip assignment in a context variable, called eipam-ip-block
- eipam-ip-block.plans[].requests[].ip-prefix
- eipam-ip-block.plans[].requests[].ip-prefix-length
- eipam-ip-block.plans[].requests[].ReservedAssignments[0]. ReservedAssignment[3].ReservedKeyIPAddress
- Insert an entry to EIPAM_IP_ASSIGNMENTS table
3. Set Heat Parameters
The sub-DG, self-serve-vfmodule-assign will set value of then heat parameters based on the EIPAM
- vmxvre_oam_ip_0 = eipam-ip-block.plans[].requests[].ip-prefix
- vmxvre_oam_ip_prefix_0 = eipam-ip-block.plans[].requests[].ip-prefix-length
- vmxvre_oam_gateway = eipam-ip-block.plans[].requests[].ReservedAssignments[0].
- ReservedAssignment[3].ReservedKeyIPAddress
Verb | URI | JSON payload (Bare minimal) | Params | Type | Comments | JSON response | Note |
POST | /api/ipam/prefixes/{prefix-id}/available-ips/ | - | prefix-id | Integer | The ID of the prefix from which to retrieve next available IP | { "id": 26, "address": "10.10.10.2/32", "vrf": null, "tenant": null, "status": 1, "role": null, "interface": null, "description": "", "nat_inside": null, "created": "2018-06-08", "last_updated": "2018-06-08T14:59:08.319356Z" } | Loop function within the SDNC for getting the next available for each cloud param resource. |
Overview
The generic-resource-api is used to unassign cloud parameters during the vf-module unassign flow. The vf-module unassign flow begins with the main DG, self-serve-vfmodule-unassign, when the svc-action = unassign in the rpc request.
The main DG will call a series of sub-DGs according to the execution order of all the predefined capability components, such as generate-name, vlan-tag-assignment, eipam-ip-assignment, etc to unassign cloud parameters. Upon successful unassignment, the main DG will clear the service-data data in MD-SAL
Prerequisites
The following parameters must be set in context memory prior to the self-serve-eipam-ip-assignment sub-DG is called.
ss.capability-name
value that matches the capability DG name; i.e. self-serve-eipam-ip-assignment
ss.capability-action
unassign
vnf-index
The array index of the vnf that owns this vf-module in config tree
vf-module-index
The array index of this vf-module in config tree
service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param[].
Logic
1. Set EIPAM_IP_ASSIGNMENTS status
set EIPAM_IP_ASSIGNMENTS.status t0 PENDING_DELETE by service-instance-id and client-key
2. Call EIPAM Plugin unassignIp
Calls EIPAM plugin unassignIp method to unassign ip from EIPAM
3. Set Heat Parameters status
Set service-data … vf-module-parameters.param[].resource-resolution-data.status to DELETED for the following params
vmxvre_oam_ip_0
vmxvre_oam_ip_prefix_0
vmxvre_oam_gateway
Netbox Capability:
Action | Verb | URI | JSON payload (Bare minimal) | Params | Type | Comments | JSON response | Note |
Delete IP | DELETE | /api/ipam/ip-addresses/{ip-id}/ | - | ip-id | Integer | The ID of the IP address to delete | - | done as part of the VF Module delete action. |
- No labels