28240 Commits

Author SHA1 Message Date
shweta agarwal
bbdb47854d CLOUDSTACK-8756:Incorrect guest os mapping in CCP 4.2.1-6 for CentOS 5.9 2015-08-21 17:47:01 +05:30
Remi Bergsma
614ee494ee Merge pull request #700 from rafaelweingartner/master-lrg-cs-hackday-001
Removed duplicate code in CitrixResourceBase and its subclassesRemoved unnecessary duplicated code by having the body of the getPatchFiles method only in the CitrixResourceBase superclass. Given that all of its implementations consisted of the same code except for the path which contains the necessary file for that implementation. An abstract method getPatchFilePath was created in the CitrixResourceBase superclass so that each implementation may return the path containing the specific file needed by that implementation.

Test cases were created for each implementation, simple as they may be. One assert is made to verify that the path returned by each implementation corresponds to the path that was previously specified on each getPatchFiles implementation.

* pr/700:
  Removed duplicate code in CitrixResourceBase.getPatchFiles

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-20 11:20:00 +02:00
Remi Bergsma
9229f35942 Merge pull request #721 from miguelaferreira/git-merge-scripts
Add scripts to merge PRs and release fixes forwardAs it is now, additions to CloudStack need to go through a GitHub PR and, if accepted, merged to the Apache remote (not in GitHub). This means that merging a PR for CloudStack is a bit more involved than merging a normal GitHub PR. In addition to that, a PR that fixes something in an older release needs to be merged against a release branch, and then forward merged up to master (if applicable).

To help with these two kinds of merges, @remibergsma, @karuturi, @DaanHoogland and myself, have created two scripts (contributed in this PR).

One script (**git-pr**) helps in merging a PR from GitHub to the Apache remote. The script will read the PR info using GitHub's API and will create a merge commit that contains the same commit message a normal GitHub PR merge commit, plus, as extra info, a list of commits that are being merged.

The other script (**git-fwd-merge**) will create a specific merge commit message that indicates a forward merge, and lists the commits being merged.

