179 Commits

Author SHA1 Message Date
Abhishek Kumar
7010f855b5 Merge branch 'master' into storage-offering-domains-zones 2019-07-12 10:21:51 +05:30
Abhishek Kumar
5df11b5c43 ui: fix custom offerings selection in upload volume form (#3479)
Removed duplicate code for diskOffering field.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2019-07-11 15:14:53 +05:30
Abhishek Kumar
fc8381549d Merge branch 'master' into storage-offering-domains-zones 2019-06-28 17:33:41 +05:30
Abhishek Kumar
58474530f6 api: snapshot, snapshotpolicy tag support (#3228)
Problem: Currently tags cannot be applied to snapshot when it is being created but through separate “create tags” API calls. For snapshot policies tags cannot be set either at creation or through “create tags” API.

Root Cause: The “create snapshots” API does not support adding tags during creation and it can only be done through “create tags” API. Snapshot policy as a resource does not support tags and no tags can be set for them through any API.

Solution: Tag support for snapshot policy has been added. Snapshot policy with tags when executed will produce snapshots containing the same tags from snapshot policy.

Following APIs have been updated:

Both “create snapshotpolicy” and “create snapshot” now accepts “tags” as a new parameter. The expected format for “tags” parameter is similar to parameter “tags” in “create tags“ API.
Deletion support for tags associated with snapshots policy has been added to “delete snapshotpolicies” API.
Tags set for snapshot policies are added to the Response of “list snapshotpolicies“ API.
UI support for setting tags to snapshots and snapshot policy is provided through the corresponding menus with a new section in each form to set tags.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2019-06-27 09:21:08 +05:30
Abhishek Kumar
5628bd1fc7 Merge branch 'master' into storage-offering-domains-zones 2019-06-26 02:24:48 +05:30
Abhishek Kumar
1b79466dd9 server: allow disk offering selection for volume from snapshot (#3246)
Problem: Volume created from a snapshot does not show its disk offering.

Root Cause: The volume created from a snapshot of a root disk does not have a disk offering therefore the disk offering of the created volume from the snapshot is empty.

Solution: Refactored createVolume API and extended UI to allow user to select a disk offering while creating a volume using a root disk volume snapshot. For creating volumes using data disk volume snapshot, the disk offering given by the snapshot will be assigned. Disk offering selection in the UI form for volume creation from snapshot is depicted in screenshot below.

Signed-off-by: Abhishek Kumar <abhishek.kumar@shapeblue.com>
2019-06-25 22:00:24 +05:30
Abhishek Kumar
cf347c89ea Merge branch 'master' into storage-offering-domains-zones 2019-06-18 12:52:34 +05:30
Anurag Awasthi
1c963bac13 ui: Add more info for creating volume snapshots (#3390)
Add more details in console logs and event details.
Also show popup on successful completition of snapshots.

Fixes: #3327
2019-06-13 15:50:10 +05:30
Abhishek Kumar
c85b3e597a server: ability to create disk offerings for domain(s) and zone(s)
Allows creating storage offerings associated with particular domain(s) and zone(s). In create disk/storage offfering form UI, a mult-select control has been addded to select desired zone(s) and domain select element has been made multi-select.
createDiskOffering API has been modified to allow passing list of domain and zone IDs with keys domainids and zoneids respectively. These lists are stored in DB in cloud.disk_offering_details table with 'domainids' and 'zoneids' key as string of comma separated list of IDs. Response for create, update and list disk offering APIs will return domainids, domainnames, zoneids and zonenames in details object of offering.
listDiskOfferings API has been modified to allow passing zoneid to return only offerings which are associated with the zone.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2019-05-24 09:56:23 +05:30
Abhishek Kumar
9b14e17a58 server: fix for vm snapshot search (#3208) (#3257)
Using db column instead of VO variable name was causing issue with SQL select statement.
This change fixes the problem by using VO variable for adding conditional.

Fixes #3208

Using db column instead of VO variable name was causing issue with SQL select statement.
This PR fixes the problem by using VO variable for adding conditional.
Additionally in UI listAll parameter was being sent twice in the listVMSnapshot API call. It is fixed with this PR.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2019-04-08 14:18:00 +05:30
Rafael Weingärtner
883b313b9d
[migrateVolume API method] Filter disk offerings based on storage pool selected (#2612)
After using the feature introduced by #2486 in production, we felt the need for an improvement in the UI.  It is interesting to filter the displayed disk offerings according to the type of storage selected (local/shared) to migrate the volume to.
2018-05-04 08:04:10 -03:00
Rafael Weingärtner
d6cbd774b7
[CLOUDSTACK-10323] Allow changing disk offering during volume migration (#2486)
* [CLOUDSTACK-10323] Allow changing disk offering during volume migration

This is a continuation of work developed on PR #2425 (CLOUDSTACK-10240), which provided root admins an override mechanism to move volumes between storage systems types (local/shared) even when the disk offering would not allow such operation. To complete the work, we will now provide a way for administrators to enter a new disk offering that can reflect the new placement of the volume. We will add an extra parameter to allow the root admin inform a new disk offering for the volume. Therefore, when the volume is being migrated, it will be possible to replace the disk offering to reflect the new placement of the volume.

The API method will have the following parameters:

* storageid (required)
* volumeid (required)
* livemigrate(optional)
* newdiskofferingid (optional) – this is the new parameter

The expected behavior is the following:

* If “newdiskofferingid” is not provided the current behavior is maintained. Override mechanism will also keep working as we have seen so far.
* If the “newdiskofferingid” is provided by the admin, we will execute the following checks
** new disk offering mode (local/shared) must match the target storage mode. If it does not match, an exception will be thrown and the operator will receive a message indicating the problem.
** we will check if the new disk offering tags match the target storage tags. If it does not match, an exception will be thrown and the operator will receive a message indicating the problem.
** check if the target storage has the capacity for the new volume. If it does not have enough space, then an exception is thrown and the operator will receive a message indicating the problem.
** check if the size of the volume is the same as the size of the new disk offering. If it is not the same, we will ALLOW the change of the service offering, and a warning message will be logged.

We execute the change of the Disk offering as soon as the migration of the volume finishes. Therefore, if an error happens during the migration and the volume remains in the original storage system, the disk offering will keep reflecting this situation.

* Code formatting

* Adding a test to cover migration with new disk offering (#4)

* Adding a test to cover migration with new disk offering

* Update test_volumes.py

* Update test_volumes.py

* fix test_11_migrate_volume_and_change_offering

* Fix typo in Java doc
2018-04-26 20:05:55 -03:00
Rafael Weingärtner
5d9ae35506 Remove 'todb' in favor of 'encodeURIComponent'. (#2572)
While executing the find/replace, I found some blocks of duplicated code. Therefore, I extracted the duplicated part to an utils file, and then removed the duplicated blocks.
2018-04-16 13:44:27 +02:00
Rafael Weingärtner
2037dc9eb3
[CLOUDSTACK-10257]Create template/volume does not allow to specify HVM requirement (#2437) 2018-03-02 08:07:53 -03:00
Nitesh Sarda
37e5d36316 CLOUDSTACK-10284:Creating a snapshot from VM Snapshot generates error if hypervisor is not KVM. 2018-02-14 22:33:32 +05:30
Rohit Yadav
0102e8593d CLOUDSTACK-10129: UX improvements and event timeline
- Fixes timezone issue where dates show up as nvalid in UI
- Introduces new event timeline listing/filtering of events
- Several UI improvements to add columns in list views
- Bulk operations support in instance list view to shutdown and destroy
  multiple-selected VMs (limitation: after operation, redundant entries
  may show up in the list view, refreshing VM list view fixes that)
- Align table thead/tbody to avoid splitting of tables

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-12-23 09:22:44 +05:30
Abhinandan Prateek
4627fb2cd7 CLOUDSTACK-9972: Enhance listVolume API to include physical size and … (#2158)
* CLOUDSTACK-9972: Enhance listVolume API to include physical size and utilization.
Also fixed pool, cluster and pod info

* CLOUDSTACK-9972: Fix volume_view and duplicate API constant

* CLOUDSTACK-9972: Backport Do not allow vms to be deployed on hosts that are in disabled pod

* CLOUDSTACK-9972: Fix localization missing keys

* CLOUDSTACK-9972: Fix sql path
2017-11-05 21:44:43 +05:30
Harika Punna
6bb0ca2f85 This feature separates the snapshot creation on primary and its backing up on secondary.
As part of this, a new parameter, which is optional, is added to CreateSnapshotCmd, which seperates the creation and backup.

More details in the FS-
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Separate+creation+and+backup+operations+for+a+volume+snapshot
2017-10-04 14:39:03 +05:30
Rashmi D
e43a4b9a09 CLOUDSTACK-9697: Added better error message user if tries to shrink (#2145)
the VM ROOT volume size

Skip the API call altogether if the UI detects this and throw a more user friendly message
2017-08-03 00:45:45 +02:00
subhash yedugundla
553eadcd7a CLOUDSTACK-9585 UI doesn't give an option to select the xentools version 2017-06-05 17:16:24 +05:30
Anshul And Priyank
ec66256149 CLOUDSTACK-9604: Root disk resize support for VMware and XenServer. 2017-03-09 19:20:38 +05:30
Wei Zhou
a2428508e2 CLOUDSTACK-8746: vm snapshot implementation for KVM
(1) add support to create/delete/revert vm snapshots on running vms with QCOW2 format
(2) add new API to create volume snapshot from vm snapshot
(3) delete metadata of vm snapshots before stopping/migrating and recover vm snapshots after starting/migrating
(4) enable deleting of VM snapshot on stopped vm or vm snapshot is not listed in qcow2 image.
(5) enable smoke tests for vmsnaphsots on KVM
2017-01-24 21:47:30 +01:00
Rohit Yadav
b68ae1949e ui: show resize volume button to all users
The resize volume is support on all major hypervisors (Xen, VMware, KVM).
The hypervisor key is returned by the list volumes response only for admins
but not for users or domain admin users. This removes the check, as the operation
is supported on all major hypervisors that CloudStack supports.

With this changes all users would see resize volume button in the UI.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-06-23 12:27:51 +05:30
Mike Tutkowski
2bd035d199 Support for backend snapshots with XenServer 2016-05-13 01:02:04 -06:00
Nitin Kumar Maharana
55f8b32aa0 CLOUDSTACK-9132: API createVolume takes empty string for name parameter
Added conditions to check if the name is empty or blank.
If it is empty or blank, then it generates a random name.
Made the name field as optional in UI as well as in API.
Added required unit tests.
2016-01-08 13:41:41 +05:30
Rohit Yadav
f30fbe9a5c Merge branch '4.6' 2015-12-07 12:44:07 +05:30
Wei Zhou
d6e21f7416 CLOUDSTACK-9101: add UI support for root volume resize 2015-12-03 14:54:47 +01:00
Rohit Yadav
ad592835c8 CLOUDSTACK-9020: Metrics views for CloudStack UI
Implements various metrics views based on a listView based widget that has following
properties:
  - vertically and horizontally scrollable with pagination/infinite scrolling
  - sortable columns (client side)
  - groupable/collapsible columns
  - alternate row coloring
  - refresh button to refresh views
  - threshold table cell coloring
  - panel/breadcrumb navigation
  - quick view action column
  - translatable labels
  - sorts after metrics is refreshed, if a column was previously sorted
  - sorts after adding rows on infinite scrolling if a column was pre-sorted
- Metrics views: Zones, Clusters, Hosts, Instances, Storage pools, Volumes
- Resource filtering/navigation: Zones->Clusters->Hosts->Instances->Volumes,
                                 Storage Pool->Volumes

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-11-19 15:17:44 +05:30
Wei Zhou
92344c006d CLOUDSTACK-5863: revert volume snapshot for KVM/QCOW2 2015-08-24 11:01:50 +02:00
Milamber
4be622e4ff Add missing localization for some labels in Web UI
- on new functionnality: upload volume/template from Local
- on the zone configuration wizard for the "Next" button
- update French messages properties from transifex
- Improve some French translations ("Téléverser" for "Upload")
2015-08-12 17:30:15 +01:00
Kevin Dierkx
3acdd916b0 Removed large chunks of commented code 2015-08-07 14:55:59 +02:00
Kevin Dierkx
471a02d6a4 Removed leading tabs from ui/scripts/*.js 2015-08-07 11:58:13 +02:00
Kevin Dierkx
2bdbaf453e Removed trailing whitespace from ui/scripts/*.js 2015-08-07 11:25:15 +02:00
Rajani Karuturi
8571314406 Fixed blocker issues reported by sonarqube in js files
All of them are trailing comma in array or object

more details @
https://analysis.apache.org/component_issues?id=org.apache.cloudstack%3Acloudstack#resolved=false|severities=BLOCKER|languages=js
2015-05-20 17:19:20 +05:30
ramamurtis
5646a07513 CLOUDSTACK-8427: Some messages are hard-coded in javascript after Volume upload branch merge(0b835592)
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>

This closes #208
2015-04-29 15:00:11 +05:30
Rajani Karuturi
0b8355920e Merge branch 'volume-upload' into master
This closes #206
2015-04-29 11:12:53 +05:30
Remi Bergsma
a7f8059fd3 CLOUDSTACK-6543 Sort domain lists in UI
As recently discussed on the dev list:
This sorts the domain lists based on their path.
Especially handy when having a lot of domains,
like in a public cloud.
2015-04-12 23:21:43 -05:00
Rohit Yadav
72430247ed CLOUDSTACK-8364: don't async poll for deleteVolume which is not an async API
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 1ef585f9e65e0854984211f11d5c2c7c2977a957)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-09 12:41:57 +05:30
Pierre-Luc Dion
e86c7a2a9a CLOUDSTACK-1359: add UI information about GB definition 2015-03-08 22:48:28 -04:00
ramamurtis
da1d8f9dce volume upload: fixed the UI after the change to move params to header.
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2015-02-27 17:40:06 +05:30
Rohit Yadav
39dce59562 CLOUDSTACK-6541: Fix monthly recurring snapshot UI limit, limit to 1-28 days
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 070813a106e548be44963a3f7787861a642b115b)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-19 15:42:53 +05:30
Rohit Yadav
d82879e548 CLOUDSTACK-5824: poll for delete snapshot and volume events
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit a85aea74ded3c8d1aadec19a9e7f062a34ce63fc)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-19 15:34:16 +05:30
Rajani Karuturi
41382f6f04 Volume upload: state goes to " UploadAbandoned " state when uploaded thru UI. 2015-02-17 11:52:35 +05:30
Jessica Wang
a696947eaf CLOUDSTACK-8182: UI > volumes > upload volume from URL > add Custom Disk Offering field which is optional. 2015-01-26 16:36:26 -08:00
Jessica Wang
a25d77473d CLOUDSTACK-8182: UI > volumes > upload volume from URL > add Custom Disk Offering field which is optional. 2015-01-26 14:50:34 -08:00
Jessica Wang
26acdd7f6c volume-upload: volumes > (1) Shorten action label to make all items in header to fit into one line, otherwise search box will be pushed out of place. (2) Add dialog: move URL field to the top. 2015-01-22 13:23:08 -08:00
Jessica Wang
d79c3714d2 volume-upload: UI > storage > volumes > add new action "Upload Volume from Local" in header of listView. 2015-01-21 16:30:12 -08:00
Jessica Wang
aa9a7f50b7 Revert "Add to storage->upload volume dialog"
This reverts commit 8641de85d2da4d755cfe966ea5c6c3aaf4abc2b5.
2015-01-19 15:56:48 -08:00
Brian Federle
8641de85d2 Add to storage->upload volume dialog 2015-01-19 11:35:42 -08:00
Wei Zhou
fc1a09ff49 Add snapshotName parameter in CreateSnapshotCmd 2014-12-04 15:29:39 +01:00