1707 Commits

Author SHA1 Message Date
Rohit Yadav
61644f9ea9
Merge branch '4.8' into 4.9 2016-12-05 13:51:43 +05:30
Murali Reddy
db39a06085 CLOUDSTACK-9635: fix test_privategw_acl.py
ensure VLAN used for createPrivateGateway is determined after the guest
networks in the VPC is created, so that we skip VLAN allocated for guest
network for the private network of vpc gateway
2016-12-05 09:54:45 +05:30
Rohit Yadav
5d7288b858
Merge branch '4.8' into 4.9 2016-12-01 10:38:43 +05:30
Murali Reddy
a07e7ac099 CLOUDSTACK-9634: fix marvin test failure test_router_dhcp_opts
marvin, VirtualMachine object, nic attribute does not have nic's in any
particualr order in the array. soi check isdefault attribute to the get non-default nic

earlier test made assumption that nic[0] is default nic, which is not true always
2016-11-30 17:32:03 +05:30
Rohit Yadav
7a96d32c7e
CLOUDSTACK-9584: run component tests in Travis run
This would run additional component tests in Travis run

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-28 13:47:50 +05:30
Rohit Yadav
825935da69
Merge branch '4.8' into 4.9 2016-11-24 12:44:19 +05:30
Murali Reddy
7ab35e6616 CLOUDSTACK-9598: wrong defaut gateway for the nic in non-default network
when guest VM has nic's in more than one guest network set the tag for
each host in /etc/dhcphosts.txt, and use the tag to add exception in
/etc/dhcpopts.txt to prevent sending default route, dns server in case if the nic is in non-default network
this was the behaviour with edithosts.sh prior to 4.6

added new test case test_router_dhcp_opts to test DHCP option file use of cloudstack
2016-11-22 16:30:42 +05:30
Murali Reddy
9cc06a8fc8 CLOUDSTACK-9498: VR CsFile search utility methods fail when search string has
're' meta chars, and causing VPN user add/deelte to fail

    -there is no real use of python 're' in CsFile.py utility methods searchString, deleteLine
    Replacing with regular string search instead.

    -modifying the smoke test for VPN user add/delete to have all permissable chars
2016-10-28 17:45:15 +05:30
Rohit Yadav
fcee71f35b Merge branch '4.8' into 4.9 2016-10-28 11:43:16 +05:30
Marc-Aurèle Brothier
158497d68a CLOUDSTACK-9544: Check access on account trying to generate user API keys
This fixes CVE-2016-6813

Signed-off-by: Marc-Aurèle Brothier <m@brothier.org>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-10-27 22:15:49 +05:30
Rohit Yadav
29844a3ec9 CLOUDSTACK-9565: Fix intermittent failure in test_oobm_zchange_password
Fixes intermittent integration smoke test failures caused in
test_oobm_zchange_password test.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-10-26 10:31:35 +05:30
Murali Reddy
1f50c27fc8 CLOUDSTACK-9511: fix test_privategw_acl.py to handle multiple physical network
fix to ensure only physical network with guest traffic is picked up for
creating a private network for vpc private gateway

Signed-off-by: Murali Reddy <muralimmreddy@gmail.com>

This closes #1724
2016-10-25 13:43:43 +05:30
Murali Reddy
e1202a0b06 CLOUDSTACK-9511: fix test_privategw_acl.py to handle multiple physical network
fix to ensure only physical network with guest traffic is picked up for
creating a private network for vpc private gateway

Signed-off-by: Murali Reddy <muralimmreddy@gmail.com>

