175 Commits

Author SHA1 Message Date
Murali Reddy
5769fde46b bug 7194:New API for adding range of public & private ports in port forwarding rule addition
adding support for port ranges in port forwarding rules.
2011-05-19 18:32:09 +05:30
alena
c2afcdec52 bug 9873: always add default security group to the SG list when deploy vm in 1) Basic zone 2) Advance zone using SG enabled network
status 9873: resolved fixed

Following fixes were made as a part of the checkin:

* When deploy user vm and SG doesn't exist in the DB, create it automatically.
* SecurityGroup enabled use vm start: if map to default group is not present in security_group_vm_map table, create one.
* Added "name" (securityGroupName) parameter back to deleteSecurityGroup/authorizeSecurityGroupIngress/deployVm. Mutually exclusive with security group id parameter.

Conflicts:

	api/src/com/cloud/api/commands/AuthorizeSecurityGroupIngressCmd.java
	api/src/com/cloud/api/commands/DeleteSecurityGroupCmd.java
	api/src/com/cloud/api/commands/DeployVMCmd.java
	server/src/com/cloud/api/ApiDBUtils.java
	server/src/com/cloud/vm/UserVmManagerImpl.java
2011-05-17 15:08:13 -07:00
nit
d91999533b bug 9397 : CreateTemplate - generate MD5 checksum of the template. The code will calculate the checksum after the template has been created in the secondary storage. This code would be executed by ssvm. This would be agnostic of the way the template was created (not hypervisor specific). 2011-05-10 12:26:00 +05:30
alena
2df6b0a6e1 bug 9774: display non-ready templates. Added "state" field to all snapshot* api responses. 2011-05-06 16:48:27 -07:00
Jessica Wang
48765a8ae9 bug 9534: CloudStack API - extend listServiceOfferings API to return limitCpuUse. 2011-05-04 15:27:07 -07:00
Chiradeep Vittal
303e2a7481 Start of zonesfeature / mycloud/cloudkit 2011-05-03 10:40:17 -07:00
Alex Huang
6ce656220f bug 9643: propagate fix from 2.2.4 2011-04-29 17:51:42 -07:00
alena
b7e4ec1749 bug 9564: 1) For all list commands set pageSize() to default.page.size if not specified 2) When pageSize is specified in the request, and it's more than default.page.size - throw an exception
status 9564: resolved fixed
2011-04-29 16:57:38 -07:00
prachi
b2b01bfcd2 Bug 8830 - Return parent template ID from templates created off of a snapshot
Changes:
- Added a new column `source_template_id` to vm_template table to carry the parent/source template ID from which the tempalte was created
- Added the column in db upgrade 224 to 225
- Changed code to save the source_template_id if there is one associated to the volume/ volume from which the snapshot was taken
- API response returns the sourcetemplateid field, if set, in all template usecases.
2011-04-29 15:40:59 -07:00
Alex Huang
99bc15f64a changed getName to getHostname 2011-04-29 08:34:10 -07:00
nit
f5cc308e77 bug 7140: Add MAC address in response list of LlistVirtualMachines API.
status 7140: resolved fixed
2011-04-29 18:41:46 +05:30
prachi
25fd7cd999 Merging changes from zonesfeature branch: Adding dhcp_provider parameter to UpdateZoneCmd 2011-04-28 23:28:14 -07:00
prachi
86b386e8c0 Merging changes from zonesfeature branch for Bug 8026 - discern proper cluster/pod/zone for added host (and refactor AgentManagerImpl)
- CreateZone API creates a zoneToken, inserts in DB and returns it in the
response

- UpdateZone API takes in 'details' map that is loaded to data_center_details
2011-04-28 23:08:58 -07:00
prachi
b84a7477f0 Bug 9539 - cpu.overprovisioning.factor does not work
Changes:
- Changed host allocators/planner  to use cpu.overprovisioning.factor
- Removed following: while adding a new host, we were setting the total_cpu in op_host_capacity to be actual_cpu * cpu.overprovisioning.factor. Now we set it to actual_cpu.
- ListCapacities response now calculates the total CPU as actual * cpu.overprovisioning.factor (This change does not add anything new - listCapacities was pulling total CPU from op_host_capacity DB earlier which had the cpu.overprovisioning.factor applied already. Now we need to apply it over the DB entry.)
- HostResponse has a new field: 'cpuWithOverprovisioning' that returns the cpu after applying the cpu.overprovisioning.factor

