Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Consider other conditions while listing templates with id#4452

Merged
DaanHoogland merged 2 commits intoapache:masterapache/cloudstack:masterfrom
ravening:template-check-fixravening/cloudstack:template-check-fixCopy head branch name to clipboard
Nov 17, 2020
Merged

Consider other conditions while listing templates with id#4452
DaanHoogland merged 2 commits intoapache:masterapache/cloudstack:masterfrom
ravening:template-check-fixravening/cloudstack:template-check-fixCopy head branch name to clipboard

Conversation

@ravening
Copy link
Member

@ravening ravening commented Nov 6, 2020

Description

Many of the searching conditions are not considered when
template id is passed but they are considered only when
template id is not passed. Move other conditions out of else
part so that they will be considered when id is passed.

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)

Screenshots (if appropriate):

How Has This Been Tested?

Without changes

(local) mgt01 > list templates templatefilter=all filter=id,hypervisor, id="45be18c7-c0fd-11ea-ba74-067606003392"
{
  "count": 1,
  "template": [
    {
      "hypervisor": "KVM",
      "id": "45be18c7-c0fd-11ea-ba74-067606003392"
    }
  ]
}
(local) mgt01 >
(local) mgt01 >
(local) mgt01 > list templates templatefilter=all filter=id,hypervisor, id="45be18c7-c0fd-11ea-ba74-067606003392" hypervisor=XenServer
{
  "count": 1,
  "template": [
    {
      "hypervisor": "KVM",
      "id": "45be18c7-c0fd-11ea-ba74-067606003392"
    }
  ]
}

With changes

(local) mgt01 > list templates templatefilter=all filter=id,hypervisor id="d9411172-3832-4fc9-a771-39514e0a9faa" hypervisor=KVM
{
  "count": 1,
  "template": [
    {
      "hypervisor": "KVM",
      "id": "d9411172-3832-4fc9-a771-39514e0a9faa"
    }
  ]
}
(local) mgt01 > list templates templatefilter=all filter=id,hypervisor id="d9411172-3832-4fc9-a771-39514e0a9faa" hypervisor=XenServer
(local) mgt01 >

Many of the searching conditions are not considered when
template id is passed but they are considered only when
template id is not passed. Move other conditions out of else
part so that they will be considered when id is passed.
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.

more diff than changes, code looks good

Comment on lines -3437 to -3441
// List<HypervisorType> hypers = null;
// if (!isIso) {
// hypers = _resourceMgr.listAvailHypervisorInZone(null, null);
// }

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2341

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Trillian test result (tid-3134)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 32721 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4452-t3134-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
Smoke tests completed. 86 look OK, 0 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File

@DaanHoogland
Copy link
Contributor

@rhtyd simple fix for API usage quirk, can you review? cc @PaulAngus

@DaanHoogland DaanHoogland added this to the 4.15.0.0 milestone Nov 17, 2020
@DaanHoogland DaanHoogland merged commit 2f5ed9e into apache:master Nov 17, 2020
@ravening ravening deleted the template-check-fix branch November 18, 2020 07:31
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.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.