This Apache wiki [page](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61311655) describes how to use these two scripts, and points to an even more detailed [page](https://github.com/schubergphilis/cloudstack-git-tree-manipulation/wiki) that explains the merge scenarios step-by-step.

By the way, beacause both scripts follow the naming convention for git tools, as long as they are in your "path" you can execute them as simply as "git pr" and "git fwd-merge". But be aware that, in order to use these scripts, you should make sure to remove any aliases that can cause a name clash.

* pr/721:
  Add git merge scripts

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-20 07:32:10 +02:00
Remi Bergsma
044e685c92 Revert "CLOUDSTACK-8748: VM UUID accessible in CreateVMSnapshotCommand and RevertToVMSnapshotCommand"
This reverts commit 180afe52e555f2610e81ccee1b2f1551b7b7f5e8.

This broke the build on master:
master build broken with the below error http://jenkins.buildacloud.org/job/build-master-slowbuild/2101/consoleText

   ```
   [INFO] -------------------------------------------------------------
   [ERROR] COMPILATION ERROR :
   [INFO] -------------------------------------------------------------
   [ERROR] /home/jenkins/acs/workspace/build-master-slowbuild/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixRequestWrapperTest.java:[1581,51] error: constructor CreateVMSnapshotCommand in class CreateVMSnapshotCommand cannot be applied to given types;
   [ERROR]   required: String,String,VMSnapshotTO,List<VolumeObjectTO>,String
     found: String,VMSnapshotTO,List<VolumeObjectTO>,String
     reason: actual and formal argument lists differ in length
   /home/jenkins/acs/workspace/build-master-slowbuild/plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixRequestWrapperTest.java:[1623,53] error: no suitable constructor found for RevertToVMSnapshotCommand(String,VMSnapshotTO,List<VolumeObjectTO>,String)
   [INFO] 2 errors
   [INFO] -------------------------------------------------------------
   ```

This was PR #717 towards 4.5
2015-08-20 07:21:27 +02:00
Rohit Yadav
180afe52e5 CLOUDSTACK-8748: VM UUID accessible in CreateVMSnapshotCommand and RevertToVMSnapshotCommand
This patch makes it possible to expose VM UUID to subsystems, this can be
useful for implementing VM Snapshots for KVM in future.

This was PR #717 towards 4.5

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

(cherry picked from commit 0062ff2672e257f2a4290e054e23ef4333a34983)
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-19 19:24:56 +02:00
Rohit Yadav
3fd35dd4a7 CLOUDSTACK-8749: KVM - cleanup linklocal interface based on names
This tries to avoid cleaning by a device name.

This closes #718

(cherry picked from commit 74f697a2dd6e2630fa1fa5949e41c7d539015fbf)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-19 21:43:24 +05:30
Remi Bergsma
b913c881a4 Merge pull request #719 from remibergsma/centos7-cgroup-cmount
Apply RHEL 7 fix for comounted cgroups to CentOS 7 KVM hypervisors as wellThe RHEL 7 version string is hard coded and misses CentOS 7.

* pr/719:
  RHEL 7 and CentOS 7 need the same fix
  fixing white space and formatting

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-19 17:46:52 +02:00
Miguel Ferreira
9211202bab Add git merge scripts 2015-08-19 17:22:45 +02:00
Remi Bergsma
d1cb4c7d50 RHEL 7 and CentOS 7 need the same fix 2015-08-19 16:30:24 +02:00
Remi Bergsma
14013d5d1b fixing white space and formatting 2015-08-19 16:24:44 +02:00
Rajani Karuturi
e384f2d146 Merge pull request #715 from devdeep/CLOUDSTACK-8687
CLOUDSTACK-8687: Prepare template only on a given storage poolUpdate prepare template api to seed/prepare a template only on a given primary storage. Currently, the prepare template api will seed/prepare a given template on all the primary storage pools in a zone. If however, a user wishes to prepare a template only a particular storage pool, it isn't possible. Updated the api to take storage pool id as an optional parameter. If the pool id is provided then the template is prepared only on the given primary storage pool. Also added unit tests to validate the functionality

* pr/715:
  CLOUDSTACK-8687: Unit tests for validating the prepare template functionality. These tests validate that the templates get scheduled for seeding. Additionally, if a template is already seeded, we do not try and seed it again. Tests also validate that templates are seeded to storage pools which are available.
  CLOUDSTACK-8687: Update prepare template api to seed/prepare a template only on a given primary storage. Currently, the prepare template api will seed/prepare a given template on all the primary storage pools in a zone. If however, a user wishes to prepare a template only a particular storage pool, it isn't possible. Updated the api to take storage pool id as an optional parameter. If the pool id is provided then the template is prepared only on the given primary storage pool

Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2015-08-19 15:58:42 +05:30
Rajani Karuturi
48bed3f340 Merge pull request #699 from milamberspace/L10N-update-updateMaster-20150814
Update L10N resource files on master branch with 4.6 translation strings from Transifex (20150814)

* pr/699:
  Update L10N resource files on master branch with 4.6 translation strings from Transifex (20150814)

Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2015-08-19 14:05:17 +05:30
Rajani Karuturi
ef563c5526 Merge pull request #712 from milamberspace/CLOUDSTACK-8744-AnotherMissingL10N-4-master
CLOUDSTACK-8744 Add missing localization (l10n) for several parts in the UI

- l10n for the SSH Key Pairs behavior
- l10n for Autoscaling / LB sections
- l10n for Reset password
- l10n on some strings for the installation Wizard
- l10n on some strings in VPN/VPC section
- l10n on Service offerings sections
- improve some FR translations

* pr/712:
  CLOUDSTACK-8744 Add missing localization (l10n) for several parts in the UI - l10n for the SSH Key Pairs behavior - l10n for Autoscaling / LB sections - l10n for Reset password - l10n on some strings for the installation Wizard - l10n on some strings in VPN/VPC section - l10n on Service offerings sections - improve some FR translations

Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2015-08-19 14:03:58 +05:30
Rajani Karuturi
ef783d9b1d Merge pull request #707 from borisroman/CLOUDSTACK-8736
Refactored Nic.java for readability.Only changed names and reorganized them! No functional implementation change.

See issue CLOUDSTACK-8736 for ongoing effort to clean up network code.

* pr/707:
  Renamed internal variables of NicProfile.java to adhere to the naming convention.
  Refactored Nic.java for readability.

Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2015-08-19 10:50:10 +05:30
Devdeep Singh
fedef2e6ca CLOUDSTACK-8687: Unit tests for validating the prepare template functionality.
These tests validate that the templates get scheduled for seeding. Additionally,
if a template is already seeded, we do not try and seed it again. Tests also
validate that templates are seeded to storage pools which are available.
2015-08-19 10:06:54 +05:30
Devdeep Singh
adf6b588dd CLOUDSTACK-8687: Update prepare template api to seed/prepare a template
only on a given primary storage. Currently, the prepare template api
will seed/prepare a given template on all the primary storage pools in
a zone. If however, a user wishes to prepare a template only a
particular storage pool, it isn't possible. Updated the api to take
storage pool id as an optional parameter. If the pool id is provided
then the template is prepared only on the given primary storage pool
2015-08-19 10:04:05 +05:30
Remi Bergsma
3006b1614d Merge pull request #704 from resmo/feature/CLOUDSTACK-8740
CLOUDSTACK-8740: add custom.css to make custom UI styles easier

* pr/704:
  CLOUDSTACK-8740: add custom.css to make custom UI styles easier

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-18 17:57:11 +02:00
Remi Bergsma
4325574270 Merge pull request #703 from ksowmya/disablestorage_pep8
Disablestorage pep8CLOUDSTACK-8738: Added Maintenance mode related fixes into base.py for test_disablestoragepool.
Also fixed pep8 issues in script, most of them for E501 (long lines) with max-line-length set to default

Test Result:
Test Steps: ... === TestName: test_01_disable_enable_pool_1_host | Status : SUCCESS ===
ok
Test Steps: ... === TestName: test_01_disable_enable_pool_2_CLUSTER | Status : SUCCESS ===
ok
Test Steps: ... SKIP: No ZONE  storage pools found
Test Steps: ... === TestName: test_02_vm_operations_on_disabled_pool_1_host | Status : SUCCESS ===
ok
Test Steps: ... === TestName: test_02_vm_operations_on_disabled_pool_2_CLUSTER | Status : SUCCESS ===
ok
Test Steps: ... SKIP: No ZONE wide storage pools found
Test Steps: ... === TestName: test_01_cross_cluster_attach_disk | Status : SUCCESS ===
ok

* pr/703:
  Fixed pep8 issues
  CLOUDSTACK-8738: Added the two methods for enable and cancel maintenance mode on StoragePool

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-18 16:37:02 +02:00
Remi Bergsma
29f9e1db49 Merge pull request #711 from radu-stefanache/radu-stefanache-patch-1
Typo correctionCannnot != Cannot

* pr/711:
  Typo correction

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-18 16:20:38 +02:00
Boris Schrijver
bb819ca222 Renamed internal variables of NicProfile.java to adhere to the naming convention.
See issue CLOUDSTACK-8736 for ongoing effort to clean up network code.
2015-08-18 14:05:00 +02:00
Boris Schrijver
c30ba1df0b Refactored Nic.java for readability.
Changed methodnames according to Nic.java refactor.

Fixed NicVO.java due to regression from Nic.java refactor.

Fixed VmWareGuru.java after Nic.java refactor.

See issue CLOUDSTACK-8736 for ongoing effort to clean up network code.
2015-08-18 14:04:48 +02:00
Milamber
267994fa0b CLOUDSTACK-8744 Add missing localization (l10n) for several parts in the UI
- l10n for the SSH Key Pairs behavior
- l10n for Autoscaling / LB sections
- l10n for Reset password
- l10n on some strings for the installation Wizard
- l10n on some strings in VPN/VPC section
- l10n on Service offerings sections
- improve some FR translations
2015-08-18 11:16:14 +01:00
Wido den Hollander
64a2cbdae6 Merge pull request #708 from radu-stefanache/master
Fixed typoSpotted this using Elasticsearch .

* pr/708:
  Typo correction

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2015-08-18 12:03:24 +02:00
Radu Stefanache
931e20c7f6 Typo correction
Cannnot != Cannot
2015-08-18 10:57:41 +01:00
Wido den Hollander
8a1d632273 Merge pull request #709 from borisroman/CLOUDSTACK-8742
Removed double encoding of Public Key from JS.See Cloudstack issue CLOUDSTACK-8742 & CLOUDSTACK-8649 for information.

* pr/709:
  Removed double encoding of Public Key from JS.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2015-08-18 11:43:36 +02:00
Boris Schrijver
f9e21da5dd Removed double encoding of Public Key from JS.
See Cloudstack issue CLOUDSTACK-8742 for information.
2015-08-17 22:56:17 +02:00
weingartner
ec8976f802 Removed duplicate code in CitrixResourceBase.getPatchFiles
@cristofolini comments:
Removed unnecessary duplicated code by having the body of the
getPatchFiles method only in the
CitrixResourceBase superclass. Given that all of its implementations
consisted of the same code
except for the path which contains the necessary file for that
implementation. An abstract method
getPatchFilePath was created in the CitrixResourceBase superclass so
that each implementation may
return the path containing the specific file needed by that
implementation.

Test cases were created for each implementation, simple as they may be.
One assert is made to verify
that the path returned by each implementation corresponds to the path
that was previously specified
on each getPatchFiles implementation.

removed trailing whitespace
2015-08-17 13:26:25 -03:00
Wido den Hollander
bc51a42fc2 Merge pull request #705 from borisroman/CLOUDSTACK-8736
Refactored NicProfile.java for readability.Only changed names and reorganized them! No functional implementation change.

See issue CLOUDSTACK-8736 for ongoing effort to clean up network code.

* pr/705:
  Refactored NicProfile.java for readability.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2015-08-17 15:24:06 +02:00
Boris Schrijver
5db3371840 Refactored NicProfile.java for readability.
See issue CLOUDSTACK-8736 for ongoing effort to clean up network code.
2015-08-17 14:12:10 +02:00
Rene Moser
b1978a1169 CLOUDSTACK-8740: add custom.css to make custom UI styles easier 2015-08-17 14:10:08 +02:00
Remi Bergsma
9c7e81e748 Merge pull request #695 from karuturi/CLOUDSTACK-8669
CLOUDSTACK-8669: create volume failed due to null charsetAdded a new private method getCharSetFromConnection() which checks if
the connection charset is null and if it is null, returns
StringUtils.getPreferredCharset

regression caused by commit f03411ca0436c8b52f5e60b0c8820fd1d1ba2ff6

* pr/695:
  CLOUDSTACK-8669: create volume failed due to null charset
  CLOUDSTACK-8669: making StringUtils.getDefaultCharset protected

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-17 13:54:54 +02:00
Sowmya Krishnan
8bd1ca14ce Fixed pep8 issues 2015-08-17 16:57:33 +05:30
Sowmya Krishnan
2a0eaaebd3 CLOUDSTACK-8738: Added the two methods for enable and cancel maintenance mode on StoragePool 2015-08-17 16:22:54 +05:30
Sowmya Krishnan
b407c526f7 Revert "CLOUDSTACK-8738 - Added two methods which were missed out earlier in base.py for Storage Pool maintenance"
This reverts commit 4223c519dd8c8a09eb577171a2e9075b01e6ede4.
2015-08-17 15:59:05 +05:30
Remi Bergsma
479733f9fe Merge pull request #701 from koushik-das/CLOUDSTACK-8737
CLOUDSTACK-8737: Remove out-of-band VR reboot code based on persistent VR configuration changes

Removed out-of-band VR reboot code

Refer to the discussion on dev list (http://mail-archives.apache.org/mod_mbox/cloudstack-dev/201506.mbox/%3cAC13E3C1-3719-4B48-A35D-DBC4BA7041D0@schubergphilis.com%3e)

* pr/701:
  CLOUDSTACK-8737: Remove out-of-band VR reboot code based on persistent VR configuration changes Removed out-of-band VR reboot code

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-17 12:02:50 +02:00
Sowmya Krishnan
4223c519dd CLOUDSTACK-8738 - Added two methods which were missed out earlier in base.py for Storage Pool maintenance 2015-08-17 15:51:48 +05:30
Koushik Das
f2f29525ae CLOUDSTACK-8737: Remove out-of-band VR reboot code based on persistent VR configuration changes
Removed out-of-band VR reboot code
2015-08-17 14:49:32 +05:30
Remi Bergsma
caa524b01b Merge pull request #630 from manuiiit/pull-2
Fixed Coverity issue "Dereference null return value"Fixed Coverity issue "Dereference null return value"

* pr/630:
  Fixed Coverity issue "Dereference null return value"

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-17 08:38:38 +02:00
Rajani Karuturi
c180a6db03 CLOUDSTACK-8669: create volume failed due to null charset
Added a new private method getCharSetFromConnection() which checks if
the connection charset is null and if it is null, returns
StringUtils.getPreferredCharset

regression caused by commit f03411ca0436c8b52f5e60b0c8820fd1d1ba2ff6
2015-08-17 10:20:28 +05:30
Milamber
05ef17adc1 Update L10N resource files on master branch with 4.6 translation strings from Transifex (20150814) 2015-08-14 22:00:30 +01:00
Remi Bergsma
ca9d246876 Merge pull request #686 from milamberspace/MissingSomesL10N
[CLOUDSTACK-8427] 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 ("Tlverser" for "Upload")

* pr/686:
  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")

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-14 22:11:28 +02:00
manuiiit
3cc0fecccc Fixed Coverity issue "Dereference null return value" 2015-08-15 01:34:24 +05:30
Remi Bergsma
64ff67da55 Merge pull request #654 from DaanHoogland/CLOUDSTACK-8656
Cloudstack 8656: do away with more silently ignoring exceptions.a lot of messages added.
some restructuring for test exception assertions and try-with-resource blocks

* pr/654: (29 commits)
  CLOUDSTACK-8656: more logging instead of sysout
  CLOUDSTACK-8656: use catch block for validation
  CLOUDSTACK-8656: class in json specified not found
  CLOUDSTACK-8656: removed unused classes
  CLOUDSTACK-8656: restructure of tests
  CLOUDSTACK-8656: reorganise sychronized block
  CLOUDSTACK-8656: restructure tests to ensure exception throwing
  CLOUDSTACK-8656: validate the throwing of ServerApiException
  CLOUDSTACK-8656: logging ignored exceptions
  CLOUDSTACK-8656: try-w-r removes need for empty catch block
  CLOUDSTACK-8656: try-w-r instead of clunckey close-except
  CLOUDSTACK-8656: deal with empty SQLException catch block by try-w-r
  CLOUDSTACK-8656: unnecessary close construct removed
  CLOUDSTACK-8656: message about timed buffer logging
  CLOUDSTACK-8656: message about invalid number from store
  CLOUDSTACK-8656: move cli test tool to separate file
  CLOUDSTACK-8656: exception is the rule for some tests
  CLOUDSTACK-8656: network related exception logging
  CLOUDSTACK-8656: reporting ignored exceptions in server
  CLOUDSTACK-8656: log in case we are on a platform not supporting UTF8
  ...

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-14 21:38:49 +02:00
Daan Hoogland
b6f1d29e64 CLOUDSTACK-8656: more logging instead of sysout 2015-08-14 17:28:29 +02:00
Daan Hoogland
adcd0c0c0d CLOUDSTACK-8656: use catch block for validation 2015-08-14 17:25:04 +02:00
Daan Hoogland
384a2e9cee CLOUDSTACK-8656: class in json specified not found 2015-08-14 16:29:21 +02:00
Daan Hoogland
237f922ff7 CLOUDSTACK-8656: removed unused classes 2015-08-14 16:14:17 +02:00
Daan Hoogland
bb8facc37c CLOUDSTACK-8656: restructure of tests 2015-08-14 16:07:12 +02:00
Daan Hoogland
882de20e1c CLOUDSTACK-8656: reorganise sychronized block 2015-08-14 16:03:17 +02:00
Daan Hoogland
07bee3149c CLOUDSTACK-8656: restructure tests to ensure exception throwing 2015-08-14 15:43:54 +02:00