1661 Commits

Author SHA1 Message Date
Rohit Yadav
afcbd270b2 CLOUDSTACK-8562: Deprecate commands.properties
- Removes commands.properties file
- Fixes apidocs and marvin to be independent of commands.properties usage
- Removes bundling of commands.properties in deb/rpm packaging
- Removes file references across codebase

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-11 09:45:19 +05:30
Rohit Yadav
4347776ac6 CLOUDSTACK-8562: DB-Backed Dynamic Role Based API Access Checker
This feature allows root administrators to define new roles and associate API
permissions to them.

A limited form of role-based access control for the CloudStack management server
API is provided through a properties file, commands.properties, embedded in the
WAR distribution. Therefore, customizing API permissions requires unpacking the
distribution and modifying this file consistently on all servers. The old system
also does not permit the specification of additional roles.

FS:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Dynamic+Role+Based+API+Access+Checker+for+CloudStack

DB-Backed Dynamic Role Based API Access Checker for CloudStack brings following
changes, features and use-cases:
- Moves the API access definitions from commands.properties to the mgmt server DB
- Allows defining custom roles (such as a read-only ROOT admin) beyond the
  current set of four (4) roles
- All roles will resolve to one of the four known roles types (Admin, Resource
  Admin, Domain Admin and User) which maintains this association by requiring
  all new defined roles to specify a role type.
- Allows changes to roles and API permissions per role at runtime including additions or
  removal of roles and/or modifications of permissions, without the need
  of restarting management server(s)

Upgrade/installation notes:
- The feature will be enabled by default for new installations, existing
  deployments will continue to use the older static role based api access checker
  with an option to enable this feature
- During fresh installation or upgrade, the upgrade paths will add four default
  roles based on the four default role types
- For ease of migration, at the time of upgrade commands.properties will be used
  to add existing set of permissions to the default roles. cloud.account
  will have a new role_id column which will be populated based on default roles
  as well

Dynamic-roles migration tool: scripts/util/migrate-dynamicroles.py
- Allows admins to migrate to the dynamic role based checker at a future date
- Performs a harder one-way migrate and update
- Migrates rules from existing commands.properties file into db and deprecates it
- Enables an internal hidden switch to enable dynamic role based checker feature

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-11 09:45:19 +05:30
Will Stevens
d2a95b4c69 Merge pull request #1054 from wido/CLOUDSTACK-8818
CLOUDSTACK-8818: Use MySQL native connector with PythonMySQLdb has been deprecated and is also not supported in Python 3.

mysql.connector is a connector written in Python which talks the
native MySQL protocol without any external code.

https://dev.mysql.com/doc/connector-python/en/

* pr/1054:
  CLOUDSTACK-8818: Use MySQL native connector with Python

Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-05-10 23:54:23 -04:00
Will Stevens
bbfd69fbca Merge pull request #1428 from myENA/mysqlhapatch
Addresses CLOUDSTACK-9300 where the MySQL HA StaticStrategy class fai

* pr/1428:
  Addresses CLOUDSTACK-9300 where the MySQL HA StaticStrategy class fails to load successfully

Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-05-10 23:51:59 -04:00
Will Stevens
a368cb703f Merge release branch 4.8 to master
* 4.8:
  Update L10N resource files with 4.8 strings from Transifex (20160504) Force "translator" mode with the transifex client. Update Transifex client config file for 4.8 resources/L10N ref. (generated by Tx client)
2016-05-10 23:45:43 -04:00
Wido den Hollander
92e3ba2053 CLOUDSTACK-8818: Use MySQL native connector with Python
MySQLdb has been deprecated and is also not supported in Python 3.

mysql.connector is a connector written in Python which talks the
native MySQL protocol without any external code.

https://dev.mysql.com/doc/connector-python/en/
2016-05-04 23:28:52 +02:00
Milamber
e81a6b270e Update L10N resource files with 4.8 strings from Transifex (20160504)
Force "translator" mode with the transifex client.
Update Transifex client config file for 4.8 resources/L10N ref. (generated by Tx client)
2016-05-04 21:47:37 +01:00
Will Stevens
6d0c92be72 Merge release branch 4.8 to master
* 4.8:
  Update L10N resource files with 4.7 strings from Transifex (20160502) Force "translator" mode with the transifex client.
2016-05-04 10:48:18 -04:00
Will Stevens
38c9e9f336 Merge release branch 4.7 to 4.8
* 4.7:
  Update L10N resource files with 4.7 strings from Transifex (20160502) Force "translator" mode with the transifex client.