This closes #1724
2016-10-25 13:31:35 +05:30
Rohit Yadav
9b9b49e10b Merge branch '4.8' into 4.9 2016-10-21 10:14:16 +05:30
Rohit Yadav
409e504f6f CLOUDSTACK-9529: Cleanup resources after marvin test completes
- Cleans up volumes, snapshots and VM after running test_snapshots

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-10-06 16:41:51 +05:30
Rohit Yadav
0c146e14c6 CLOUDSTACK-9532: Use macchinina as a template for failing tests
- Switches to macchinina as template for VM in the tests
- Modifies the ostype of the macchinina template to 'Other Linux (64-bit)'
- Check template download status, fixes Nonetype iterable issue

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-10-06 16:41:22 +05:30
Boris
b0d527688f CLOUDSTACK-9527: test_01_test_vm_volume_snapshot making test negative again
- test_01_test_vm_volume_snapshot not supported for Xen, tests keep failing

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-10-06 15:38:08 +05:30
Rohit Yadav
5545bcaa9d CLOUDSTACK-9531: Try template teardown without failure
As per previous discussions and ticket, a template deletion may result in failure
(exception thrown) for templates that are not properly downloaded. The tearDown
method, a template may be tried for deletion but on failure we may ignore it
as account deletion/tearDown would retry to cleanup resource owned by the account.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-10-06 15:38:01 +05:30
Boris
394f2e359f CLOUDSTACK-9527: Skip tests not supported for hypervisor
- test_01_test_vm_volume_snapshot not supported for Xen, tests keep failing
- Skip snapshot tests for centos6/kvm as snapshot is not supported by older
  qemu-img versions

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-10-05 15:11:00 +05:30
Rohit Yadav
dc93268788 CLOUDSTACK-9524: Check router hypervisor before ssh to VR
SSH to VR for vmware, goes via the mgmt server and uses ssh keys at
/var/cloudstack path. Add suitable checks to tests failing on vmware.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-10-05 15:11:00 +05:30
Murali Reddy
1f27874eaf CLOUDSTACK-9522: Check for available attribute in marvin response
- Handle case where physical network instance does not have vlan attribute
- Handle case where listIso response may not have status attribute

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-10-05 15:11:00 +05:30
Boris
d4f0bf1ca9 CLOUDSTACK-9526: Marvin test_deploy_vgpu_enabled_vm.py - Fix a hardcoded username and password
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-10-05 15:11:00 +05:30
Rohit Yadav
0eb4fae8b7 CLOUDSTACK-9161: move quota test to plugins
The quota integration test requires special setup and is moved to plugins
directory as in 4.9 and master branch.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-10-05 15:11:00 +05:30
Paul Angus
79f0adf397 Marvin Tests: Fix VPC network offering selection
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-10-05 15:11:00 +05:30
Paul Angus
99da5338ff fix macchinina template specificied for vmware in Marvin tests
- Fix macchnina template url
- Fix a variable scope issue

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-10-05 15:11:00 +05:30
Paul Angus
47104cf2b3 fix ping tests to properly recognise successful ping test 2016-10-05 15:11:00 +05:30
Boris
7a1efd687e CLOUDSTACK-9514: Making the credentials of the host to be picked up from the
Use config file, instead of hardcoded crendentials

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-10-05 15:11:00 +05:30
Murali Reddy
fcdc2cc529 CLOUDSTACK-9511: fix test_privategw_acl.py to handle multiple physical networks
modified script to handle case where there can be multple physical networks
in the zone

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-10-05 15:11:00 +05:30
Rajani Karuturi
cc043e9f8f Merge pull request #1666 from murali-reddy/egress_rules
CLOUDSTACK-9480,  CLOUDSTACK-9495 fix egress rule incorrect behaviorWhen 'default egress policy' is set to 'allow' in the network offering, any egress rule that is added will 'deny' the traffic overriding the default behaviour.

Conversely, when 'default egress policy' is set to 'deny' in the network offering, any egress rule that is added will 'allow' the traffic overriding the default behaviour.

While this works for 'tcp', 'udp' as expected, for 'icmp' protocol its always set to ALLOW. This patch keeps all protocols behaviour consistent.

