Skip to content

storagetype API param in list service/disk offerings#8215

Merged
DaanHoogland merged 3 commits intoapache:mainfrom
storpool:storagetype-in-listofferings
Nov 14, 2023
Merged

storagetype API param in list service/disk offerings#8215
DaanHoogland merged 3 commits intoapache:mainfrom
storpool:storagetype-in-listofferings

Conversation

@slavkap
Copy link
Contributor

@slavkap slavkap commented Nov 10, 2023

Description

This PR fixes #8206

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI

Feature/Enhancement Scale

  • Major
  • Minor

How Has This Been Tested?


(local) 🐵 > list serviceofferings storagetype=local
{
  "count": 1,
  "serviceoffering": [
    {
      "cpunumber": 1,
      "cpuspeed": 1000,
      "created": "2023-11-10T11:41:02+0200",
      "defaultuse": false,
      "diskofferingstrictness": false,
      "displaytext": "Medium Instance",
      "dynamicscalingenabled": true,
      "encryptroot": false,
      "hasannotations": false,
      "id": "045f2740-1570-481c-9a65-cc2ce3a44c63",
      "iscustomized": false,
      "issystem": false,
      "isvolatile": false,
      "limitcpuuse": false,
      "memory": 1024,
      "name": "Medium Instance",
      "offerha": false,
      "provisioningtype": "thin",
      "rootdisksize": 0,
      "storagetype": "local"
    }
  ]
}
(local) 🐵 > list serviceofferings storagetype=shared
{
  "count": 1,
  "serviceoffering": [
    {
      "cpunumber": 1,
      "cpuspeed": 500,
      "created": "2023-11-10T11:41:02+0200",
      "defaultuse": false,
      "diskofferingstrictness": false,
      "displaytext": "Small Instance",
      "dynamicscalingenabled": true,
      "encryptroot": false,
      "hasannotations": false,
      "id": "3ac4dd4f-6f2a-4d45-a0f7-45da41ae2abd",
      "iscustomized": false,
      "issystem": false,
      "isvolatile": false,
      "limitcpuuse": false,
      "memory": 512,
      "name": "Small Instance",
      "offerha": false,
      "provisioningtype": "thin",
      "rootdisksize": 0,
      "storagetype": "shared"
    }
  ]
}
(local) 🐵 > list diskofferings storagetype=Local
{
  "count": 1,
  "diskoffering": [
    {
      "created": "2023-11-10T11:41:02+0200",
      "disksize": 0,
      "disksizestrictness": false,
      "displayoffering": true,
      "displaytext": "Custom Disk",
      "encrypt": false,
      "hasannotations": false,
      "id": "87252a0c-a3ec-49f7-92fe-64660858e309",
      "iscustomized": true,
      "name": "Custom",
      "provisioningtype": "thin",
      "storagetype": "local"
    }
  ]
}
(local) 🐵 > list diskofferings storagetype=shared
{
  "count": 3,
  "diskoffering": [
    {
      "created": "2023-11-10T11:41:02+0200",
      "disksize": 5,
      "disksizestrictness": false,
      "displayoffering": true,
      "displaytext": "Small Disk, 5 GB",
      "encrypt": false,
      "hasannotations": false,
      "id": "cc62aed2-83e1-4871-8985-211ed08ab7b2",
      "iscustomized": false,
      "name": "Small",
      "provisioningtype": "thin",
      "storagetype": "shared"
    },
    {
      "created": "2023-11-10T11:41:02+0200",
      "disksize": 20,
      "disksizestrictness": false,
      "displayoffering": true,
      "displaytext": "Medium Disk, 20 GB",
      "encrypt": false,
      "hasannotations": false,
      "id": "a96419bd-3826-4f67-9295-96da19d64a29",
      "iscustomized": false,
      "name": "Medium",
      "provisioningtype": "thin",
      "storagetype": "shared"
    },
    {
      "created": "2023-11-10T11:41:02+0200",
      "disksize": 100,
      "disksizestrictness": false,
      "displayoffering": true,
      "displaytext": "Large Disk, 100 GB",
      "encrypt": false,
      "hasannotations": false,
      "id": "61ffdca0-081a-4208-9d22-1fa4c26793ca",
      "iscustomized": false,
      "name": "Large",
      "provisioningtype": "thin",
      "storagetype": "shared"
    }
  ]
}

