Skip to content

Allow for arbitrary disk offering details to be saved/displayed - #6474

Merged
DaanHoogland merged 2 commits into
apache:mainfrom
mlsorensen:disk-offering-details-fix
Jun 28, 2022
Merged

Allow for arbitrary disk offering details to be saved/displayed#6474
DaanHoogland merged 2 commits into
apache:mainfrom
mlsorensen:disk-offering-details-fix

Conversation

@mlsorensen

Copy link
Copy Markdown
Contributor

Similar to service offering details, allow details to be provided and
displayed. Can be used for classification of offerings, etc.

Signed-off-by: Marcus Sorensen mls@apple.com

Description

This PR relaxes the disk offering details to match the way the service offering details work. With Service offering details, any arbitrary values provided can be saved and displayed, which can be used as metadata to tag, classify, or organize offerings by higher level consumers. With disk offerings, any detail that isn't recognized is ignored, so this PR relaxes that and persists arbitrary details as well.

Note that with both disk offerings and service offerings, there are a few 'special' detail keys that are marked display=false when they are persisted, and this functionality remains intact.

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)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Tested locally, properly displays arbitrary details and hides the special details that are marked display=false when queried as non-admin user.

(localhost) 🐱 > create diskoffering name=test displaytext=test disksize=1 details[0].foo=bar details[0].iopsLimit=200
{
  "diskoffering": {
    "created": "2022-06-15T16:29:17+0000",
    "details": {
      "foo": "bar",
      "iopsLimit": "200"
    },
    "disksize": 1,
    "displayoffering": true,
    "displaytext": "test",
    "hasannotations": false,
    "id": "a9787073-4704-4bdc-a03f-69e514b79926",
    "iscustomized": false,
    "name": "test",
    "provisioningtype": "thin",
    "storagetype": "shared"
  }
}
(localhost) 🐱 > set profile localhost-user
Loaded in-built API cache. Failed to read API cache, please run 'sync'.
Loaded server profile: localhost-user
Url:         http://localhost:8080/client/api
Username:    user
Domain:      /
API Key:
Total APIs:  590

(localhost-user) 🐱 > list diskofferings id=a9787073-4704-4bdc-a03f-69e514b79926
{
  "count": 1,
  "diskoffering": [
    {
      "created": "2022-06-15T16:29:17+0000",
      "details": {
        "foo": "bar"
      },
      "disksize": 1,
      "displayoffering": true,
      "displaytext": "test",
      "hasannotations": false,
      "id": "a9787073-4704-4bdc-a03f-69e514b79926",
      "iscustomized": false,
      "name": "test",
      "provisioningtype": "thin",
      "storagetype": "shared"
    }
  ]
}

Similar to service offering details, allow details to be provided and
displayed. Can be used for classification of offerings, etc.

Signed-off-by: Marcus Sorensen <mls@apple.com>
@yadvr yadvr added this to the 4.18.0.0 milestone Jun 20, 2022

@sureshanaparti sureshanaparti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

code LGTM

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@sureshanaparti a 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
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 3595

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-4339)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 36579 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6474-t4339-kvm-centos7.zip
Smoke tests completed. 98 look OK, 0 have errors
Only failed tests results shown below:

Test Result Time (s) Test File

Comment thread server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java Outdated
…gerImpl.java

Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
@acs-robot

Copy link
Copy Markdown

Found UI changes, kicking a new UI QA build
@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

1 similar comment
@blueorangutan

Copy link
Copy Markdown

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

UI build: ✖️
(SL-JID-1)

@blueorangutan

Copy link
Copy Markdown

UI build: ✔️
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6474 (SL-JID-1797)

@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@GabrielBrascher GabrielBrascher left a comment

Copy link
Copy Markdown
Member

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 7b0ebe2 into apache:main Jun 28, 2022
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.

9 participants