2016-05-04 10:47:33 -04:00
Milamber
6460cde8b5 Update L10N resource files with 4.7 strings from Transifex (20160502)
Force "translator" mode with the transifex client.
2016-05-02 22:32:14 +01:00
Rohit Yadav
8af677a0f0 maven: fix dependency version support by JDK7
- Fix jetty dependency that is compatible with Java7
- Upgrade minor revisions of dependencies
- Upgrade vmware mvn sdk dependency to 6.0
- Downgrade bounty castle version to 1.46 (same as before)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-04-22 17:29:59 +05:30
Daan Hoogland
101668994d further maven dependency updates from Daan
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-04-22 16:36:37 +05:30
Simon Weller
c22659d76d Addresses CLOUDSTACK-9300 where the MySQL HA StaticStrategy class fails to load successfully 2016-03-04 06:53:44 -06:00
Remi Bergsma
e5f0788ed1 Merge release branch 4.8 to master
* 4.8:
  CLOUDSTACK-6181: Add 'root disk size' field in instance wizard for KVM templates
2016-01-28 13:34:02 +01:00
Remi Bergsma
69d1a5e9bc Merge release branch 4.7 to 4.8
* 4.7:
  CLOUDSTACK-6181: Add 'root disk size' field in instance wizard for KVM templates
2016-01-28 13:32:08 +01:00
Remi Bergsma
333957f00f Merge release branch 4.6 to 4.7
* 4.6:
  CLOUDSTACK-6181: Add 'root disk size' field in instance wizard for KVM templates
2016-01-28 13:31:26 +01:00
Wei Zhou
3822be5a5c CLOUDSTACK-6181: Add 'root disk size' field in instance wizard for KVM templates
This commit includes three changes:
(1) Revert commit 13bf1ec5da9891eca98ef5dab61bf74b6db9530b to show the 'root disk size' field
(2) Set the default value from '1' to empty. This also changes the default value of customized service offerings from '1' to empty.
(3) show 'root disk size' field only when users choose a KVM template, as cloudstack supports deployvm with rootdisksize on KVM only.
2016-01-27 23:30:22 +01:00
Remi Bergsma
43ab98d823 Updating pom.xml version numbers for release 4.9.0-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 15:12:20 +01:00
Remi Bergsma
32fcc47117 Updating pom.xml version numbers for release 4.8.1-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 09:39:00 +01:00
Remi Bergsma
a4ac9d3fff Updating pom.xml version numbers for release 4.7.2-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 09:33:56 +01:00
Remi Bergsma
62f218b7bd Updating pom.xml version numbers for release 4.8.0
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-20 23:43:35 +01:00
Remi Bergsma
75b68c6829 Merge release branch 4.7 to master
* 4.7:
  Fix unable to setup more than one Site2Site VPN Connection
  FIX S2S VPN rVPC: Check only redundant routers in state MASTER
  PEP8 of integration/smoke/test_vpc_vpn
  Add S2S VPN test for Redundant VPC
  Make integration/smoke/test_vpc_vpn Hypervisor independant
  FIX VPN: non-working ipsec commands
  [UI] MADNESS
  [DB] Add force_encap field to s2s_customer_gateway table
  [ROUTER] Add forceencaps field to python router ipsec config method
  [TEST] unittest needs rework
  [MARVIN] Add forceencap field to VpnCustomerGateway class in marvin base
  [CORE] Add Force UDP Encapsulation option to Site2Site VPN
  CLOUDSTACK-9186: Root admin cannot see VPC created by Domain admin user
  CLOUDSTACK-9192: UpdateVpnCustomerGateway is failing
  CLOUDSTACK-6485 prevent ip asignment of private gw iface
  CLOUDSTACK-9204 Do not error when staticroute is already gone
  make both check lines consistent
  CLOUDSTACK-9181 Prevent syntax error in checkrouter.sh
  CLOUDSTACK-9202 Bump ssh timeout
2016-01-16 19:54:41 +01:00
Michael Andersen
9b9272c019 [UI] MADNESS 2016-01-07 19:27:51 +01:00
nvazquez
46f9fbabdf CLOUDSTACK-9074: API Changes: Add l2gatewayserviceuuid to NVP devices 2015-12-24 16:07:06 -03:00
Remi Bergsma
8f5a2920e8 Updating pom.xml version numbers for release 4.8.0-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-21 22:09:31 +01:00
Remi Bergsma
5b112408c7 Updating pom.xml version numbers for release 4.7.1-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-21 19:55:04 +01:00
Remi Bergsma
2b76f394c0 Updating pom.xml version numbers for release 4.6.3-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-21 13:53:54 +01:00
Remi Bergsma
2f26a859a9 Updating pom.xml version numbers for release 4.7.0
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-13 21:09:53 +01:00
Remi Bergsma
5147dec4ff Updating pom.xml version numbers for release 4.6.2-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-12 21:49:37 +01:00
Milamber
6947afee3a Update L10N resource files with 4.7 strings from Transifex (20151211) 2015-12-12 18:57:10 +00:00
Abhinandan Prateek
3e22fbe457 CLOUDSTACK-9131: Create a new API to check if the plugin is enabled.
fixing type
2015-12-10 09:37:54 +05:30
Remi Bergsma
e08294a95f Merge release branch 4.6 to master
* 4.6:
  CLOUDSTACK-9106 - Makes Enum name compliant with Java code conventions.
  CLOUDSTACK-9106 - Adds a test to cover the changes in the applyVpnUsers() method
  CLOUDSTACK-9106 - Makes the router commands call more consistent.
  CLOUDSTACK-9106 - Enables private gateway tests on Redundant VPCs
  CLOUDSTACK-9106 - Refactor the createPrivateNicProfileForGateway() method
  CLOUDSTACK-9106 - Reduces the amount of iterations through the routers of a VPC
  Add support for not (re)starting server after cloud-setup-management.

