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
Add Server Create documentation
Fix typo
Move astakos lib from snf-common to snf-django-lib
Use 'python-objpool' instead of 'synnefo.lib.pool'
Use the python-objpool package for pooling resources as object, insteadof the pooling code that existed in snf-common ('synnefo.lib.pool')
Refs #3524
Move common test code to snf_django.lib.testing
Remove VM/Network DeletedError and BuildingError
Handle these errors explicitly in the code instead of the "api_method" decorator.
Remove ImageBackend NotAllowedError
Refs #3359
Use common 'api_method' decorator to cyclades api
Update Cyclades API methods to use the new common 'api_method'decorator. Also, update all the relevant tests.
Remove dead code
Move cloud faults to 'snf_django.lib.api.faults'
Gather all faults from all synnefo projects into common'snf_django.lib.api.faults'.
Use pprint_table in server-show command
Make 'type' parameter for network-create mandatory
Do not use a default value (was "MAC_FILTERED") for "type" parameter of"network_create" API method. The client must explicitly choose thenetwork type.
Delete Image without deleting file from Pithos
Until now, deleting an image resulted in deletion of the correspondingfile from Pithos. Plankton Images are files in Pithos with specialmetadata on the 'plankton' metadata domain. Adding an Image to plankton...
Merge branch 'release-0.13' into develop
Conflicts: snf-astakos-app/astakos/im/messages.py snf-astakos-app/astakos/im/views.py version
Merge branch 'tmp-common-email-recipients' into develop
Merge branch 'feature-astakos-authpolicies' into develop
Conflicts: snf-cyclades-app/synnefo/api/management/commands/flavor-create.py version
Delegate cyclades ui feedback calls to astakos
Mimic pithos app/ui feedback handling to avoid duplicating boilerplatecode.
New settings:CYCLADES_USER_FEEDBACK_URL
Deprecated (removed) settings:FEEDBACK_CONTACTSFEEDBACK_EMAIL_FROM
pool context manager, http pool AssertionError fix
Refs #3492
- Introduce a generic PooledObject class to act both as a context manager for getting and putting back an object from a pool.
- Implement a class PooledHTTPConnection(PooledObject) as a sublcass of the one in (1)...
Create public NIC when creating VM
Until now, a server's public NetworkInterface was not created in the DBuntil the arrival of the message from Ganeti hooks. However, the IPv4address of the NIC is reserved before sending the OP_INSTANCE_CREATEjob to Ganeti....
flavor-create: warn if flavor is deleted
Move UserCache from cyclades.common to lib.astakos
Move UserCache from synnefo.management.common to synnefo.lib.astakos.Also, update ListCommand with 'astakos_url' and 'astakos_token' classattributes, which must be declared only when 'user_uuid_field' is used.
Use --deleted=True|False in flavor-modify
Add --dry-run option to snf-manage network-create
Move common code for mngmt commands to webproject
Move cyclades functions that are useful for all managament commands, likepprint_table or parse_filters, to snf-webproject.
Add ListCommand to be used for all *-list commands
Create a generic ListCommand to be user for all *-list managementcommands. ListCommand handles must tasks that are common to allmanagement commands, like retrieving objects from db, filteringresults and formating output to a pretty table, json or csv....
Add --dry-run option to flavor-create
Add --dry-run option to flavor-create management command. Also, do notcrash if flavor already exists.
Refs #3366
Conflicts: version
Fix bugs in UserCache
Fix an infinite loop bug in UserCache.fetch_names(), and correct the*-list commands to only call fetch_names(), when invoked with the--displayname option.
Conflicts: snf-cyclades-app/synnefo/api/management/commands/cyclades-export-quota.py snf-cyclades-app/synnefo/api/management/commands/network-list.py snf-cyclades-app/synnefo/api/management/commands/server-inspect.py...
Fix log string format
Add negative caching in ImageCache
Refs #3375
Improve server-list usability
Improve perf for snf-manage cyclades commands
When the snf-manage {server, network}-list commands are invoked with the--displayname option, batch the UUID-to-displayname requests to astakos,instead of issuing a request for each (unique) UUID.
pep8 fixes
fix and better document quota export/import
Validate all network-create parameters
Fix bug: Detect malformed network subnet
Fix bug in Cyclades network API. API should raise BadRequest ifspecified network subnet is invalid. Also, do not allow subnets withhost bits set (like 10.0.0.1/28).
pep8 convension to cyclades management commands
Fix testcase-mock
Mocked get_image_dict should contain checksum, needed by archipelago