841 Commits

Author SHA1 Message Date
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
Wilder Rodrigues
12b0d188cb Replacing the old [Vpc}VirtualNetworkApplianceManager by the new ones;
Implement the missing commands related to DHCP PV Lan and DHCP SubNet

Conflicts:
	server/src/com/cloud/network/element/VirtualRouterElement.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
	server/src/com/cloud/network/rules/DhcpRules.java
	server/src/com/cloud/network/rules/VirtualNetworkApplianceFactory.java
	server/src/org/apache/cloudstack/network/topology/AdvancedNetworkTopology.java
	server/src/org/apache/cloudstack/network/topology/BasicNetworkTopology.java
	server/src/org/apache/cloudstack/network/topology/BasicNetworkVisitor.java
	server/src/org/apache/cloudstack/network/topology/NetworkTopologyVisitor.java
2014-10-14 15:01:16 +02:00
Antonio Fornie
a83f5790eb License headers 2014-10-14 15:01:15 +02:00
Antonio Fornie
6fac12675d More refactoring and testing in the same classes
Conflicts:
	server/src/org/cloud/network/router/deployment/RouterDeploymentDefinitionBuilder.java
2014-10-14 15:01:15 +02:00
Antonio Fornie
f3c04172a4 RouterDeployment and VPC. Improving code and Unit Testing 2014-10-14 15:01:14 +02:00
Wilder Rodrigues
b97f2b05c7 apply network acls; acls items to pvt gw; vpc ip association
Conflicts:
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
	server/src/com/cloud/network/rules/VirtualNetworkApplianceFactory.java
	server/src/org/apache/cloudstack/network/topology/BasicNetworkTopology.java
2014-10-14 15:01:14 +02:00
Wilder Rodrigues
e35fded401 commenting broken code in tests in order to run build adn tests other changes via the UI
Conflicts:
	server/test/com/cloud/network/router/VirtualNetworkApplianceManagerImplTest.java
2014-10-14 15:01:12 +02:00
Antonio Fornie
95395f9574 Deployment more OO - Objects with data and behavior
Conflicts:
	server/src/com/cloud/network/element/VirtualRouterElement.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
2014-10-14 15:01:12 +02:00
Antonio Fornie
24b230d11b Fix dependency problem. Extract and unify router deployment stuff
Conflicts:
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
2014-10-14 14:55:22 +02:00
Antonio Fornie
f28426e1a2 Extract general behavior to Router and Vpc delegates
Conflicts:
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
2014-10-14 14:51:02 +02:00
Sanjay Tripathi
176e0d47bb CLOUDSTACK-6650: Reorder Cluster list in deployment planner to protect
GPU enabled hosts from non-GPU VM deployment.
Cluster reordering is based on the number of unique host tags in a cluster,
cluster with most number of unique host tags will put at the end of list.
Hosts with GPU capability will get tagged with implicit tags defined by
global config param 'implicit.host.tags' at the time os host discovery.

Also added FirstFitPlannerTest unit test file.
2014-10-14 17:55:37 +05:30
Sanjay Tripathi
e4a8bbcdf4 CLOUDSTACK-6650: Reorder Cluster list in deployment planner to protect
GPU enabled hosts from non-GPU VM deployment.
Cluster reordering is based on the number of unique host tags in a cluster,
cluster with most number of unique host tags will put at the end of list.
Hosts with GPU capability will get tagged with implicit tags defined by
global config param 'implicit.host.tags' at the time os host discovery.

Also added FirstFitPlannerTest unit test file.
2014-10-14 17:53:50 +05:30
Nitin Mehta
a6d575b127 CLOUDSTACK-7699: Disable ROOT volume attach/detach ability. 2014-10-13 13:57:45 -07:00
amoghvk
da73d735b2 Revert "CLOUDSTACK-6650: Reorder Cluster list in deployment planner to protect"
This reverts commit d910b4ff14bcf5d9e7892b5ffd39acb47745f106 since it is causing encryption/decryption issues with RPM builds

(cherry picked from commit fbcab01ff02d30746a659fe7928c0ae9514237db)
2014-10-13 00:37:34 -04:00
Sanjay Tripathi
eb447f14e2 CLOUDSTACK:7323: [vGPU] Creation of VM snapshot with "memory" is failing.
VM snapshot with memory is not supported for VGPU VMs, so putting checks
for same.

(cherry picked from commit 123ec8b3d326b6bc743852a6bf113ac8b019f713)
2014-10-13 00:35:13 -04:00