1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. Copyright (c) 2017-2018 VMware, Inc.
5 =======================================
6 MultiCloud Resources Capacity Check API
7 =======================================
9 To better expose VIM capabilities and available resources capacity to external
10 consumer, some extensions need to be done by MultiCloud.
16 Current MultiCloud didn't expose any standard API/methods to check/publish the
17 resources capacity for each VIM, which makes external project can not realize
18 the capacity information of VIM. When a VIM with shortage resources was chosen
19 to deploy a bunch of VNFs, it will fail eventually. Exposing these information
20 will could let external project to make a better decision on choosing which VIM
30 Cloud latitude and longitude information is needed by OOF to determine the
31 distance between vGMuxInfra and vG. The latitude and longitude information
32 are part of A&AI complex schema[A&AI Complex Schema]_, which related to
35 There is no change needed to MultiCloud, but cloud administrator need to
36 input these information when register a new VIM. Currently ESR Portal don't
37 expose these input forms to cloud administrator, need ESR team to add related
38 workflow to create complex data in A&AI and create a relationship between
39 location information and cloud-region record.
41 ... [A&AI Complex Schema] https://gerrit.onap.org/r/gitweb?p=aai/aai-common.git;a=blob;f=aai-schema/src/main/resources/oxm/aai_oxm_v12.xml;h=e146c06ac675a1127ee11205c0ff2544e4d9a81d;hb=HEAD#l772
50 To support multi-tenants over the same cloud region, all APIs defined below
51 should support to accept the following optional headers which are used to
52 specify a tenant other than the default one associated with the cloud region.
56 "Project" : Tenant/Project ID or Name specified by API consumer, Optional
67 "Project: fcca3cc49d5e42caae15459e27103efc"
69 Available Resource Check
70 ------------------------
72 A new API will be used by OOF to check the available cloud resources, which
73 will help OOF to make a better placement decision. OOF will give a resrouces
74 requirement of a specific deployment and a list of VIMs which need to be
75 check whether have enough resources for this deployment. The ouput of
76 Multicloud will be a list of VIMs which have enough resources.
78 There will be two part of APIs for this requirement, an check_vim_capacity API
79 will be added to MultiCloud borker to return a list of VIMs, another API
80 <vim_id>/capacity_check will be added to each MultiCloud plugins, and return
81 true or false based on whether the VIM have enought resources. When MultiCloud
82 broker receive a POST request on check_vim_capacity, it will request to each
83 <vim_id>/capacity_check API, and return a list of VIMs with a true in response
86 Format of "vim_id" complying to the functional requirement of
87 "Consistent ID of a Cloud Region"
90 {cloud-owner}/{cloud-region-id}
92 Format of "VIM ID" complying to the functional requirement of
93 "Consistent ID of a Cloud Region"
98 "cloud-owner": string, //cloud owner name/ID
99 "cloud-region-id": string, //cloud region ID
102 Example: array of "VIM ID" looks like:
105 {"cloud-owner": "owner1", "cloud-region-id": "regionid1"},
106 {"cloud-owner": "owner2", "cloud-region-id": "regionid2"}
114 "availability-zone-name": string, //name of available zone
115 "vCPUTotal": int, //number of total cores, optional field
116 "MemoryTotal": float, //GB,total memory, optional field
117 "StorageTotal": int, //GB total storage, optional field
118 "vCPUAvail": int, //number of available cores
119 "MemoryAvail": float, //GB, availablesize of memory
120 "StorageAvail": int, //GB, available storage
124 Format of "VIMinfo" which extend the "VIM ID" as below
129 "cloud-owner": string, //cloud owner name/ID
130 "cloud-region-id": string, //cloud region ID
131 "AZs": array, // list of AZinfo
134 Input of check_vim_capacity will be
139 "vCPU": int, // number of cores
140 "Memory": float, // size of memory, GB
142 "VIMs": array, //list of "VIM ID" with which OOF wish to check
145 Output of check_vim_capacity will be
150 "VIMs": array, //list of VIMinfo
153 Input of <vim_id>/capacity_check will be
164 Output of <vim_id>/capacity_check will be
170 "AZs": array, //list of AZinfo, optional field
177 #. Work with ESR team for location inport form.
178 #. Add check_vim_capacity API to MultiCloud Broker.
179 #. Add check_vim_capacity API to each MultiCloud Plugins.
184 #. Unit Tests with tox
185 #. CSIT Tests, the input/ouput of broker and each plugin see API design above.