Results of running test/integration/component/test_egress_fw_rules.py.  With out the patch test_02_egress_fr2 test was failing. This patch fixes the test_02_egress_fr2  scenario.
-----------------------------------------------------------------------------------------------------
Test By-default the communication from guest n/w to public n/w is NOT allowed. ... === TestName: test_01_1_egress_fr1 | Status : SUCCESS ===
ok
Test By-default the communication from guest n/w to public n/w is allowed. ... === TestName: test_01_egress_fr1 | Status : SUCCESS ===
ok
Test Allow Communication using Egress rule with CIDR + Port Range + Protocol. ... === TestName: test_02_1_egress_fr2 | Status : SUCCESS ===
ok
Test Allow Communication using Egress rule with CIDR + Port Range + Protocol. ... === TestName: test_02_egress_fr2 | Status : SUCCESS ===
ok
Test Communication blocked with network that is other than specified ... === TestName: test_03_1_egress_fr3 | Status : SUCCESS ===
ok
Test Communication blocked with network that is other than specified ... === TestName: test_03_egress_fr3 | Status : SUCCESS ===
ok
Test Create Egress rule and check the Firewall_Rules DB table ... === TestName: test_04_1_egress_fr4 | Status : SUCCESS ===
ok
Test Create Egress rule and check the Firewall_Rules DB table ... === TestName: test_04_egress_fr4 | Status : SUCCESS ===
ok
Test Create Egress rule and check the IP tables ... SKIP: Skip
Test Create Egress rule and check the IP tables ... SKIP: Skip
Test Create Egress rule without CIDR ... === TestName: test_06_1_egress_fr6 | Status : SUCCESS ===
ok
Test Create Egress rule without CIDR ... === TestName: test_06_egress_fr6 | Status : SUCCESS ===
ok
Test Create Egress rule without End Port ... === TestName: test_07_1_egress_fr7 | Status : EXCEPTION ===
ERROR
Test Create Egress rule without End Port ... === TestName: test_07_egress_fr7 | Status : SUCCESS ===
ok
Test Port Forwarding and Egress Conflict ... SKIP: Skip
Test Port Forwarding and Egress Conflict ... SKIP: Skip
Test Delete Egress rule ... === TestName: test_09_1_egress_fr9 | Status : SUCCESS ===
ok
Test Delete Egress rule ... === TestName: test_09_egress_fr9 | Status : SUCCESS ===
ok
Test Invalid CIDR and Invalid Port ranges ... === TestName: test_10_1_egress_fr10 | Status : SUCCESS ===
ok
Test Invalid CIDR and Invalid Port ranges ... === TestName: test_10_egress_fr10 | Status : SUCCESS ===
ok
Test Regression on Firewall + PF + LB + SNAT ... === TestName: test_11_1_egress_fr11 | Status : SUCCESS ===
ok
Test Regression on Firewall + PF + LB + SNAT ... === TestName: test_11_egress_fr11 | Status : SUCCESS ===
ok
Test Reboot Router ... === TestName: test_12_1_egress_fr12 | Status : SUCCESS ===
ok
Test Reboot Router ... === TestName: test_12_egress_fr12 | Status : EXCEPTION ===
ERROR
Test Redundant Router : Master failover ... === TestName: test_13_1_egress_fr13 | Status : SUCCESS ===
ok
Test Redundant Router : Master failover ... === TestName: test_13_egress_fr13 | Status : SUCCESS ===
ok
-----------------------------------------------------------------------------------------------------

* pr/1666:
  fix egress rule incorrect behavior

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2016-09-21 14:54:31 +05:30
Murali Reddy
a43abbe47b fix egress rule incorrect behavior
CLOUDSTACK-9480: Egress Firewall: Incorrect use of Allow/Deny for ICMP

     fix ensures, ICMP, TCP, UDP are handled similalry w.r.t egress rule action

CLOUDSTACK-9495: Egress rules functionalty broken when protocol=all specified

     when protocol=all specified, CIDR was ignored. Fix ensures if CIDR is specified
     its always used in configuring iptable rules

 2 new test cased to test /32 CIDR
