Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial code for mcis and vm plan with location-based algo #511

Merged
merged 2 commits into from
May 11, 2021

Conversation

seokho-son
Copy link
Member

@seokho-son seokho-son commented May 11, 2021

MCIS 최적 Plan 기능 제공을 위한 기본 코드를 추가하였습니다. (개발 버전 WIP)

  • test용 api 추가
    /ns/{nsId}/testRecommendVm

Request Body 예시

{
  "filter": {
    "policy": [
      {
        "condition": [
          {
            "operand": "4",
            "operator": ">="
          },
          {
            "operand": "4",
            "operator": "<="
          }
        ],
        "metric": "num_vCPU"
      },
      {
        "condition": [
          {
            "operand": "9",
            "operator": ">="
          },
          {
            "operand": "12",
            "operator": "<="
          }
        ],
        "metric": "mem_GiB"
      }
    ]
  },
  "limit": "string",
  "priority": {
    "policy": [
      {
        "metric": "location",
        "parameter": [
          {
            "key": "coordinateClose",
            "val": [
              "46.3772,2.3730"
            ]
          }
        ],
        "weight": "string"
      }
    ]
  }
}

결과 예시 : 필터링된 결과를 우선순위에 따라서 리스트업
(evaluationScore_01 에는 임시로, utility를 표시함. evaluationScore_02에는 임시로, 주어진 coordinate를 기준으로 떨어진 거리를 표시함)

[
{
"id": "aws-eu-west-2-c5n.xlarge",
"name": "aws-eu-west-2-c5n.xlarge",
"connectionName": "aws-eu-west-2",
"cspSpecName": "c5n.xlarge",
"os_type": "",
"num_vCPU": 4,
"num_core": 0,
"mem_GiB": 10,
"storage_GiB": 0,
"description": "",
"cost_per_hour": 0,
"num_storage": 0,
"max_num_storage": 0,
"max_total_storage_TiB": 0,
"net_bw_Gbps": 0,
"ebs_bw_Mbps": 0,
"gpu_model": "",
"num_gpu": 0,
"gpumem_GiB": 0,
"gpu_p2p": "",
"orderInFilteredResult": 1,
"evaluationStatus": "",
"evaluationScore_01": 0.96666664,
"evaluationScore_02": 5.242709,

"evaluationScore_03": 0,
"evaluationScore_04": 0,
"evaluationScore_05": 0,
"evaluationScore_06": 0,
"evaluationScore_07": 0,
"evaluationScore_08": 0,
"evaluationScore_09": 0,
"evaluationScore_10": 0,
"associatedObjectList": null,
"isAutoGenerated": false
},
{
"id": "aws-eu-central-1-c5n.xlarge",
"name": "aws-eu-central-1-c5n.xlarge",
"connectionName": "aws-eu-central-1",
"cspSpecName": "c5n.xlarge",
"os_type": "",
"num_vCPU": 4,
"num_core": 0,
"mem_GiB": 10,
"storage_GiB": 0,
"description": "",
"cost_per_hour": 0,
"num_storage": 0,
"max_num_storage": 0,
"max_total_storage_TiB": 0,
"net_bw_Gbps": 0,
"ebs_bw_Mbps": 0,
"gpu_model": "",
"num_gpu": 0,
"gpumem_GiB": 0,
"gpu_p2p": "",
"orderInFilteredResult": 2,
"evaluationStatus": "",
"evaluationScore_01": 0.93333334,
"evaluationScore_02": 6.692369,
"evaluationScore_03": 0,
"evaluationScore_04": 0,
"evaluationScore_05": 0,
"evaluationScore_06": 0,
"evaluationScore_07": 0,
"evaluationScore_08": 0,
"evaluationScore_09": 0,
"evaluationScore_10": 0,
"associatedObjectList": null,
"isAutoGenerated": false
},
{
...
"orderInFilteredResult": 3,
"evaluationStatus": "",
..
},
...,

@seokho-son seokho-son requested a review from jihoon-seo as a code owner May 11, 2021 03:07
@jihoon-seo jihoon-seo merged commit 5f04696 into cloud-barista:master May 11, 2021
@jihoon-seo
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants