...
Base Candidate Class
Attribute | Required | Content | Values | Description |
---|---|---|---|---|
inventory_provider | Y | Stringaai | ||
inventory_type | Y | String Cloud, Service, Vfmodule, Transport, NSSI | ||
candidate_id | Y | String | ||
candidate_idtype | Y | String | ||
uniqueness | Y | Boolean | ||
cost | Y | String |
...
3) Vfmodule
4) Transport
5) NSSI
All the candidate for every inventory types extend from the candidate base class.
(Should the fields in models (cloud_info, complex_info, location_info ..) come from the configuration (or) should be defined in the models itself as instance variables (or) should the fields be derived from AAI)Following are the AAI objects from which the respective candidates takes the required data:
Cloud object
EXAMPLE
...
language | js |
---|---|
collapse | true |
...
: https://docs.onap.org/projects/onap-optf-has/en/latest/sections/homingspecification.html
MODEL
Attribute | Required | Content |
---|---|---|
cloud-region | Y | dict |
complex | Y | dict |
flavors | Y | dict |
sriov_automation* | N | boolean |
Service object
EXAMPLE : https://docs.onap.org/projects/onap-optf-has/en/latest/sections/homingspecification.html
MODEL
Attribute | Required | Content |
---|
generic-vnf | Y | dict |
vlan_info* | Y |
location_id, location_type
dict | ||
cloud-region | Y | dict |
service-instance | Y |
Object
Service object
EXAMPLE
...
language | js |
---|---|
collapse | true |
...
dict | ||
complex | Y | dict |
sriov_automation* | N | boolean |
Vfmodule object
EXAMPLE : https://docs.onap.org/projects/onap-optf-has/en/latest/sections/homingspecification.html
MODEL
Attribute | Required | Content |
---|---|---|
generic-vnf | Y | dict |
cloud-region | Y | dict |
vlan_info* | Y | dict |
vserver | Y | dict |
service-instance | Y | dict |
vf-module | Y | dict |
complex | Y | dict |
l-interfaces | Y | dict |
sriov_automation* | N | boolean |
Transport object
EXAMPLE : https://docs.onap.org/projects/onap-optf-has/en/latest/sections/homingspecification.html
MODEL
...
language | js |
---|---|
collapse | true |
...
Attribute | Required | Content |
---|
service-instance | Y |
location_id, location_type
dict | |
complex | Y |
Object
Vfmodule object
EXAMPLE
dict | ||
zone | Y | dict |
Design
In the data module, after fetching the data from AAI the candidate gets populated like this
Elite soft json viewer | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "candidate_id" : ""1ac71fb8-ad43-4e16-9459-c3f372b8236d", "uniqueness" : "", "costcandidate_type" : "", "service_resource_id" : "", "location_id" : "", "locationinventory_type" : "service", "physical_location_id" : "", "complexinventory_nameprovider" : "aai", "latitude" : "", "longitudecost" : "100", "city" : "", "state" : "", "cloud_region" : "", "country" : "", "vim-id" : "", "cloud_region_version" : "", "cloud_owner" : "",{ "location_id":"DLLSTX9A", "hostlocation_idtype" : "azure", "vlan_key" : "", "port_key" : "", "sriovcloud_automationowner" : "att-aic", "nf-name" : "" "nf-id" : "cloud_region_version" "nf-type:"1.1" : "" "vnf-type" : "" "ipv4-oam-address" : "" "ipv6-oam-address" : "" "vf-module-name" : "" "vf-module-id" : "" "service_instance_id" : "" "sriov_automation" : "" "vservers" : [ { "vserver-id" : "" "vserver-name" : "" }, "generic_vnf":{ "host_id":"vnf_123456" }, "complex":{ "latitude":"32.897480", "l-interfaces" : [ { "interface-id" : "" "longitude":"-97.040443", "interface-name" : "" "city":"Dallas", "macaddr" : """state":"TX", "network-id" : "" "country":"USA", "network-name" : "" "region":"US", "ipv4-addresses" : "" "complex_name":"dalls_one", "ipv6-addresses" : "" "physical_location_id":"DLLSTX9A" } ] } ] } |
MODEL
...
location_id, location_type
...
Object
...
Transport object
EXAMPLE
Code Block | ||||
---|---|---|---|---|
| ||||
{
"inventory_provider" : "",
"inventory_type" : "",
"candidate_id" : "",
"uniqueness" : "",
"cost" : "",
"service_resource_id" : "",
"location_id" : "",
"location_type" : "",
"physical_location_id" : "",
"complex_name" : "",
"latitude" : "",
"longitude" : "",
"city" : "",
"state" : "",
"region" : "",
"country" : "",
"vim-id" : "",
"cloud_region_version" : "",
"cloud_owner" : " |
While returning to solver;
Elite soft json viewer | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "candidate_id": "1ac71fb8-ad43-4e16-9459-c3f372b8236d", "candidate_type": "service", "inventory_type": "service", "inventory_provider": "aai", "host_id": "vnf_123456", "cost": "100", "location_id": "DLLSTX9A", "location_type": "azure", "latitude": "32.897480", "longitude": "-97.040443", "city": "Dallas", "zone_idstate" : "TX", "zone_name" : "", "sriov_automationcountry" : "USA", } |
MODEL
...
location_id, location_type
...
Object
...
NSSI object
EXAMPLE
Code Block | ||||
---|---|---|---|---|
| ||||
{ "inventory_providerregion" : "US", "inventory_type" : "", "candidatecomplex_idname" : "dalls_one", "uniqueness" : "", "costcloud_owner" : "att-aic", "service_resource_id" : "", } |
MODEL
...
Object
CONFIGURATION
Applicable fields of all the models should be present in the configuration
...
" |
...
zone_info = ["zone_id", "zone_name"]
cloud_ |
...
region_version" |
...
vlan_info = ["host_id", "vlan_key", "port_key"]
...
: "1.1", "physical_location_id" |
...
Base candidate class
inventory_provider, inventory_type, candidate_id, uniqueness, cost, service_resource_id
Example of how a cloud inventory type should be defined
...
: "DLLSTX9A"
} |