Closed PRs that will not be considered for merge:
This closes #1158
This closes #1097
2015-12-07 21:36:36 +01:00
Remi Bergsma
e9de865989 Merge pull request #1162 from greenqloud/pr-no-start
Add support for not (re)starting server after cloud-setup-management.This adds an option to the cloud-setup-management script to not start the management server after a successful configuration of it.

The primary motivation for this is to avoid circular dependency issues on systems that use systemd. When calling cloud-setup-management from a unit with a Before= directive on a service depending on
cloudstack-management, the process will deadlock because /usr/bin/service will delegate to systemd, which is waiting for the Before service to start.

Executing the cloud-setup-management script with this new `--no-start` option will simply leave the management server stopped after a successful configuration. systemd can then be bypassed with `export _SYSTEMCTL_SKIP_REDIRECT=1` and using the init.d script.

* pr/1162:
  Add support for not (re)starting server after cloud-setup-management.

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-07 21:06:19 +01:00
Abhinandan Prateek
987fcbd441 CLOUDSTACK-8592: Implement Quota service
Quota service while allowing for scalability will make sure that the cloud is
not exploited by attacks, careless use and program errors. To address this
problem, we propose to employ a quota-enforcement service that allows resource
usage within certain bounds as defined by policies and available quotas for
various entities.  Quota service extends the functionality of usage server to
provide a measurement for the resources used by the accounts and domains using a
common unit referred to as cloud currency in this document. It can be configured
to ensure that your usage won’t exceed the budget allocated to accounts/domain
in cloud currency.  It will let user know how much of the cloud resources he is
using. It will help the cloud admins, if they want, to ensure that a user does
not go beyond his allocated quota. Per usage cycle if a account is found to be
exceeding its quota then it is locked. Locking an account means that it will not
be able to initiat e a new resource allocation request, whether it is more
storage or an additional ip. Needless to say quota service as well as any action
on the account is configurable.

Changes from Github code review:

- Added marvin test for quota plugin API
- removed unused commented code
- debug messages in debug enabled check
- checks for nulls, fixed access to member variables and feature
- changes based on PR comments
- unit tests for UsageTypes
- unit tests for all Cmd classes
- unit tests for all service and manager impls
- try-catch-finally or try-with-resource in dao impls for failsafe db switching
- remove dead code
- add missing quota calculation case (regression fixed)
- replace tabs with spaces in pom.xmls
- quota: though default value for quota_calculated is 0, the usage server
  makes it null while entering usage entries. Flipping the condition so
  as to acocunt for that.
- quotatypes: fix NPE in quota type
- quota framework test fixes
- made statement period configurable
- changed default email templates to reflect the fact that exhausted quota may not result in a locked account
- added quotaUpdateCmd that refreshes quota balances and sends alerts and statements
- report quotaSummary command returns quota balance, quota usage and state for all account
- made UI framework changes to allow for text area input in edit views
- process usage entries that have greater than 0 usage
- orocess quota entries only if tariff is non zero
- if there are credit entries but no balance entry create a dummy balance entry
- remove any credit entries that are before the last balance entry
  when displaying balance statement
- on a rerun the last balance is now getting added

FS: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Quota+Service+-+FS
PR: https://github.com/apache/cloudstack/pull/768

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-12-07 23:02:48 +05:30
Daan Hoogland
c67d1da5dd Merge pull request #1167 from koushik-das/CLOUDSTACK-9105
CLOUDSTACK-9105: Logging enhancement: Handle/reference to track API calls end to end in the MS logs

Added logid to logging framework, now all API call logs can be tracked with this id end to end

* pr/1167:
  CLOUDSTACK-9105: Logging enhancement: Handle/reference to track API calls end to end in the MS logs Added logid to logging framework, now all API call logs can be tracked with this id end to end

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-12-06 20:41:28 +01:00
Daan Hoogland
bbe891bfc3 Merge pull request #1086 from ustcweizhou/update-nic-ipaddr
CLOUDSTACK-9051: update nic IP address of stopped vmThis provides the feature to change ip address of NIC on a stopped vm by API and UI.

