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...
List all images in snf-manage image-list
Until now 'snf-manage image-list' management command printed only imagesthat were public, or accessible by a specific user. This commit changesthis command to print all images (regardless of the owner).
Remove transaction from 'backend-add' command
Do not run 'backend-add' command inside transaction, because if'snf-dispatcher' is running, it will receive messages that will arrivefrom a Ganeti backend that does not exist in the DB and will not be ableto process them.
Fix small typo in import statements
Improve settings related to ASTAKOS url
Rename 'PITHOS_AUTHENTICATION_URL' setting to 'ASTAKOS_URL'. Also remove'PITHOS_AUTHENTICATION_USERS' from docs (it was removed from code incommit 8df4fae).
Modify 'ASTAKOS_URL' to point to the node hosting the Astakos service...
Fix small typo in import statement
Add 'snf-django-lib' to dependencies
Merge branch 'feature-snf-django' into develop
Conflicts: docs/older/Changelog.pithos-app snf-astakos-app/astakos/im/api/__init__.py snf-pithos-app/pithos/api/util.py
Merge branch 'release-0.13' into develop
Conflicts: snf-astakos-app/astakos/im/messages.py
Fix create vm view images filtering in cyclades ui
use the new synnefo.user method `get_username` to populatepersonal/shared images.
Make all Changelog files prior to 0.13 obsolete
Since v0.13, all Synnefo components will have the same version and thesame Changelog, NEWS, Upgrade, Copyright file. This patch addressesold Changelog, NEWS and Upgrade files:
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 the common 'api_method' decorator in plankton
Use the common 'api_method' decorator in all plankton API methods.Modify the 'plankton_method' decorator to only create and closethe ImageBackend.
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.
Use common 'api_method' decorator in pithos api
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'.
Fix typo in network-list command
Use pprint_table in server-show command
Simple tests for synnefo.quotas
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...
Fix plankton ItemNotFound exception
Plankton backend raised AssertionError when an Image was not found.Change this to raise faults.ItemNotFound error. Temporary commituntil common API decorator is implemented.
Refs #3356
Conflicts: snf-astakos-app/astakos/im/messages.py snf-astakos-app/astakos/im/views.py version
Allow helpdesk users to shutdown/start vms
Include an additional action to helpdesk view. Based on the currentstatus of the virtual machine helpdesk user is allowed to start it orshut it down.
This comes handy since in most cases vm suspension needs to be...
Remove ui debug statement
Update cyclades webproject settings
remove deprecated admin app entries
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
UI auth module typo fix
fix get_username to return user uuid instead of user token. The changefix the resolving of image ownership of the current ui user.
Update setup.py for every snf-* component
UI create vm errors fix
never forget to pass vm create callback arguments
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)...
Display additional vm backend info in helpdesk app
Refs #3452
Typo fix
Trigger user quota updates on sepcific ui api calls
- We force user quota information to be updated after the completion of vm/network create/destroy actions.
Fix bug in uses_commission decorator
Distinquish between exceptions in the decorated function and exceptionsin accepting/rejecting the commissions. The first one determines whetherserials should be accepted or rejected, while the second one is an error...
Fix plankton shared_from image listing
Commit 469d099 introduced a typo which caused /plankton/shared_images/to raise an UnboundLocalError.
Fix NIC's default state
Use "ACTIVE" as NIC's default state, to avoid addding a data migration.
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....
Fix available ram options in vm create view
typo fix that caused unavailable ram options due to user quota limits tostill be shown as selectable values.
flavor-create: warn if flavor is deleted
Improve performance of cyclades-usage-verify
Get quotaholder holdings for all users in one call, to speed upexecution of 'snf-manage cyclades-usage-verify'.
UI loading view improvements
Refs #3396Refs #3397
- Use separate loading messages for each action to avoid confusion caused due to aynchronous progress- Enforce resolving of unknown machine image ids before the main view gets rendered.
UI auth client fix
Fix early check for existing cookie contents
UI. Always extract user info from current cookie contents
Refs #3460
Token value set in api action/request is always retrieved from thecurrent cookie contents. When cookie contents change is detected uiredirects user to log in.
Cookie changes are detected each time the app tries to use the user...
Helpdesk tests update
- Include suspend/release suspension tests- Mock astakos displayname/uuid resolving methods- Update fixtures with user uuids- Test vmid lookup
Helpdesk logging improvements
Refs #3454
Allow user to search by vm id in helpdesk app
Refs #3453
VM lookup is triggered when search query matches the following patterns
- vm<id>- vm-<id>
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.
Remove obsolete cyclades.admin
Remove alpha from logo & copyright period correction
snf-manage: Accept Ganeti server/network names
Make management commands relevant with servers and networks to acceptas arguments their Ganeti names, besides their database ID.
For example if BACKEND_PREFIX_ID='snf-', they following two commands areboth valid:...
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....
UI create machine improvements
- Display remaining resources- Predefined flavors display fix
Disable flavor options that exceed user quota
respect current user quota in flavor options display
New ui quota helper class
also updated ui views to use the new class
Improve ui userquota response
include all available information as retrieved from astakos response
Cyclades UI machine create view improvement
- widen up view- prettier (no scroll) compact flavor list style, when flavor options are too many to display in a single row
Conflicts: version
Improve memory choices display in vm create view
Apply human readable (MB, GB) conversion
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
Fix+move HTTP quotaholder client in synnefo.lib
Allow per-service configuration of the (http) quotaholder client.Kamaki is no longer needed in service (or ganeti) nodes,because the client has been moved to snf-common.
Also fix the default quotaholder settings for pithos backend to be disabled...
Bypass commissioning for orphan networks
Cyclades public networks do not have an owner, and since can not usethe commissioning system. Also, make snf-dispatcher instead of failingfor networks without userid to just a log a warning. This does not apply for...
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
Fix print alignment for snf-mange cmds
pprint_table misbehaved when handling unicode 'strings', breaking thealignment of the output of several snf-manage cmds, and raising aunicode encode exception, when printing non 'ascii' unicode strings.
Calculate correctly the max column width by applying len() directly to...
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.
Correctly instantiate pithos backend pool
Plankton should explicitly pass quotaholder related args to the pithosbackend pool constructor (after the feature of deregistering imageswithout deleting them is implemented, plankton should only passquotaholder_enable=false to the constructor)....
pep8 fixes
Cyclades feedback email fixes
- Include user uuid and email as user info
Helpdesk app fixes
- Do not use autocomplete feature (usernames are now stored in astakos db)- Translate provided username to retrieve user uuid- UI: Display network operstate in as badge. Hide deleted vms in nics lists.
Add type assertions in pprint_table args
Add assertions about the types of "table" and "headers" arguments.
Refs #3365
Fix default example urls in deb config files
Fix TypeError in pprint_table
Convert all fields of table and headers to strings before counting theirlength or right-aligning them.
fix and better document quota export/import
Merge branch 'feature-docs-devflow' into release-0.13
Make docs (devflow) version-'aware'
Update cyclades api settings and conf files
Rename synnefo.local -> example.synnefo.org
As determined by a spontaneous committee, based on
- .local is used
- 'example' strongly hints to configuration action
- synnefo.org is under control.
Validate all network-create parameters
reconciliation: handle missing network from db
Continue reconciliation even if an orphan network is missing from DB.
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).