855 Commits

Author SHA1 Message Date
Rohit Yadav
1c81b241e7 CLOUDSTACK-8505: Don't allow non-POST requests for default login API
We add a new contract to pass Http request to authentication plugin system. In
the default login API, we disallow non-POST requests.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 9e9b231672e934292f9940d1363039a553fc7ad9)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	api/src/org/apache/cloudstack/api/auth/APIAuthenticator.java
	plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/GetServiceProviderMetaDataCmd.java
	plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LoginAPIAuthenticatorCmd.java
	plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LogoutAPIAuthenticatorCmd.java
	plugins/user-authenticators/saml2/test/org/apache/cloudstack/api/command/GetServiceProviderMetaDataCmdTest.java
	plugins/user-authenticators/saml2/test/org/apache/cloudstack/api/command/SAML2LoginAPIAuthenticatorCmdTest.java
	plugins/user-authenticators/saml2/test/org/apache/cloudstack/api/command/SAML2LogoutAPIAuthenticatorCmdTest.java
	server/src/com/cloud/api/ApiServlet.java
	server/src/com/cloud/api/auth/DefaultLoginAPIAuthenticatorCmd.java
	server/src/com/cloud/api/auth/DefaultLogoutAPIAuthenticatorCmd.java
	server/test/com/cloud/api/ApiServletTest.java
2015-05-22 11:44:34 +01:00
Koushik Das
1cd2e9bc44 Merge branch 'CLOUDSTACK-8301' of https://github.com/apache/cloudstack 2015-05-22 09:47:59 +05:30
Rene Moser
c43e4db4e0 ListFirewallEgressRulesCmd: add interfaces and minor cleanup
This commit does not implement new functionality:

* Fixes duplicate parameter in API docs.
* Fixes a bunch of typos.
* Add interfaces to make it easier for the FirewallService interface.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #249
2015-05-20 17:00:08 +01:00
Koushik Das
d423df66cc CLOUDSTACK-8301: Enable configuring local storage use for system VMs at zone level
Code cleanup, added helper method to get default system offering based on "system.vm.use.local.storage".
2015-05-19 21:32:14 +05:30
Koushik Das
3f7e31ed05 CLOUDSTACK-8301: Enable configuring local storage use for system VMs at zone level
Made system.vm.use.local.storage a zone level configuration.
2015-05-19 21:32:14 +05:30
Rohit Yadav
069aa4e5f3 CLOUDSTACK-8433: remove awsapi db usage and add upgrade cleanup path
- Removes awsapi db properties usage across codebase
- Removes references from spring xmls, test cases and TransactionLegacy
- Adds sql command to drop database cloudbridge in schema-451to460-cleanup.sql

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-06 15:22:04 +02:00
wilderrodrigues
3d22a16c4f Bump priority stragety is no longer used for redundant virtual routers
- With the changes added by the rVPC work, the bump priority became deprecated.
     This commit includes a refactor to get it removed from the following resources:
     * Java classes
     * domain_router table - removing the is_priority_bumpup column
     * Fixing unit tests

All changes were tested with:

XenServer 6.2 running under our VMWare zone
CloudStack Management Server running on MacBook Pro
MySql running on MackBook Pro
Storage Type: Local
2015-04-02 21:50:49 +02:00
Rohit Yadav
3c429ee6b5 Merge remote-tracking branch 'sbp/feature/persisten-systemvm-redundant-vpc-REBASE'
This closes #118

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-17 15:44:57 +05:30
Rajani Karuturi
e4fe7b3bbc Fixed build failure due to commit 843f6b16914159ea6241c6c1a0a04e9d0fefaed4
(cherry picked from commit 31cdb57e6b5de031d3a3f27c61fe55cf7dfb2d26)
2015-03-17 10:34:00 +05:30
wilderrodrigues
0a133c06f8 Adding nre method to NetworkDao
- listVpcNetworks() to be used for the router check task
2015-03-16 11:40:01 +01:00
wilderrodrigues
40eb579115 TK-3135 fixes for VPC restart
* removed the "is redundant" flag form the addVpcRouterToGuestNetwork() method
* removed the "is redundant" flag from the removeVpcRouterFromGuestNetwork() method
* changed the path of the master.py file in the keepalived.conf.temp file
* the call to routerDao.addRouterToGuestNetwork() in the VpcRouterDeploymentDefinition is not needed. That step will be performed once a VM is created
  - In addition, when restarting a VPC the routers will have the guest net configured, if any exists.

