cyclades: remove all csrf_exempt usage.
The csrf middleware is not to be installed with cyclades,therefore there is no need to use csrf_exempt.
cyclades: Add 'drained' flag to Network
Extend Network model with the 'drained' attribute, to indicate whether anetwork should be used in public IP allocation when creating servers.This option is only useful for public networks.
cyclades ui: Show password view minor improvement
avoid redirecting user to the single view of the build vm
cyclades: Raise 500 for commission errors
Wrap all calls to astakosclient for commissions to raise 500, if anyerror other than QuotaLimit(413) occurs.
Merge branch 'develop' of https://code.grnet.gr/git/synnefo into develop
branding: Improve footer appearance
Capitilize 'synnefo' in footer and remove space between v and versionnumber in footer
cyclades: Rename meta to metadata at Cyclades URLs
For compatibility with OpenStack Compute API v2, rename 'meta' to'metadata' to Cyclades API URLs. Specifically, to the following ones:
cyclades: Remove "values" term from API
For compatibility with OpenStack Compute API v2, we remove theterm 'values' from all JSON requests and responses.
Refs #3768
cyclades: Remove 'Ref' suffix from servers API
Rename 'flavorRef' to 'flavor' and 'imageRef' to 'image', to responses of/servers API. 'flavorRef' and 'imageRef' are still preserved to to requestparameters of POST /servers.
cyclades: Update tests
Update tests to use OpenStack Compute API v2.
cyclades: Rename 'cpu' to 'vcpus' to flavor API
Rename attribute of GET /flavors response, from 'cpu' to 'vcpus'.
cyclades ui: In sync with the updated compute api
Update javascript libraries to keep up with the latest changes in compute api.
ui: Rename flavor 'cpu' to 'vcpus'
cyclades ui: Revert glance response parsing
Refs: #3768
cyclades ui: Update metadata post/delete url
the updated api uses /metadata/ instead of /meta/
cyclades ui: Revert server create params names
the new api changed image/flavor keys only in servers response.imageRef and flavorRef are still required in server create requests(makes sense)
cyclades ui: Always send network type in create request
type parameter is mandatory in private network creation requests.
helpdesk: Configurable media url
cyclades: Always add attachments to server info
Update /servers API, to include attachments to /servers responses,even if the server has no NICs.
cyclades: Export hypervisor to backend-list cmd
cyclades: Fix bug in network test
astakos: move get_services back to astakos im services
cyclades: Fix bug in network-modify management cmd
Use 'parse_bool' function to parse '--dhcp' option. Also, include'dhcp' to default columnds of 'network-list' command.
branding: Renaming SYNNEFO_JS_LIB_VERSION to SYNNEFO_VERSION
astakos: move get_menu service under astakos im services
get_menu is used only by astakos cloudbar:it should not be under astakos api services
cyclades: Add --hypervisor option to backend cmds
Add '--hypervisor' option to 'backend-add' and 'backend-modify'management commands.
Refs #3772
cyclades: Sypport backends with Xen hypervisor
helpdesk: Update tests
use existing cyclades db factories instead of json fixtures which are painfulto maintain
cyclades ui: Handle no missing image ids case
cyclades ui: Fix resolving of missing image ids
- Start resloving once the images have been loaded.- Continue loading view progress only once all missing ids have been resolved.
branding: Use branding util to render email templates
Use synnefo_branding.util.render_to_string accross synnefo apps to be able touse branding variables within the templates.
cyclades ui: Configurable userdata api url
PublicKey collections used hardcoded urls to access the ssh public keysapi. A new dummy view added (to serve '/ui/userdata/') to be able to usedjango reverse mechanism for the base url of userdata api.
cyclades ui: Avoid setting group in personality metadata
cyclades ui: Include missing index view setting
UNKNOWN_OS setting was missing from the index view context, causing javascripterrors.
cyclades: fix name errors in app_settings
Merge branch 'feature-branding' into develop
Conflicts: snf-astakos-app/astakos/im/templates/im/account_pending_moderation_notification.txt snf-astakos-app/astakos/im/templates/im/group_creation_notification.txt snf-astakos-app/astakos/im/views.py
cyclades: Update proxy user services
use the common api.proxy method from snf-django-lib
Catch QuotaLimit exception when reconciling resources
This can happen, if the actual usage registered by a service exceedsthe quota limit.Advise the user to try the --force option.
cyclades: Move common code to seperate function
Move common between API method and management command for creating aserver to a separate function.
cyclades: Fix bug in flavor-modify command
Fix bug in flavor-modify command, which resulted in flavors being alwaysdeleted. Deleted option must be parsed to bool, otherwise is alwaysTrue.
helpdesk: Use 'mock' library to bypass auth
Use mock to library to bypass astakos authentication in helpdesk views.
Synnefo branding: Documentation correction & minor fixes
Use custom method for joining urls
Implement 'join_urls' method for joining a base URL with a path,without worrying about redundant or missing "/". Do not use'urlparse.urljoin', since it has different semantics.
cyclades: fix db migration
Migration 0066 should not run on a fresh installation.
cyclades: Make cyclades work with pycrypto==2.6
In PyCrypto 2.6, it is mandatory to use an IV of 16 bytes when using AESencryption. This commit updates 'aes_encrypt' module to use a random IV.Also, a data migration is required to re-encrypt the old passwords, as...
Correct merging error
Merge branch 'develop' into feature-branding
Conflicts: snf-astakos-app/astakos/im/static/im/cloudbar/cloudbar.js snf-astakos-app/astakos/im/templates/im/base.html snf-astakos-app/astakos/im/templates/im/landing.html snf-astakos-app/astakos/im/views.py...
cyclades: Various fixes to tests
dispatcher: Handle NICs in callbacks.
Update 'update_db' callback to handle instance NICs together withinstance status.
Also update the relevant tests.
cyclades: simplify comparison of NICs
Remove 'snf-events-net' queue and binding
Remove 'snf-events-net' queue (together with the corresponding routingkey and binding) from the queues that snf-dispatcher is consumingmessages. This queue is no longer needed, because messages for instanceNICs will be sended by snf-ganeti-eventd to 'snf-events-op' queue....
cyclades: Fix deadlock when connecting vms
Fix deadlock caused by 'get_or_create' method, since it acquires animplicit shared lock. Take an exclusive lock on network to fix thisdeadlock.
cyclades: Fix stale 'DeletedError' exception
cyclades: Fix typo in comment
cyclades: Fixes relevant to lazy networks
cyclades: Simplify reconcile-networks checks
Refactor and simplify checks of reconcile-networks to take advantageof lazy networks.
cyclades: Fix bug in management command
Do not try to issue commission for networks without user (e.g. publicnetworks), when deleting them.
Synnefo branding: Remove greek text & verbal fixes
Emails sent to Astakos Users do not contain greek translations any more.Minor verbal corrections are made and title attribute are added to logoslinks.
cyclades: update tests for lazy networks
cyclades: Update 'backend-add' for lazy networks
Do not create private networks when adding a new backend. Since,"lazy networks" this is no longer needed.
cyclades: Implement lazy networks
Implement "lazy networks", which are not created to all Ganeti backendsupon creation, but only when an instance that resides in a Ganeti isconnected to that network.
Update 'create_network' to create the Network object in DB without...
Merge branch 'feature-quotas' into develop
Conflicts: docs/dev-guide.rst
cyclades: add commissioning to create/remove cmds
Update create/remove management commands to issue commission whenneeded.
astakos: WIP move all api calls under ``/astakos/api``
Refs: #3340
Add 'ASTAKOS_POOLSIZE' setting.
helpdesk: Fix helpdesk tests
Further improvents to branding settings
cyclades: Fix vmapi test
Use 'urljoin' to compute the 'config_url' parameter.
Merge branch 'feature-api-docs' into develop
Minor Conflict: docs/cyclades-api-guide.rst
Synnefo branding: settings improvements
cyclades ui: Remove deprecated setting
cyclades ui: Expose and use the new astakos quota api
- Removed /userdata/quota view in respect of astakos quotas api delegate views served in the same urls used by astakos api (/astakos/api/quotas, /astakos/api/resources). Base url is configurable using the...
pithos, cyclades: Name reconciling commissions
Use commission name "RECONCILE" to distinguish such operationsin the quotaholder provision log.
cyclades: Fix import of urlparse
Merge branch 'feature-quotas-pithos' into feature-quotas
Conflicts: snf-cyclades-app/synnefo/plankton/backend.py snf-pithos-app/README snf-pithos-app/pithos/api/util.py
pithos: Rename backend quotaholder properties
Refer to astakosclient instead of quotaholder
WIP astakosclient for quotas in pithos
Fix typo in network-list command
cyclades: Rename 'qh_resolve_commissions' function
Rename 'qh_resolve_commissions' function to 'resolve_commissions'.
cyclades: Remove obsolete code for static quotas
Remove the following obsolete settings, since their usage is coveredby Quotaholder:- MAX_VMS_PER_USER- MAX_NETWORKS_PER_USER- VMS_USER_QUOTA- NETWORKS_USER_QUOTA
Also remove 'cyclades-export-quota' management command.
Implement resource-export-cyclades command
Implement managemtn command to export cyclades resources in JSON format,in order to be imported to Astakos.
Cyclades: remove all quotaholder settings
Remove from cyclades all settings that were relative with Quotaholder.Remove CYCLADES_USE_QUOTAHOLDER settings, since Cyclades can not workany more without quotas.Remove CYCLADES_QUOTAHOLDER_URL and CYCLADES_QUOTAHOLDER_TOKEN since...
Varous fixes to cyclades-usage-verify command
Extend 'cyclades-usage-verify' management command to cover the usage of'cyclades-reset-usage' and remove the second one. The new commandreconciles resources(usage) by detecting inconsistencies between theusage of resources in Astakos and Cyclades DB and fixing them by issuing...
cyclades: Rename quotas management commands
Rename 'cyclades-reconcile-commissions' to 'reconcile-commissions-cyclades.'Rename 'cyclades-usage-verify' to 'reconcile-resources-cyclades.'
reconcile-resources: check that user exists in QH
Do not consider 0 usage for users and resources that are not included inQuotaholder resources list, since Quotaholder returns zero usage for allusers and all resources. If a user/resource does not belong to QH...
Refactor QuotaHolder serial model
Fix info message of reconcile-resources-cyclades
cyclades: refactor code relative to commission
Refactor Cyclades code that handles commissioning with Quotaholder. Thiscommit removes the 'uses_commission' decorator. Instead it introducesthe 'issue_and_accept_commission' function that is responsible for...
cyclades: resolve previous commissions
Extend 'issue_and_accept_commission' function to resolve previousunresolved commission, if exists. In order to resolve it, thecommission must not be pending, because if it is there is notenough information to resolve it.
Mock quotaholder for Cyclades tests
Create 'mocked_quotaholder' context manager to bypass commission and useit in Cyclades tests. Also this commit does some various fixes to othertests.
cyclades: Check qh resolve commission response
Check Quotaholder response to see if the commissions were accepted orrejected as requested, or failed for some reason.
Accepting or rejecting a commission will fail if the commission wasalready resolved. Since this is sometimes accepted, like when...
Restore quotas if enqueuing job to Ganeti fails
When creating a server, we commit the VM model in DB and reserve thecorresponding quotas in Quotaholder before enqueuing theOP_INSTANCE_CREATE job (because messages from dispatcher may arrivebefore committing). In case enqueuing job to Ganeti fails we must...
cyclades: Use astakosclient for quotas and commissions
Remove unused 'models' file
Various fixes to quotas
snf-cyclades-app: Use astakosclient
cyclades: remove redundant settings
Remove 'CYCLADES_USER_CATALOG_URL' and 'CYCLADES_USER_FEEDBACK_URL'settings, since both of them can be derived from 'ASTAKOS_URL' setting.
plankton: Remove 'TRANSLATE_UUIDS' setting
Remove 'TRANSLATE_UUIDS' from plankton setting.
PEP8 style fixes
cyclades: fix bug in server-create command
Make --flavor-id mandatory in 'snf-manage server-create' managementcommand.