cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

server: fix listnetworkofferings with domain, refactor listvpofferings

Open shwstppr opened this issue 2 years ago β€’ 5 comments

Description

Fixes #6745

Types of changes

  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] New feature (non-breaking change which adds functionality)
  • [x] 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?

Using API with cmk,

(local) πŸ‚ > create domain name=d1
{
  "domain": {
    "haschild": false,
    "id": "afd89eeb-da02-4701-8b87-df0701d8c4a8",
    "level": 1,
    "name": "d1",
    "parentdomainid": "fcb3da55-37e0-11ed-b99e-645d8651f45a",
    "parentdomainname": "ROOT",
    "path": "ROOT/d1",
    "secondarystoragetotal": 0
  }
}
(local) 🐷 > create domain name=d2
{
  "domain": {
    "haschild": false,
    "id": "e52fe7a9-0f29-4463-84c4-21bcadf0b99f",
    "level": 1,
    "name": "d2",
    "parentdomainid": "fcb3da55-37e0-11ed-b99e-645d8651f45a",
    "parentdomainname": "ROOT",
    "path": "ROOT/d2",
    "secondarystoragetotal": 0
  }
}
(local) πŸ™‰ > create networkoffering name=n1 displaytext=n1 domainid=fcb3da55-37e0-11ed-b99e-645d8651f45a,fcb3da55-37e0-11ed-b99e-645d8651f45a guestiptype=Isolated traffictype=Guest
{
  "networkoffering": {
    "availability": "Optional",
    "conservemode": true,
    "created": "2022-09-19T12:07:33+0530",
    "displaytext": "n1",
    "domain": "/",
    "domainid": "fcb3da55-37e0-11ed-b99e-645d8651f45a",
    "egressdefaultpolicy": true,
    "forvpc": false,
    "guestiptype": "Isolated",
    "hasannotations": false,
    "id": "391ae3f6-a931-44d7-9ed4-5e24b8bbffe4",
    "internetprotocol": "IPv4",
    "isdefault": false,
    "ispersistent": false,
    "name": "n1",
    "networkrate": 200,
    "service": [],
    "serviceofferingid": "08886d07-11eb-48e1-ac7f-f0f92fbfe085",
    "specifyipranges": false,
    "specifyvlan": false,
    "state": "Disabled",
    "supportspublicaccess": false,
    "supportsstrechedl2subnet": false,
    "traffictype": "Guest"
  }
}
(local) πŸ„ > list networkofferings domainid=afd89eeb-da02-4701-8b87-df0701d8c4a8 filter=id,name,state
{
  "count": 15,
  "networkoffering": [
    {
      "id": "32c33040-c64b-4f2a-aa4e-fefd72e5e4d4",
      "name": "DefaultSharedNetworkOfferingWithSGService",
      "state": "Enabled"
    },
    ...
    {
      "id": "391ae3f6-a931-44d7-9ed4-5e24b8bbffe4",
      "name": "n1",
      "state": "Disabled"
    }
  ]
}
(local) 🐞 > list networkofferings domainid=e52fe7a9-0f29-4463-84c4-21bcadf0b99f  filter=id,name,state
{
  "count": 15,
  "networkoffering": [
    {
      "id": "32c33040-c64b-4f2a-aa4e-fefd72e5e4d4",
      "name": "DefaultSharedNetworkOfferingWithSGService",
      "state": "Enabled"
    },
    ...
    {
      "id": "391ae3f6-a931-44d7-9ed4-5e24b8bbffe4",
      "name": "n1",
      "state": "Disabled"
    }
  ]
}

shwstppr avatar Sep 19 '22 06:09 shwstppr

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

acs-robot avatar Sep 19 '22 06:09 acs-robot

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

blueorangutan avatar Sep 19 '22 06:09 blueorangutan

UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6748 (SL-JID-2379)

blueorangutan avatar Sep 19 '22 06:09 blueorangutan

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

9.8% 9.8% Coverage
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Sep 19 '22 07:09 sonarqubecloud[bot]

Codecov Report

Merging #6748 (744d839) into main (5665782) will increase coverage by 0.00%. The diff coverage is 2.94%.

@@            Coverage Diff             @@
##               main    #6748    +/-   ##
==========================================
  Coverage     11.76%   11.77%            
- Complexity     7661     7669     +8     
==========================================
  Files          2503     2505     +2     
  Lines        245958   246169   +211     
  Branches      38374    38390    +16     
