cyclades: Add name to Ganeti NICs
Add 'name' attribute to newly created NICs. Currently, the name of theNICs will not be used to refer to NICs, as it will be in Synnefo 0.15.Names are added only to ease the migration to version 0.15. Also, thiscommit updates snf-dispatcher to preserve the name of the NIC, if any,...
cyclades: Catch exception in verify_personality
The verify_personality function assumes that the contents of apersonality is encoded in base64 and tries to decode them. But if theclient didn't encode them a TypeError `Incorrect padding' will beraised. Catch this exception and raise a BadRequest.
cyclades: Check for all finalized states
cyclades: Retrieve image names only if needed
Retrieve images from plankton only if the user asked for the image name.Otherwise just display the image ID. This will significantly speed upthe execution time of 'server-list' management command.
cyclades: Workaround for race condition in Ganeti
Workaround for race where OP_INSTANCE_REMOVE starts executing on Ganetibefore OP_INSTANCE_CREATE. If this is the case, OP_INSTANCE_REMOVE willnot wait for locks, instead it will fail because the instance has not...
Resolve some undefined names
Add missing imports; remove call to sqlite3_changes; set key and valin render_meta.
cyclades: Fix broken test
Mock getting image from plankton.
cyclades: Fix broken tests from commit #8936368
Commit #8936368 used the "size" attribute of images. This commitfixes mocked images of tests to contain this attribute.
Pass hashmap instead of location to snf-image
Update Cyclades, to pass as 'img_id' the hashmap('checksum') of theimage, instead of the location URL. In that way, snf-image does not anyaccess to the Pithos database.
cyclades: Remove commit_manually decorator
Replace commit_manually decorator with commit_on_success. Since networkis no longer created in DB in the API request, the manually decorator isno longer needed.
wheezy: urls module doesn't export defaults
Fix missing import and broken test
cyclades: Mock vm removal if creation fails
In case creating a VM fails before the OP_INSTANCE_CREATE job isenqueued in Ganeti, the VM and its NICs must be deleted, and theresources must be released from Quotaholder, which is exactly what isdone when a VM is deleted from Ganeti. Instead of duplicating the code,...
cyclades: Fix bug during server creation
Commit #32a0b85, modified server creation, by refetching the object fromDB after issuing commission to quotaholder. However, the new object isnot having the 'config_url' attributed, which is added to the vm object...
cyclades: Fix unbound reference
Set backend to None if not specified.
cyclades: Do not release resources if already deleted
Ensure that a commission to release vm resources is issued only once.If a vm is marked `deleted', then resources must have already beenreleased.
cyclades: Do not save stale objects after a commit
Call to issue_and_accept_commission saves the resource object (eg a vm)and commits the transaction. This has the side-effect that the resourceobject becomes stale: its lock is released and another thread may acquire...
common: Strip trailing slash from endpoints
Remove trailing slash from the endpoints' publicURL field in servicedefinitions. These values end up in the response of POST /tokens, and,according to the keystone API, should not end in slash. A trailing slash...
cyclades: Add newline
cyclades: Fix misleading message in network-remove
cyclades: Fix --image-name option in server-list
Fix regressions in snf-manage list commands
cyclades: Fix deadlock when creating servers
Fix deadlock between snf-dispatcher and backend allocator, by makingsnf-dispatcher take an exclusive lock to the backend which hosts the vm,before trying to get the exclusive locks to the IP pools in order to...
cyclades: Implement show extension API endpoint
Dummy implementation of /extensions/<alias> endpoint that always returns404.
cyclades: Implement /extensions API endpoint
cyclades: api_method_not_allowed typo's
cyclades: Test invalid http method endpoint calls
cyclades: Sync API tests with latest API changes
cyclades: Fix typo in links
cyclades: Add 'links' to images API
cyclades: Add 'links' to compute endpoints
Add 'links' attribute to API responses for servers, networks, flavorsand images endpoints.
cyclades: Add 'user_id' and 'tenant_id' to API
Add 'user_id' to API responses, and add a dummy 'tenant_id' to be equalwith the 'user_id'. Also always include metadata.
cyclades: Add 'addresses' to servers API response
cyclades: Make servers response compatible with OS
cyclades: Pass disk origin for all 'ext' flavors
cyclades: Implement /admin/stats API call
Implement API call to server statistics about servers and networks.
cyclades: add tests for 400 on wrong Compute paths
Ensure we return cloud faults under any API prefix
cyclades: fix URLs in compute/servers tests
cyclades: fix URLs in compute/networks tests
cyclades: fix URLs in compute/images tests
cyclades: fix URLs in compute/flavors tests
cyclades: fix compute api /versions
cyclades: Rename service token
Rename CYCLADES_ASTAKOS_SERVICE_TOKEN to CYCLADES_SERVICE_TOKEN foruniformity.
cyclades: rename type 'cyclades_vmapi' to 'vmapi'
cyclades: compute version v1.1 -> v2.0 in URLs
cyclades: fix syntax error in service list
cyclades: Fix syntax errors in resource definition
Incorporate all resources into service definitions
- Add 'service_origin' key in resources, as the normative name of the service that exported it.- Keep resources backwards compatible, export-resource-service reads resources from the service list.
cyclades: plankton/image version 'v1' -> 'v1.0'
cyclades: Remove obsolete delegate
Also remove setting UI_ACCOUNTS_API_URL
common: Export only services specified as public
Employ helper function `filter_public' in service-export-* commands.Also set `pithos_ui' service to non-public and clear version of`astakos_ui'.
cyclades: add service-export-cyclades command
service catalogs: autofill endpoints from BASE_URL
cyclades: add service catalog module
cyclades: initialize settings from service catalog
cyclades: Remove userdata api from ui prefix
- Individualize userdata api by placing module under synnefo namespace and urs under it's own USERDATA_PREFIX
make synnefo URLs consistent and configurable
https://service.deployment.vendor.tld/service-base/api-prefix/hard/path |___________________________________| |__________| |________| |_______| BASE_HOST BASE_PATH PREFIX Hardcoded...
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: 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: Always add attachments to server info
Update /servers API, to include attachments to /servers responses,even if the server has no NICs.
cyclades: Fix bug in network test
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.
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.
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: Various fixes to tests
cyclades: Fix stale 'DeletedError' exception
cyclades: Fix typo in comment
cyclades: Fixes relevant to lazy networks
cyclades: Fix bug in management command
Do not try to issue commission for networks without user (e.g. publicnetworks), when deleting them.
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
Merge branch 'feature-api-docs' into develop
Minor Conflict: docs/cyclades-api-guide.rst
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...
cyclades: Fix import of urlparse
Fix typo in network-list command
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.
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...
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.
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
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.
cyclades: fix bug in server-create command
Make --flavor-id mandatory in 'snf-manage server-create' managementcommand.
cyclades: Require user when creating private net
Update 'network-create' management command, to require an owner whencreating a private network.
cyclades: Fix typo in create_server
State of public NIC should be 'BUILDING'
Fix deadlock when creating server
Fix deadlock when creating a server that was introduced by commit501053a. Allocating the public IP in the same transaction with creatingthe server resulted in a deadlock with backend allocator, becauseinserting the new VM in the database waits on an exclusive lock of the...
Fix help message of management command
Cyclades: reserve public IP after commission
When creating a server, do not reserve a public IP address beforeissuing commission to quotaholder. This bug resulted in unsynchronizedIP pools between Cyclades and Ganeti, and needed externalreconciliation to synchronize them....
plankton: Cleanup and improve code
Improve performance in listing images
Use '_get_domain_objects' function of Pithos backend, to list allobjects in a 'plankton' domain, instead of looping over all accessibleaccounts, containers and objects. This function also returns metadataand permissions for each object in order to avoid two extra calls for...
Merge branch 'develop' into feature-api-docs
Fix small typo in import statements