Skip to content

api: remove empty response parameters - #2751

Merged
DaanHoogland merged 1 commit into
apache:masterfrom
marcaurele:fix-api-response
Jul 20, 2018
Merged

api: remove empty response parameters#2751
DaanHoogland merged 1 commit into
apache:masterfrom
marcaurele:fix-api-response

Conversation

@marcaurele

Copy link
Copy Markdown
Member

Description

Remove response parameters missing a description, and which are not used, creating an empty entry in listApis call (see the empty {} below):

"related": "listZones,createZone",
"response": [
{
"description": "the allocation state of the cluster",
"name": "allocationstate",
"type": "string"
},
{},
{
"description": "the first DNS for the Zone",
"name": "dns1",
"type": "string"
},

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)

GitHub Issue/PRs

How Has This Been Tested?

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Testing

  • I have added tests to cover my changes.
  • All relevant new and existing integration tests have passed.
  • A full integration testsuite with all test that can run on my environment has passed.

@borisstoyanov

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@borisstoyanov

Copy link
Copy Markdown
Contributor

Hi @marcaurele, thanks for this fix. Can you please share some examples how you've tested it?

@marcaurele

marcaurele commented Jul 19, 2018

Copy link
Copy Markdown
MemberAuthor

@borisstoyanov I simply did a local compilation but I pushed before checking it went fine. I missed a line removal. I just force pushed an amend.

To test: you can check the actual empty parameters with the cs python lib:
cs listApis | grep "{}" and you should get 2 of them before the fix (based on the fork we're using), and none afterwards.

@borisstoyanov

Copy link
Copy Markdown
Contributor

Thanks @marcaurele, let me try that and will run smoketests as well

@DaanHoogland

Copy link
Copy Markdown
Contributor

looks good, Marc-aurele but are we sure they are really never filled in a response?

@marcaurele

Copy link
Copy Markdown
MemberAuthor

@DaanHoogland yes, otherwise the code won't compile.

@DaanHoogland

Copy link
Copy Markdown
Contributor

not if reflection is somehow used. not to blame you but I am a bit wary with these kind of left-overs. Actually in this case I think you are right.

@DaanHooglandDaanHoogland 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.

as in 👍

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✖centos6 ✖centos7 ✔debian. JID-2186

@borisstoyanov

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2190

@borisstoyanov

Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@borisstoyanov 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-2867)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 31906 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2751-t2867-kvm-centos7.zip
Intermitten failure detected: /marvin/tests/smoke/test_certauthority_root.py
Intermitten failure detected: /marvin/tests/smoke/test_deploy_virtio_scsi_vm.py
Intermitten failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermitten failure detected: /marvin/tests/smoke/test_public_ip_range.py
Intermitten failure detected: /marvin/tests/smoke/test_templates.py
Intermitten failure detected: /marvin/tests/smoke/test_usage.py
Intermitten failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
Intermitten failure detected: /marvin/tests/smoke/test_volumes.py
Intermitten failure detected: /marvin/tests/smoke/test_vpc_vpn.py
Intermitten failure detected: /marvin/tests/smoke/test_host_maintenance.py
Smoke tests completed. 60 look OK, 8 have error(s)
Only failed tests results shown below:

TestResultTime (s)Test File
ContextSuite context=TestDeployVirtioSCSIVM>:setupError0.00test_deploy_virtio_scsi_vm.py
test_03_vpc_privategw_restart_vpc_cleanupFailure1113.74test_privategw_acl.py
test_04_extract_templateFailure128.38test_templates.py
ContextSuite context=TestISOUsage>:setupError0.00test_usage.py
test_01_secure_vm_migrationError3.16test_vm_life_cycle.py
test_02_unsecure_vm_migrationError1.10test_vm_life_cycle.py
test_03_secured_to_nonsecured_vm_migrationError0.11test_vm_life_cycle.py
test_04_nonsecured_to_secured_vm_migrationError3.17test_vm_life_cycle.py
test_06_download_detached_volumeFailure138.72test_volumes.py
test_11_migrate_volume_and_change_offeringError129.59test_volumes.py
test_01_redundant_vpc_site2site_vpnFailure324.24test_vpc_vpn.py
test_02_cancel_host_maintenace_with_migration_jobsError3.41test_host_maintenance.py

@borisstoyanovborisstoyanov 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.

LGTM

@DaanHoogland
DaanHoogland merged commit a21ebb1 into apache:masterJul 20, 2018
borisstoyanov pushed a commit to shapeblue/cloudstack that referenced this pull request Jul 23, 2018
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@marcaurele@borisstoyanov@blueorangutan@DaanHoogland@rafaelweingartner