cloudstack
cloudstack copied to clipboard
Improving code related to the Agent properties
Description
The classes AgentProperties and AgentPropertiesFileHandler were previously created to map the existing properties of the agent.properties file to facilitate their use; however, only a few properties were mapped at the time.
This PR aims to build on those changes. All of the properties of the agent.properties file were mapped in the AgentProperties class. While executing the mapping, I found some properties that were used in the code, but were not documented in the "agent.properties" file. These properties were also documented, and registered accordingly in the properties file.
The way the properties were accessed in the code was changed, and now the values are obtained through the AgentPropertiesFileHandler class. Also, Unit Tests were added and modified according to necessity.
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)
- [x] 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
- [x] Major
- [ ] Minor
Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [ ] Minor
- [ ] Trivial
Screenshots (if appropriate):
How Has This Been Tested?
This was manually tested in a local lab, by altering properties and performing main actions: creating and deleting VMs, creating new Volumes and snapshots, etc.
PR Analysis
https://sonarcloud.io/summary/new_code?id=apachecloudstack&pullRequest=6348
PR Coverage Report
| CLASS | INSTRUCTION MISSED | INSTRUCTION COVERED | BRANCH MISSED | BRANCH COVERED | LINE MISSED | LINE COVERED |
|---|---|---|---|---|---|---|
| BridgeVifDriver | 1116 | 125 | 151 | 17 | 222 | 29 |
| IvsVifDriver | 812 | 0 | 106 | 0 | 162 | 0 |
| LibvirtComputingResource | 8573 | 2026 | 1026 | 144 | 1899 | 452 |
| OvsVifDriver | 643 | 135 | 82 | 12 | 106 | 34 |
| KVMStorageProcessor | 5982 | 498 | 446 | 22 | 1236 | 71 |
@paulazomig can you merge the latest main to your PR branch?
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
@paulazomig youĺl need to solve a conflict
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6348 (SL-JID-1838)
SonarCloud Quality Gate failed.
please have a look at these @paulazomig . There are certainly some that can be improved.
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6348 (SL-JID-1881)
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6348 (SL-JID-1898)
SonarCloud Quality Gate failed.
@paulazomig can you go through these ^? most make sense and though some are from before your days in the project they might be little effort for a small improvement making the code more robust.
SonarCloud Quality Gate failed.
![]()
![]()
0 Bugs
![]()
0 Vulnerabilities
![]()
0 Security Hotspots
![]()
16 Code Smells
20.4% Coverage
0.0% Duplication
@paulazomig can you go through these ^? most make sense and though some are from before your days in the project they might be little effort for a small improvement making the code more robust.
@DaanHoogland I will address those code defects/smells as soon as possible.
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6348 (SL-JID-1914)
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6348 (SL-JID-1915)
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6348 (SL-JID-1929)
Found UI changes, kicking a new UI QA build @blueorangutan ui