2016-09-20 16:56:06 +05:30
Rohit Yadav
14504dc7e3 CLOUDSTACK-6432: Prevent DNS reflection attacks
DNS on VR should not be publically accessible as it may be prone to DNS
amplification/reflection attacks. This fixes the issue by only allowing VR
DNS (port 53) to be accessible from guest network cidr, as per the fix in:
https://issues.apache.org/jira/browse/CLOUDSTACK-6432

- Only allows guest network cidrs to query VR DNS on port 53.
- Includes marvin smoke test that checks the VR DNS accessibility checks from
  guest and non-guest network.
- Fixes Marvin sshClient to avoid using ssh agent when password is provided,
  previous some environments may have seen 'No existing session' exception without
  this fix.
- Adds a new dnspython dependency that is used to perform dns resolutions in the
  tests.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-08-30 22:39:33 +05:30
John Burwell
8d11511b1f Adds support for four position versions and optional db upgrades
Often, patch and security releases do not require schema migrations or
data migrations.  However, if an empty upgrade class and associated
scripts are not defined, the upgrade process will break.  With this
change, if a release does not have an upgrade, a noop DbUpgrade is added
to the upgrade path.  This approach allows the upgrade to proceed and
for the database to properly reflect the installed version.  This change
should make the release process simpler as RMs no longer need to
rememeber to create this boilerplate code when starting a new release.

Beginning with the 4.8.2.0 and 4.9.1.0 releases, the project will
formally adopt a four (4) position release number to properly accomodate
rekeases that contain only CVE fixes.  The DatabaseUpgradeChecker and
Version classes made assumptions that they would always parse and
compare three (3) position version numbers.  This change adds the
CloudStackVersion value object that supports both three (3) and four (4)
version numbers.   It encapsulates version comparsion logic, as well as,
the rules to allow three (3) and four (4) to interoperate.

  * Modifies DatabaseUpgradeChecker to handle derive an upgrade path for
  a version that was not explicitly specified.  It determines the
  releases the first release before it with database migrations and uses
  that list as the basis for the list for version being calculated.  A
  noop upgrade is then added to the list which causes no schema changes
  or data migrations, but will update the database to the version.
  * Adds unit tests for the upgrade path calculation logic in
  DatabaseUpgradeChecker
  * Removes dummy upgrade logic for the 4.8.2.0 introduced in previous
  versions of this patch
  * Introduces the CloudStackVersion value object which parses and
  compares three (3) and four (4) position version numbers.  This class
  is intended to replace com.cloud.maint.Version.
  * Adds the junit-dataprovider dependency -- allowing test data to be
  concisely generated separately from the execution of a test case.
  Used extensively in the CloudStackVersionTest.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-08-30 13:32:32 +05:30
Rohit Yadav
157b8147b9 test/integration: fix tearDown order in list_acl_ tests
In several of the list_acl_tests, the tests run for simulator only where
in the (class) setup domains and accounts are created for the test. When the
tests end the (class) teardown methods would delete and remove these resources.
Due to dependence of one of the resources on the other, domain2 on domain1,
domain2 needs to be removed/cleaned up before domain1. Due to this issue,
several Travis test runs have failed in the past such as:

https://travis-ci.org/apache/cloudstack/jobs/152610967
https://travis-ci.org/apache/cloudstack/jobs/152610968

Changing the order of cleanup fixes the tests.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-08-23 14:49:21 +05:30
Rohit Yadav
f13c224da1 Updating pom.xml version numbers for release 4.9.1.0-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-08-19 13:53:39 +05:30
Will Stevens
740bd45be6 Updating pom.xml version numbers for release 4.8.2-SNAPSHOT
Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-08-15 10:31:09 -04:00
Will Stevens
a63db21d16 Updating pom.xml version numbers for release 4.8.1
Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-08-08 10:06:21 -04:00
Will Stevens
227ff3884d Updating pom.xml version numbers for release 4.9.0
Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-07-25 16:56:04 -04:00
sanjeev
1be9e42b93 [CLOUDSTACK-9328]: Fix vlan issues from test suite test_privategw_acl.py
in BVT
Bug-Id:## CLOUDSTACK-9328