* Pushing the POM.xml as well, to use the old Jetty for now. Could not fix the logging problem. Will replace the POM with master version after VPC is done.
2015-03-16 11:39:17 +01:00
Antonio Fornie
09bd847040 Vpc redundancy enabled. Including Vpc & Vpc Offering creation. Marvin tests and UI. 2015-03-16 11:38:05 +01:00
Rajani Karuturi
843f6b1691 CLOUDSTACK-5236 : ability to identify where the user is from (ex. LDAP)
Added a source column to the user table.

Source now has only two values UNKNOWN,LDAP with UNKNOWN being the
default and is an enum is com.cloud.User.

When the source is UNKNOWN, the old method of authenticating against all
the available authenticators is used. If a source is available, only
that particular authenticator will be used.

added overloaded methods in AccountService to createUserAccount and
createUser with source specified.

(cherry picked from commit 5da733072e838c830720909ef5ba27ef6ce6d0b0)
2015-03-16 14:53:53 +05:30
Funs
c27c69438b hypervisors: add OVM3 plugin that supports OVM 3.2.1/3.3.x
This is a plugin that puts in ovm3 support ranging from 3.3.1 to 3.3.2. Basic
functionality is in here, advanced networking etc..

Snapshots only work when a VM is stopped now due to the semantics of OVM's raw
image implementation (so snapshots should work on a storage level underneath the
hypervisor shrug)

This closes #113

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-12 11:33:42 +05:30
Rohit Yadav
3786aa0e67 server: fix unit test to fix build
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit dd5fb2ebd6904026e2ba0b3efcb6c382f860ffdd)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-27 19:19:09 +05:30
Rohit Yadav
a75ff23131 CLOUDSTACK-8273: fix baremetal account creation
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit e000646790597cb6c245311f57761b41d23a4e34)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalVlanManagerImpl.java
2015-02-27 15:55:09 +05:30
Rohit Yadav
1a6df6f978 CLOUDSTACK-7908: Add user_id column to vm_instance table
Design Document:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Allow+VM+listing+by+User+ID

- Adds column to VMInstance DAO
- Adds column in vm_instance table
- Adds column in the UserVMJoinVO
- Adds default admin user which has UID = 2
- Adds migration path that sets user_id to first user of the accountId that
  owns the vm in vm_instance table
- Add arg on list VMs API to query by userId, add support in query layer
- Refactor VMInstanceVO and child classes to accept userId
- Add code to let service layer pass userId if loggedIn user belongs to same
  account as the owner executing an API call or use first user from owner account