@codecov
Copy link

codecov bot commented Nov 10, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (e7bb89c) 28.51% compared to head (d9fb8e5) 29.16%.
Report is 8 commits behind head on main.

Files Patch % Lines
...ain/java/com/cloud/api/query/QueryManagerImpl.java 50.00% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8215      +/-   ##
============================================
+ Coverage     28.51%   29.16%   +0.65%     
- Complexity    30233    31044     +811     
============================================
  Files          5186     5186              
  Lines        365754   365873     +119     
  Branches      53489    53507      +18     
============================================
+ Hits         104289   106711    +2422     
+ Misses       247056   244548    -2508     
- Partials      14409    14614     +205     
Flag Coverage Δ
simulator-marvin-tests 25.13% <58.33%> (+0.85%) ⬆️
uitests 4.49% <ø> (-0.01%) ⬇️
unit-tests 14.80% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@kiranchavala
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@kiranchavala a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7714

Copy link
Member

@kiranchavala kiranchavala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tested manually

CMK) > list serviceofferings storagetype=local
{
  "count": 1,
  "serviceoffering": [
    {
      "cacheMode": "none",
      "cpunumber": 2,
      "cpuspeed": 1500,
      "created": "2023-11-13T04:03:14+0000",
      "defaultuse": false,
      "diskofferingstrictness": false,
      "displaytext": "localservice",
      "dynamicscalingenabled": true,
      "encryptroot": false,
      "hasannotations": false,
      "id": "b700afee-3a8b-4f76-b705-cb0d0a74bfa8",
      "iscustomized": false,
      "issystem": false,
      "isvolatile": false,
      "limitcpuuse": false,
      "memory": 2048,
      "name": "localservice",
      "offerha": false,
      "provisioningtype": "thin",
      "rootdisksize": 0,
      "storagetype": "local"
    }
  ]
}
(CMK) > list diskofferings storagetype=local
{
  "count": 1,
  "diskoffering": [
    {
      "cacheMode": "none",
      "created": "2023-11-13T04:03:33+0000",
      "disksize": 0,
      "disksizestrictness": false,
      "displayoffering": true,
      "displaytext": "localdisk",
      "encrypt": false,
      "hasannotations": false,
      "id": "96108615-c1f3-41c9-93c7-8f03f3ef27af",
      "iscustomized": true,
      "name": "localdisk",
      "provisioningtype": "thin",
      "storagetype": "local"
    }
  ]
}

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-8309)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 53498 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8215-t8309-kvm-centos7.zip
Smoke tests completed. 116 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_01_invalid_upgrade_kubernetes_cluster Failure 3606.67 test_kubernetes_clusters.py
test_02_upgrade_kubernetes_cluster Failure 3611.78 test_kubernetes_clusters.py
test_03_deploy_and_scale_kubernetes_cluster Failure 0.04 test_kubernetes_clusters.py
test_04_autoscale_kubernetes_cluster Failure 0.04 test_kubernetes_clusters.py
test_05_basic_lifecycle_kubernetes_cluster Failure 0.05 test_kubernetes_clusters.py
test_06_delete_kubernetes_cluster Failure 0.06 test_kubernetes_clusters.py
test_07_deploy_kubernetes_ha_cluster Failure 0.04 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 0.04 test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster Failure 0.05 test_kubernetes_clusters.py
test_10_vpc_tier_kubernetes_cluster Failure 50.81 test_kubernetes_clusters.py
test_11_test_unmanaged_cluster_lifecycle Error 1.23 test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown Error 67.78 test_kubernetes_clusters.py

Copy link
Member

@harikrishna-patnala harikrishna-patnala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code LGTM

@DaanHoogland DaanHoogland merged commit 04061f1 into apache:main Nov 14, 2023
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Have a parameter "storagetype" for the listServiceOfferings and listDiskOfferings api call

5 participants