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
Merge branch 'release-0.13' into develop
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.
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 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
Update cyclades api settings and conf files
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).
Fix typo
pep8 convension
pep8 convension to cyclades management commands
Fix testcase-mock
Mocked get_image_dict should contain checksum, needed by archipelago
Fix BridgePoolTable testcase
Add plankton test
Add test for malformed filter when listing images.
Remove unused function delete_to_login_service
Don't use CYCLADES_USER_CATALOG_URL in snf-manage
Replace CYCLADES_USER_CATALOG_URL with ASTAKOS_URL.replace() insnf-manage cmds that use it. CYCLADES_ASTAKOS_SERVICE_TOKEN(/user_catalogs) cannot be used with CYCLADES_ASTAKOS_SERVICE_TOKEN./service/api/user_catalogs should be used instead.
Add --uuids option to snf-manage cmds
Fixes relave to --uuids option
Pep8 fixes
Add --uuids option to server-list
Move exception handling in get_user()
Fix a pep8 error
Remove stale import
Remove 'snf-admin' and 'snf-cloud' tools
Remove unused setting file
Cyclades astakos migration command fixes
- Rename to cyclades-astakos-migrate-013- Handle invalid uuids- Some code cleanup
Override get_owner method for glance model object
to properly handle unknown owner entries
rename to cyclades-reconcile-commissions