X-Git-Url: https://gerrit.onap.org/r/gitweb?p=multicloud%2Fframework.git;a=blobdiff_plain;f=docs%2Fspecs%2Fmulticloud_resource_capacity_check.rst;h=31a34b2a6757327372e159b9643032a8011de654;hp=9fddb85064b2edfcf031576cf8dc3455e5021e2b;hb=8c356599e38e8f6e689ba7ebdb3bf9a1d2c26459;hpb=42eec842c08392caeb29fa17fe42e543760308c0 diff --git a/docs/specs/multicloud_resource_capacity_check.rst b/docs/specs/multicloud_resource_capacity_check.rst index 9fddb85..31a34b2 100644 --- a/docs/specs/multicloud_resource_capacity_check.rst +++ b/docs/specs/multicloud_resource_capacity_check.rst @@ -2,6 +2,7 @@ .. http://creativecommons.org/licenses/by/4.0 .. Copyright (c) 2017-2018 VMware, Inc. +======================================= MultiCloud Resources Capacity Check API ======================================= @@ -50,34 +51,84 @@ check whether have enough resources for this deployment. The ouput of Multicloud will be a list of VIMs which have enough resources. There will be two part of APIs for this requirement, an check_vim_capacity API -will be added to MultiCloud borker to return a list of VIMs, another -API /capacity_check will be added to each MultiCloud plugins, and return +will be added to MultiCloud borker to return a list of VIMs, another API +/capacity_check will be added to each MultiCloud plugins, and return true or false based on whether the VIM have enought resources. When MultiCloud broker receive a POST request on check_vim_capacity, it will request to each /capacity_check API, and return a list of VIMs with a true in response data. +Format of "vim_id" complying to the functional requirement of +"Consistent ID of a Cloud Region" + +:: + {cloud-owner}/{cloud-region-id} + +Format of "VIM ID" complying to the functional requirement of +"Consistent ID of a Cloud Region" + +:: + + { + "cloud-owner": string, //cloud owner name/ID + "cloud-region-id": string, //cloud region ID + } + + Example: array of "VIM ID" looks like: + + [ + {"cloud-owner": "owner1", "cloud-region-id": "regionid1"}, + {"cloud-owner": "owner2", "cloud-region-id": "regionid2"} + ] + +Format of "AZinfo" + +:: + + { + "availability-zone-name": string, //name of available zone + "vCPUTotal": int, //number of total cores, optional field + "MemoryTotal": float, //GB,total memory, optional field + "StorageTotal": int, //GB total storage, optional field + "vCPUAvail": int, //number of available cores + "MemoryAvail": float, //GB, availablesize of memory + "StorageAvail": int, //GB, available storage + } + } + +Format of "VIMinfo" which extend the "VIM ID" as below + +:: + + { + "cloud-owner": string, //cloud owner name/ID + "cloud-region-id": string, //cloud region ID + "AZs": array, // list of AZinfo + } Input of check_vim_capacity will be :: + { "vCPU": int, // number of cores "Memory": float, // size of memory, GB "Storage": int, //GB - "VIMs": array // VIMs OOF wish to check with + "VIMs": array, //list of "VIM ID" with which OOF wish to check } Output of check_vim_capacity will be :: + { - "VIMs": array // VIMs satisfy with this resource requirement + "VIMs": array, //list of VIMinfo } Input of /capacity_check will be :: + { "vCPU": int, "Memory": float, @@ -88,8 +139,10 @@ Input of /capacity_check will be Output of /capacity_check will be :: + { - "result": bool + "result": bool, + "AZs": array, //list of AZinfo, optional field } @@ -98,4 +151,10 @@ Work Items #. Work with ESR team for location inport form. #. Add check_vim_capacity API to MultiCloud Broker. -#. Add check_vim_capacity API to each MultiCloud Plugins. \ No newline at end of file +#. Add check_vim_capacity API to each MultiCloud Plugins. + +Tests +===== + +#. Unit Tests with tox +#. CSIT Tests, the input/ouput of broker and each plugin see API design above.