- Db Upgrade 222 to 224 now updates the total_cpu in op_host_capacity to be the actual_cpu for each Routing host.
2011-04-22 18:09:31 -07:00
alena
41e5e38fef bug 9336: securityGroups can be used by other securityGroups in the same domain only; no cross domain SG authentication
status 9336: resolved fixed

Following changes were made:

* deleteSecurityGroup/authorizeSecurityGroupIngress - removed account/domainId parameters as SG is uniquely identified by id now
* removed account_name field from securityGroup DB table; removed allowed_security_group/allowed_sec_grp_acct from security_ingress_rule.
These values were used for api response generation only for performance purposes; added caching on API level to improve performance
* Added missing security checks for securityGroups/ingressRules
2011-04-22 11:35:29 -07:00
alena
1a6d78eae4 Code cleanup. No need to declare runtime exceptions (CloudRuntimeException, InvalidParameterException, PermissionDenied exceptions) 2011-04-21 16:26:53 -07:00
prachi
734e3f17c2 Bug 9331 - Even when there is no longer clusters in the pod, 'Delete Pod - Failed - because there are clusters in this pod'
Changes:
- Cluster entry is not removed from the table when a cluster is deleted because there are some foreign key constraints failing if the row delete is attempted. Instead the cluster is marked as 'removed'
- While deleting the pod changed the check to see if pod has any clusters - we now check that there are no clusters with removed column null.

- Also pod entry cannot be deleted from the db due to  foreign key constraints. So added 'removed' column to Pod table host_pod_ref
- Now on deleting a pod, the pod will be marked as removed and pod name is set to null.
2011-04-15 16:04:16 -07:00
Frank
92155522f2 Add license header to files 2011-04-14 11:23:14 -07:00
prachi
c3d2bab81b Some more changes for Bug 8932 - add md5 sum to list templates call:
Also changed 'RegisterTemplate' to take in a new optional parameter 'checksum'.
The value set to it is stored as-is in the DB in vm_template table, 'checksum' column.
2011-04-11 13:17:23 -07:00
nit
debe236a8d bug 8710: CONTD....Introducing a new user role in cloudstack called RESOURCE_DOMAIN_ADMIN. The role would have all the domain_admin rights and the rights to list zone,pods,clusters and so on. More info in the bug 2011-04-11 19:40:37 +05:30
prachi
77ac511225 Bug 8932 - add md5 sum to list templates call
Modified TemplateResponse to contain a new field 'checksum' of the template. The value is pulled from the vm_template table, 'checksum' column.
2011-04-08 15:01:12 -07:00
alena
0fdcba3f4f bug 8855: introduced search by zoneId to listLoadBalancerRules api. Also added "zoneId" parameter to the response
status 8855: resolved fixed
2011-04-05 14:38:47 -07:00
alena
eb696ab0ce bug 9195: don't return domR/SSVM/CPVM volumes in listVolumes api response
status 9195: resolved fixed
2011-03-30 16:33:45 -07:00
alena
eccef7022c bug 9192: don't query for securityGroups when Vm's zone is security group disabled.
status 9192: resolved fixed
2011-03-30 09:39:29 -07:00
alena
efd4cfa297 bug 9201: listNetworkOfferings - return -1 when network_rate is Unlimited; if value is NULL - return global configuration value
status 9201: resolved fixed
2011-03-29 19:26:20 -07:00
alena
9f3f99f27f bug 9192: More improvements to listVm performance - cache dataCenter/serviceOffering/Network/Template/Iso information on Api level
status 9192: resolved fixed
2011-03-29 18:42:44 -07:00
alena
46a80a599a bug 9192: multiple improvementes to listVms command.
1) No longer do multiple searches involving "domain" table; only one join with domain is being done.
2) Do join with domain table only when command is executed by domainAdmin
3) Added index for "path" field in "domain" table
4) No longer do joins with account table as account_id is already present in vm_instance table.
2011-03-29 18:42:44 -07:00
alena
f8a1278a80 Don't return rate_limit for the network offering when the limit value is NULL 2011-03-28 17:24:17 -07:00
alena
65a083b1db bug 8831: no need for "isdedicatedtodomain" and "dedicateddomainid" parameters. If 1) network is private, return account/domainId 2)If network is shared for specific domain, return domainId only 3) If network is shared in zone, don't return account/domainId
status 8831: resolved fixed
2011-03-28 16:54:09 -07:00
Alex Huang
9d158dc060 Removed the async create status for volume now that our customers don't use it 2011-03-24 20:04:23 -07:00
prachi
923f562aa8 Bug 6873: disable/enable mode for clusters (and pods and zones and hosts)
- Added a new flag 'allocation_state' to zone,pod,cluster and host
- The possible values for this flag are 'Enabled' or 'Disabled'
- When a new zone,pod,cluster or host is added, allocation_state is 'Disabled' by default.
- For existing zone,pod,cluster or host, the state is 'Enabled'.
- All Add/Update/List  commands for each of zone,pod,cluster or host can now take a new parameter 'allocationstate'
- If 'allocation_state' is 'Disabled', Allocators skip that zone or pod or cluster or pod.
- For a root admin, ListZones lists all zones including the 'Disabled' zones. But for any other user, the 'Disabled' zones are not included in the response.
- For any usecase that creates/deploys/adds/registers a resource and takes in zone as parameter, now we check if the Zone is 'Disabled'. If yes then the operation cannot be performed by a user other than root-admin. Add volume, snapshot, templates are examples of this usecase.
- To enable the root admin to test a particular pod/cluster/host, deployVM command takes in 'host_id' parameter that can be passed in only by root admin.
If this parameter is passed in by the admin, allocators do not search for hosts and use that host only. StoragePools are searched in the cluster of that host.
If VM cannot be deployed to that host, allocators and deployVM fails without retrying
2011-03-23 22:15:35 -07:00
alena
e9a10c53dc bug 8831: added 2 new parameters to create/listNetworks api: "isdedicatedtodomain" and "dedicateddomainid" 2011-03-22 10:17:08 -07:00
alena
7c1a6e4884 bug 8831: API/Management server part is done for "Dedicate Network to domain". UI part is left 2011-03-21 18:17:59 -07:00
alena
b6ae35728e bug 8816: 1) return linkLocal instead of private ip/netmask/mac in listRouters 2) return linkLocal/private ip/netmask/mac in listSystemVms response 2011-03-09 16:47:46 -08:00
prachi
889827b63a Bug 7845 - Productize DeploymentPlanner
Bug 7723 - merge or re-write host tagging into master / 2.2
Bug 7627 - Need more logging for Allocators
Bug 8317 - Add better resource allocation failure messages