- In case of CPVM and SSVM use system user ID
- Fix unit tests and spring injections

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-16 15:02:38 +05:30
Mike Tutkowski
31f67c2b3c If the HypervisorType of a storage pool is Any, we need to retrieve hosts in the given zone for each HypervisorType. 2015-01-29 19:18:04 -07:00
Kishan Kavala
f767adfe71 Bug-Id: CLOUDSTACK-3439: Include dynamically created nics in Prepare for migration command in KVM 2015-01-07 14:52:42 +05:30
Wei Zhou
af2f21894c CLOUDSTACK-7983: Create Disk/Service Offering for Domain Admin 2014-12-01 13:03:37 +01:00
Daniel Vega
02ca6f2e5b CLOUDSTACK-7917: Validating Load Balancer Rule when updating LB + unit test
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
(cherry picked from commit c919ff83d81528b89017b5f5731b2e46350e3dfa)
2014-11-25 15:55:30 +05:30
Rohit Yadav
7ff31f1b22 Merge remote-tracking branch 'origin/inetaddress'
- Tested locally against unit tests
- TravisCI build passed: https://travis-ci.org/apache/cloudstack/builds/41990351
- Manual QA passed for basic auth and saml auth using default IDP settings

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	server/src/com/cloud/api/ApiServlet.java
2014-11-25 14:32:09 +05:30
Wido den Hollander
87a7810ade Fix UnitTest ApiServlet 2014-11-24 11:48:13 +01:00
Laszlo Hornyak
3577423da9 removed executable flags from java classes
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-11-23 19:49:01 +01:00
Laszlo Hornyak
fa52ffad65 unit test for getClientAddress
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-11-23 19:48:57 +01:00
Wido den Hollander
4bd49df3f5 Use InetAddress for passing Remote Address instead of String 2014-11-21 12:10:35 +01:00
Kishan Kavala
4e896938ee BUG-ID: CLOUDSTACK-5324 when router requires upgrade throw ResourceUnavailableException with scope VirtualRouter. API willl return generic Network Unavailable error.
Reviewed-By: Damoder
2014-11-19 09:46:56 +05:30
Will Stevens
92d4a41a69 CLOUDSTACK-7822: Fixed SSL Cert Tests and relaxed chain validation 2014-11-13 09:55:49 -05:00
pdion891
b532e4f52c CLOUDSTACK-7822: fix tests CA cert 2014-11-05 10:54:21 -05:00
pdion891
f28ade56f2 Revert "CLOUDSTACK-7822: updated ssl cert(exp:2096), reactivate tests"
This reverts commit 0d1fa9102d7a87863a9f91f88af05e9f38fe6b91.
2014-10-31 17:12:54 -04:00
pdion891
0d1fa9102d CLOUDSTACK-7822: updated ssl cert(exp:2096), reactivate tests 2014-10-31 16:42:31 -04:00
Nitin Mehta
ee0f0a1cff CLOUDSTACK-7771: Throw exception while restoring vm if the template is already deleted. Also fix the usage event being generated from the right template id and fix the log message which sometime showed incorrect template id.
CLOUDSTACK-4201: listServiceOfferings API needs to be able to take virtualmachineid of SystemVM and return service offerings available for the vm to change service offering
2014-10-22 15:03:25 -07:00
Frank Zhang
ccf4c66ef1 fix expried certificate in unit test 2014-10-21 16:20:54 -07:00
Daan Hoogland
622041b513 rats 2014-10-17 11:56:07 +02:00
Daan Hoogland
1de0cb7094 restore barematel work after merge 2014-10-17 10:24:01 +02:00
Daan Hoogland
148efbb73f Merge remote-tracking branch 'origin/4.5' into merge-master
Conflicts:
	engine/schema/src/com/cloud/upgrade/dao/Upgrade441to450.java
	plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalManagerImpl.java
	plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalVlanManager.java
	plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalVlanManagerImpl.java
	plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java
	plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
	server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
	setup/db/db/schema-441to450.sql
	test/integration/component/test_deploy_vgpu_vm.py
	tools/marvin/marvin/config/test_data.py
2014-10-16 12:29:37 +02:00
Daan Hoogland
771d052381 Merge branch 'vpc-refactor-clean-for-PR' of https://github.com/schubergphilis/cloudstack 2014-10-14 20:14:50 +02:00
Wilder Rodrigues
db86bdfb2c Applygin fix from commit ID aaeadc5c44e3fe16a1deea5348b085b08b5f4f4d
Sheng Yang changed 2 classes, ut only one was related to the bug CLOUDSTACK-7605.
I applied the changed on the routerslist, used during the deployment of the virtual routers.

