Versions Compared

Key

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

...

Base Candidate Class 

AttributeRequiredContentValuesDescription
inventory_providerYStringaai
inventory_typeY

String

candidate_idYStringCloud, Service, Vfmodule, Transport, NSSI
candidate_idtypeYString
uniquenessYBoolean
costYString

...

 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

...

languagejs
collapsetrue

https://docs.onap.org/projects/onap-optf-has/en/latest/sections/homingspecification.html

MODEL

AttributeRequiredContent
cloud-regionYdict
complexY

dict

flavorsYdict
sriov_automation*Nboolean


Service object

EXAMPLE : https://docs.onap.org/projects/onap-optf-has/en/latest/sections/homingspecification.html

...

MODEL

AttributeRequiredContent
ValuesDescriptionlocation
generic-vnfYdict
vlan_info*Y
Object

location_id, location_type

dict

cloud-regionYdict
service-instance
complex_info
Y

Object

physical_location_id, complex_name, latitude, longitude, state, country, city, regioncloud_infoNObjectcloud_region_version, cloud_ownerother attributesObjectflavors,  sriov_automation 

Service object

EXAMPLE

dict
complexYdict
sriov_automation*Nboolean


Vfmodule object

EXAMPLE : https://docs.onap.org/projects/onap-optf-has/en/latest/sections/homingspecification.html

MODEL

AttributeRequiredContent
generic-vnfYdict
cloud-regionY

dict

vlan_info*Ydict
vserverYdict
service-instanceYdict
vf-moduleYdict
complexYdict
l-interfacesYdict
sriov_automation*Nboolean


Transport object

EXAMPLE : https://docs.onap.org/projects/onap-optf-has/en/latest/sections/homingspecification.html

...

languagejs
collapsetrue

...

MODEL

AttributeRequiredContent
ValuesDescriptionlocation_info
service-instanceY
Object

location_id, location_type

dict
complex
vlan_info
Y

Object

vlan_key, port_keycloud_infoNObjectcloud_region_version, cloud_owner, vim_id

Vfmodule object

EXAMPLE

Code Block
languagejs
collapsetrue
{  			
"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" : "",   

"host_id" : "",
"vlan_key" : "",
"port_key" : "",

"sriov_automation" : "",

"nf-name" : ""
"nf-id" : ""
"nf-type" : ""
"vnf-type" : ""
"ipv4-oam-address" : ""
"ipv6-oam-address" : ""
"vf-module-name" : ""
"vf-module-id" : ""
"service_instance_id" : ""
"sriov_automation" : ""
"vservers" : [
                 {
                      "vserver-id" : ""
                      "vserver-name" : ""
                      "l-interfaces" : [
                                {
                                   "interface-id" : ""
                                   "interface-name" : ""
                                   "macaddr" : ""
                                   "network-id" : ""
                                   "network-name" : ""
                                   "ipv4-addresses" : ""
                                   "ipv6-addresses" : ""
                                }
                         ]
                  }
               ]

}

MODEL

...

location_id, location_type

...

Object

...

Transport object

EXAMPLE

Code Block
languagejs
collapsetrue
{  			
"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" : "",   

"zone_id" : "",
"zone_name" : "",

"sriov_automation" : "",

}

MODEL

...

location_id, location_type

...

Object

...

NSSI object

EXAMPLE

Code Block
languagejs
collapsetrue
{  			
"inventory_provider" : "",
"inventory_type" : "",
"candidate_id" : "",
"uniqueness" : "",
"cost" : "",
"service_resource_id" : "",

}

MODEL

...

Object

CONFIGURATION

Applicable fields of all the models should be present in the configuration

location_info = ["location_id", "location_type"]

zone_info = ["zone_id", "zone_name"]

cloud_info = ["vim_id". "cloud_region_version", "cloud_owner"]

vlan_info = ["host_id", "vlan_key", "port_key"]

complex_info = ["physical_location_id". "complex_name", "latitude", "longitude", "state", "country", "city", "region", ]

Base candidate class

inventory_provider, inventory_type, candidate_id, uniqueness, cost, service_resource_id

Example of how a cloud inventory type should be defined

...

dict

zoneYdict

Design

In the data module, after fetching the data from AAI the candidate gets populated like this 

JSON Viewer
modeText
width475
height500
{
   "candidate_id":"1ac71fb8-ad43-4e16-9459-c3f372b8236d",
   "candidate_type":"service",
   "inventory_type":"service",
   "inventory_provider":"aai",
   "cost":"100",
   "cloud_region":{
      "location_id":"DLLSTX9A",
      "location_type":"azure",
      "cloud_owner":"att-aic",
      "cloud_region_version":"1.1"
   },
   "generic_vnf":{
      "host_id":"vnf_123456"
   },
   "complex":{
      "latitude":"32.897480",
      "longitude":"-97.040443",
      "city":"Dallas",
      "state":"TX",
      "country":"USA",
      "region":"US",
      "complex_name":"dalls_one",
      "physical_location_id":"DLLSTX9A"
   }
}

While returning to solver;

JSON Viewer
modeText
width475
height400
{
    "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",
    "state": "TX",
    "country": "USA",
    "region": "US",
    "complex_name": "dalls_one",
    "cloud_owner": "att-aic",
    "cloud_region_version": "1.1",
    "physical_location_id": "DLLSTX9A"
}

...