Changes for Deployment Planner to use host and storagePool allocators to find deployment destination.
Also has the changes for host tag feature.
Improved the logging for allocators.
2011-02-28 13:47:51 -08:00
Edison Su
a7c6b9f28e fix security group rules 2011-02-28 12:16:40 -05:00
anthony
1970161844 bug 8714: support paraleel recursive snapshot
snapshot doesn't depend on volume any more, volume can be removed even there are snapshots on this volume

status 8714: resolved fixed
2011-02-25 22:17:13 -08:00
alena
039b11b9ba 1) Added guestIpType to the network offering; create/listNetworkOffering apis got changed accordingly.
2) Set traffic Type to be Guest for Direct/Virtual non-system default network offerings. Use this guestIpType during the network creation/implementation
2011-02-24 15:36:01 -08:00
Edison Su
cf6d430f66 return security group status per zone 2011-02-24 14:16:35 -05:00
alena
1f1e393b03 Release vnet during network shutdown for guest networks only 2011-02-23 18:50:23 -08:00
Edison Su
adbd20ca5a bug 8655: add security group for direct tagged network 2011-02-23 15:53:14 -05:00
Alex Huang
c22b37e402 latest work on db migration 2011-02-22 18:23:05 -08:00
abhishek
d73d12b905 bug 8641: removing the status field from the volume response 2011-02-22 14:07:26 -08:00
abhishek
25f27674ce bug 8641: adding a volume state in addition to volume status
status 8641: resolved fixed
2011-02-22 09:55:08 -08:00
alena
8978839d96 bug 8617: Disable firewall/lb/vpn service for Direct network offering, so when user tries to create PF/LB rule for direct IP address, it fails.
status 8617: resolved fixed
2011-02-17 14:31:05 -08:00
alena
d80caf24fd bug 8564: Changed implementation for static nat rules. Now we use separate interfaces instead of PortForwardingRules interfaces.
status 8564: resolved fixed
2011-02-15 10:45:28 -08:00
abhishek
2d3b6cc310 changing the disk offering response object, to always return the disk size in gb 2011-02-08 15:43:52 -08:00
abhishek
73eb597ba6 bug 8335: adding the security group objects to the list virtual machines response 2011-02-08 11:48:39 -08:00
alena
5c2bbf48f0 Fixed NPE in listAsyncJob apis: don't include instanceId/instanceType in the response when these values are null 2011-02-07 13:02:05 -08:00
Alex Huang
86e51eb536 Made changes to the exceptions thrown by NetworkManagerImpl 2011-02-04 11:56:20 -08:00