Tested Advanced Zone against the simulator. 69 happy tests in place
2014-10-14 15:08:13 +02:00
Wilder Rodrigues
c81b3380df Applying the latest chances from the VPC Refactor branch onto the new one.
We will keep this branch as clean as possible to avoid problems with merge.
2014-10-14 15:08:13 +02:00
Antonio Fornie
cd8cadaf9c Refactor hypervisor retrieval from VpcNwHelper and NwHelper
Conflicts:
	server/src/com/cloud/network/router/NetworkHelperImpl.java
	server/src/org/cloud/network/router/deployment/RouterDeploymentDefinition.java
	server/src/org/cloud/network/router/deployment/VpcRouterDeploymentDefinition.java
	server/test/org/cloud/network/router/deployment/VpcRouterDeploymentDefinitionTest.java
2014-10-14 15:08:09 +02:00
Antonio Fornie
2802d3b75b Refactor and test NetworkHelper#sendCommandsToRouterWithNoAnswers 2014-10-14 15:02:14 +02:00
wrodrigues
01edc8e394 adding setupPrivateGateway to new style;
removing methods from Vpc appliance;
changing the way VpcElement calls the command;

there is still work tob e done with the destroyPrivateGateway rule.

Conflicts:
	server/src/com/cloud/network/rules/VirtualNetworkApplianceFactory.java
	server/src/org/apache/cloudstack/network/topology/BasicNetworkTopology.java
	server/src/org/apache/cloudstack/network/topology/NetworkTopology.java
2014-10-14 15:02:13 +02:00
Antonio Fornie
b9bff843c6 Whole router.deployment package got 97% coverage
Conflicts:
	server/src/org/cloud/network/router/deployment/RouterDeploymentDefinitionBuilder.java
	server/test/org/cloud/network/router/deployment/VpcRouterDeploymentDefinitionTest.java
2014-10-14 15:02:13 +02:00
Antonio Fornie
3d4ddb7251 DeployRouter includes nw creation following TellDontAsk principle
Also factor out NicProfile specific methods and fix some DI config.

Conflicts:
	server/src/org/cloud/network/router/deployment/VpcRouterDeploymentDefinition.java
	server/test/org/cloud/network/router/deployment/VpcRouterDeploymentDefinitionTest.java
2014-10-14 15:02:13 +02:00
wrodrigues
adebaf2bd0 adding applyStaticRoutes to the new visitor pattern. 2014-10-14 15:02:13 +02:00
Antonio Fornie
2da3ceda31 Refactor to include network creation as actual deployment
Conflicts:
	server/src/org/cloud/network/router/deployment/RouterDeploymentDefinition.java
	server/src/org/cloud/network/router/deployment/RouterDeploymentDefinitionBuilder.java
	server/src/org/cloud/network/router/deployment/VpcRouterDeploymentDefinition.java
	server/test/org/cloud/network/router/deployment/VpcRouterDeploymentDefinitionTest.java
2014-10-14 15:02:12 +02:00
wrodrigues
16ad4122b4 moving sendCommand to the NetworkGeneralHelper;
adding handle single network method to the NetworkGeneralHelper;
moving getRealPriority to the NetworkGeneralHelper;
making priority constants part of the VirtualNetworkApplianceManager;
changing the network topology implementation in order to use the NetworkGeneralManager instead of the appliance

Conflicts:
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
	server/src/org/apache/cloudstack/network/topology/AdvancedNetworkTopology.java
	server/src/org/apache/cloudstack/network/topology/BasicNetworkTopology.java
2014-10-14 15:02:11 +02:00
Antonio Fornie
0d81cf09f6 Increasing test coverage for Vpc Deployment 2014-10-14 15:01:16 +02:00
Antonio Fornie
240a539d43 Factor out prepareDeployment and update tests 2014-10-14 15:01:16 +02:00
Antonio Fornie
d2d9157ab0 Complete tests for normal deployment and start vpc one
Conflicts:
	server/src/org/cloud/network/router/deployment/RouterDeploymentDefinitionBuilder.java
2014-10-14 15:01:16 +02:00