update link to upper-constraints.txt
[multicloud/framework.git] / docs / specs / multicloud_resource_capacity_check.rst
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.
4
5 MultiCloud Resources Capacity Check API
6 =======================================
7
8 To better expose VIM capabilities and available resources capacity to external
9 consumer, some extensions need to be done by MultiCloud.
10
11
12 Problem Description
13 ===================
14
15 Current MultiCloud didn't expose any standard API/methods to check/publish the
16 resources capacity for each VIM, which makes external project can not realize
17 the capacity information of VIM. When a VIM with shortage resources was chosen
18 to deploy a bunch of VNFs, it will fail eventually. Exposing these information
19 will could let external project to make a better decision on choosing which VIM
20 to deploy the VNFs.
21
22
23 Propose Change
24 ==============
25
26 Cloud Locations
27 ---------------
28
29 Cloud latitude and longitude information is needed by OOF to determine the
30 distance between vGMuxInfra and vG. The latitude and longitude information
31 are part of A&AI complex schema[A&AI Complex Schema]_, which related to
32 cloud-region schema.
33
34 There is no change needed to MultiCloud, but cloud administrator need to
35 input these information when register a new VIM. Currently ESR Portal don't
36 expose these input forms to cloud administrator, need ESR team to add related
37 workflow to create complex data in A&AI and create a relationship between
38 location information and cloud-region record.
39
40 ... [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
41
42
43 Available Resource Check
44 ------------------------
45
46 A new API will be used by OOF to check the available cloud resources, which
47 will help OOF to make a better placement decision. OOF will give a resrouces
48 requirement of a specific deployment and a list of VIMs which need to be
49 check whether have enough resources for this deployment. The ouput of
50 Multicloud will be a list of VIMs which have enough resources.
51
52 There will be two part of APIs for this requirement, an check_vim_capacity API
53 will be added to MultiCloud borker to return a list of VIMs, another
54 API <vim_id>/capacity_check will be added to each MultiCloud plugins, and return
55 true or false based on whether the VIM have enought resources. When MultiCloud
56 broker receive a POST request on check_vim_capacity, it will request to each
57 <vim_id>/capacity_check API, and return a list of VIMs with a true in response
58 data.
59
60
61 Input of check_vim_capacity will be
62
63 ::
64   {
65     "vCPU": int,  // number of cores
66     "Memory": float,  // size of memory, GB
67     "Storage": int, //GB
68     "VIMs": array  // VIMs OOF wish to check with
69   }
70
71 Output of check_vim_capacity will be
72
73 ::
74   {
75     "VIMs": array  // VIMs satisfy with this resource requirement
76   }
77
78 Input of <vim_id>/capacity_check will be
79
80 ::
81   {
82     "vCPU": int,
83     "Memory": float,
84     "Storage": int,
85   }
86
87
88 Output of <vim_id>/capacity_check will be
89
90 ::
91   {
92     "result": bool
93   }
94
95
96 Work Items
97 ==========
98
99 #. Work with ESR team for location inport form.
100 #. Add check_vim_capacity API to MultiCloud Broker.
101 #. Add check_vim_capacity API to each MultiCloud Plugins.