==========================================
+ Hits          28946    28995    +49     
- Misses       213248   213402   +154     
- Partials       3764     3772     +8     
Impacted Files Coverage Ξ”
.../main/java/com/cloud/domain/dao/DomainDaoImpl.java 19.49% <0.00%> (-1.89%) :arrow_down:
...ain/java/com/cloud/network/vpc/VpcManagerImpl.java 8.62% <0.00%> (-0.03%) :arrow_down:
.../cloud/configuration/ConfigurationManagerImpl.java 12.51% <20.00%> (+0.03%) :arrow_up:
...com/cloud/agent/manager/ConnectedAgentAttache.java 25.00% <0.00%> (-12.50%) :arrow_down:
...m/resource/wrapper/LibvirtReadyCommandWrapper.java 61.53% <0.00%> (-11.19%) :arrow_down:
...dstack/network/contrail/model/ModelObjectBase.java 21.15% <0.00%> (-7.70%) :arrow_down:
...ava/com/cloud/upgrade/dao/Upgrade41510to41520.java 12.50% <0.00%> (-1.79%) :arrow_down:
...ava/com/cloud/upgrade/dao/Upgrade41720to41800.java 0.64% <0.00%> (-1.25%) :arrow_down:
...ava/com/cloud/upgrade/dao/Upgrade41520to41600.java 6.45% <0.00%> (-1.02%) :arrow_down:
...udstack/consoleproxy/ConsoleAccessManagerImpl.java 5.30% <0.00%> (-0.25%) :arrow_down:
... and 25 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Sep 19 '22 08:09 codecov[bot]

@blueorangutan package

DaanHoogland avatar Dec 13 '22 09:12 DaanHoogland

@DaanHoogland 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 avatar Dec 13 '22 09:12 blueorangutan

Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_multiplication_x: suse15. SL-JID 4901

blueorangutan avatar Dec 13 '22 18:12 blueorangutan

Not ready. Need to test after latest commit

shwstppr avatar Dec 14 '22 08:12 shwstppr

@blueorangutan package

shwstppr avatar Jan 10 '23 07:01 shwstppr

@shwstppr 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 avatar Jan 10 '23 07:01 blueorangutan

Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 5221

blueorangutan avatar Jan 10 '23 08:01 blueorangutan

@blueorangutan package

shwstppr avatar Jan 13 '23 11:01 shwstppr

@shwstppr 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 avatar Jan 13 '23 11:01 blueorangutan

@blueorangutan package

shwstppr avatar Jan 13 '23 11:01 shwstppr

@shwstppr 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 avatar Jan 13 '23 11:01 blueorangutan

Packaging result: :heavy_multiplication_x: el7 :heavy_multiplication_x: el8 :heavy_multiplication_x: el9 :heavy_multiplication_x: debian :heavy_multiplication_x: suse15. SL-JID 5264

blueorangutan avatar Jan 13 '23 11:01 blueorangutan

@blueorangutan package

DaanHoogland avatar Jan 20 '23 10:01 DaanHoogland

@DaanHoogland 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 avatar Jan 20 '23 11:01 blueorangutan

@DaanHoogland refactor to use DomainManagerImpl is failing build with unit test failures in CreateNetworkOfferingTest. I don't have a solution for it right now

shwstppr avatar Jan 20 '23 11:01 shwstppr

Packaging result: :heavy_multiplication_x: el7 :heavy_multiplication_x: el8 :heavy_multiplication_x: el9 :heavy_multiplication_x: debian :heavy_multiplication_x: suse15. SL-JID 5346

blueorangutan avatar Jan 20 '23 12:01 blueorangutan

@blueorangutan package

shwstppr avatar Jan 20 '23 12:01 shwstppr

@shwstppr 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 avatar Jan 20 '23 12:01 blueorangutan

Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 5351

blueorangutan avatar Jan 20 '23 13:01 blueorangutan

@blueorangutan test

DaanHoogland avatar Jan 20 '23 14:01 DaanHoogland

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

blueorangutan avatar Jan 20 '23 14:01 blueorangutan

Trillian test result (tid-5928) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 44332 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6748-t5928-kvm-centos7.zip Smoke tests completed. 107 look OK, 0 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File

blueorangutan avatar Jan 21 '23 02:01 blueorangutan

@blueorangutan package

shwstppr avatar Jan 23 '23 10:01 shwstppr

@shwstppr 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 avatar Jan 23 '23 10:01 blueorangutan

Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 5373

blueorangutan avatar Jan 23 '23 11:01 blueorangutan