* pr/1086:
  CLOUDSTACK-9051: reprogram network as a part of vm nic ip update
  CLOUDSTACK-9051: add unit tests for UpdateVmNicIp
  CLOUDSTACK-9051: update nic IP address of stopped vm

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-12-06 19:37:04 +01:00
Remi Bergsma
74e33dc5ae Merge pull request #840 from bvbharatk/CLOUDSTACK-8852
CLOUDSTACK-8852 Database shows that management server is UP when it iDatabase shows that management server is UP when it is actually stopped.

 This was happening as the stop method in clusterMnanagerImpl was not getting callled. Added shutdown hooks to all spring sub contexts, this enables spring to call the stop mehtods of the beans when management server is shutting down.

Conflicts:
	framework/spring/module/src/main/java/org/apache/cloudstack/spring/module/web/CloudStackContextLoaderListener.java

* pr/840:
  CLOUDSTACK-8852 Database shows that management server is UP when it is actually stopped from the CCP GUI

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-05 18:47:53 +01:00
jeff
e0e65f5cd6 Add support for not (re)starting server after cloud-setup-management.
This adds an option to the cloud-setup-management script to not start
the management server after a successful configuration of it. The
primary motivation for this is to avoid circular dependency issues on
systems that use systemd. When calling cloud-setup-management from a
unit with a Before= directive on a service depending on
cloudstack-management, the process will deadlock because
/usr/bin/service will delegate to systemd, which is waiting for the
Before service to start.
2015-12-04 09:58:39 +00:00
Koushik Das
a4dc271253 CLOUDSTACK-9105: Logging enhancement: Handle/reference to track API calls end to end in the MS logs
Added logid to logging framework, now all API call logs can be tracked with this id end to end
2015-12-04 12:45:57 +05:30
Rohit Yadav
41b0139e7a Merge pull request #1139 from karuturi/CLOUDSTACK-9092
CLOUDSTACK-9092: L10n fix in "Add LDAP Account page"fixed two strings on the "Add LDAP Account page"

After the change: (with a test string in messages_ja_JP.properties file)
![screen shot 2015-11-30 at 11 07 42 am](https://cloud.githubusercontent.com/assets/186833/11464468/213f0f4e-9755-11e5-85b3-1cc6a89895c1.png)

* pr/1139:
  CLOUDSTACK-9092: L10n fix in "Add LDAP Account page"

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-12-01 15:03:18 +05:30
Remi Bergsma
4ecfc29267 Merge release branch 4.6 to master
* 4.6:
  Use version for RC branch name instead of branch
  make sure all files are updates with new version
  Update L10N resource files with 4.6 strings from Transifex (20151129)
  Fix secondary storage not working with swift
  CLOUDSTACK-9083: Add disk serial to kvm virt xml
2015-11-30 22:30:52 +01:00
Wei Zhou
b79d338f29 CLOUDSTACK-9051: update nic IP address of stopped vm 2015-11-30 09:20:25 +01:00
Rajani Karuturi
d6af6adbad CLOUDSTACK-9092: L10n fix in "Add LDAP Account page"
fixed two strings on the "Add LDAP Account page"
2015-11-30 11:21:17 +05:30
Milamber
6d4722953f Update L10N resource files with 4.6 strings from Transifex (20151129) 2015-11-29 19:01:56 +00:00
Boris Schrijver
5c0366c99e CLOUDSTACK-9062: Improve S3 implementation.
The S3 implementation is far from finished, this commit focusses on the bases.

 - Upgrade AWS SDK to latest version.
 - Rewrite S3 Template downloader.
 - Rewrite S3Utils utility class.
 - Improve addImageStoreS3 API command.
 - Split various classes for convenience.
 - Various minor improvements and code optimalisations.

A side effect of the new AWS SDK is that it, by default, uses the V4 signature. Therefore I added an option to specify the Signer, so it stays compatible with previous versions.
2015-11-19 15:29:10 +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
Remi Bergsma
95ae7963d5 Merge pull request #801 from nlivens/updated-nuage-vsp-plugin
CLOUDSTACK-8832 : Update Nuage VSP plugin to work with Nuage VSP release 3.2

* pr/801:
  CLOUDSTACK-8832 : Update Nuage VSP plugin to work with Nuage VSP release 3.2

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-18 12:09:09 +01:00
Remi Bergsma
1f53f2a93e Updating pom.xml version numbers for release 4.7.0-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-15 18:54:13 +01:00
Remi Bergsma
b38c3bed0c Updating pom.xml version numbers for release 4.6.1-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-13 21:27:57 +01:00
Remi Bergsma
e31ade03c6 Updating pom.xml version numbers for release 4.6.0
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-10 15:45:34 +01:00