[CLOUDSTACK-9328]: Made changes as per the review comment from Shwetaag

[CLOUDSTACK-9328]: Made changes based on the CI results
2016-06-14 15:27:47 +05:30
Prashanth Manthena
7531f24d73 Nuage VSP : Enhancing Marvin test coverage 2016-06-10 14:33:09 +02:00
Prashanth Manthena
e972273bf1 CLOUDSTACK-9399 : Marvin test coverage for Nuage VSP device CRUD operations 2016-06-08 12:24:25 +02:00
Will Stevens
237bd46d55 Merge pull request #1423 from syed/ipsec-start-bug
[CLOUDSTACK-9296] Start ipsec for client VPNThis fix starts the IPSEC daemon when enabling client side vpn

* pr/1423:
  [CLOUDSTACK-9296] Start ipsec for client VPN

Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-05-27 15:21:16 -04:00
Will Stevens
20f779298d merging 4.8 -> master 2016-05-27 15:19:33 -04:00
Will Stevens
744f9d5615 Merge release branch 4.7 to 4.8
* 4.7:
  CLOUDSTACK-9376: Restrict listTemplates API with filter=all for root admin
  CLOUDSTACK-9369: Restrict default login to ldap/native users
  Add lsb-release dependency to mgmt server and agent on Debian/Ubuntu.
  Emit template UUID and class type over event bus when deleting templates.
2016-05-27 15:03:42 -04:00
Rohit Yadav
0cb60a72fe CLOUDSTACK-9376: Restrict listTemplates API with filter=all for root admin
Restricts use of listemplates API with templatefilter=all for root admin only.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-27 15:01:15 -04:00
Rohit Yadav
566e7d9fac CLOUDSTACK-9369: Restrict default login to ldap/native users
- Restricts default login auth handler to ldap and native-cloudstack users
- Refactors and create re-usable method to find domain by id/path
- Adds unit test for refactored method in DomainManagerImpl
- Adds smoke test for login handler

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-27 15:00:05 -04:00
Will Stevens
ecac28ba4e Merge pull request #1561 from sanju1010/startport
CLOUDSTACK-9388: Remove string conversion in assertion statementRemove string convertion in Assertion statement, since the start port parameter in listFirewallAPI response is of type integer

Test Result:
=========
"Checking firewall rules deletion after static NAT disable ... === TestName: test_01_firewall_rules_port_fw | Status : SUCCESS ===
ok

----------------------------------------------------------------------
Ran 1 test in 153.974s

OK

* pr/1561:
  CLOUDSTACK-9388: Remove string conversion in assertion statement

Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-05-26 15:53:01 -04:00
Syed
26227768a1 [CLOUDSTACK-9296] Start ipsec for client VPN 2016-05-26 11:25:09 -04:00
sanjeev
e363fd2702 CLOUDSTACK-9388: Remove string conversion in assertion statement 2016-05-25 14:57:29 +05:30
Prashanth Manthena
2ca0d9b0e1 Nuage VSP : Extending Marvin test coverage 2016-05-24 11:12:19 +02:00
Will Stevens
cb55624af8 Merge pull request #1523 from nlivens/bug/CLOUDSTACK-9365
CLOUDSTACK-9365 : updateVirtualMachine with userdata should not error when a VM is attached to multiple networks from which one or more doesn't support userdata

* pr/1523:
  Marvin script for cloudstack-9365
  CLOUDSTACK-9365 : updateVirtualMachine with userdata should not error when a VM is attached to multiple networks from which one or more doesn't support userdata

Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-05-20 08:34:55 -04:00