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....
Merge branch 'release-0.13' into develop
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
Delegate astakos user catalog call in cyclades
cyclades now serve a delegate view for the astakos /user_catalog apicall. Cyclades UI app should use this endpoint to translate user uuidsto display names.
Astakos endpoint is configurable from the CYCALDES_USER_CATALOG_URL...
Translate image owner uuid -> display name in UI
UI uses the introduced /user_catalog api to translate uuids to displaynames when necessary.
minor fix and rename to cyclades-reset-usage
minor fixes and rename to cyclades-usage-verify
rename to cyclades-reconcile-commissions
Synnnefo ui fallback route
include a default route to redirect to index to catch arbitrary urlfragments.
ui compatibility: translate uuids to display names
correct quotaholder exception imports
userquota to handle null request.user
Fix whitespace, Licence
Re-implement select_for_update
Previous implementation of 'select_for_update' method was based on anattribute of the 'ForUpdateManager'. However, the model manager is sharedbetween all threads, which lead to race conditions. This commitreimplements 'select_for_update', by making it return a custom QuerySet...
Totally remove password from create_instance
Never pass password as an 'osparam' to Ganeti. Always use the vmapi,even for VMs created with server-create management command.
Fix bug in PoolTable
Catch correct exception
Make server-create work with vmapi and archipelago
Fix bug in DummyQuotaholderClient
DummyQuotaholderClient should count only positive commissions.
Fix bug in networks create
re-raise the exception after rolling back transaction
Add details to OverLimit exception
Handle exceptions when using --filter-by
Handle exceptions in 'filter_results' (management commands helperfunctions used to implement --filter-by option).
Fix reconciliation for building VMs
Since commit 482c645, a VM exists in the Cyclades DB before thecorresponding job is enqueued in the Ganeti backend. Therefore, there isa corner case, where Cyclades can not enqueue the job to Ganeti andCyclades crashes before deleting the VM from the DB, which results in a...
Fix transaction handling when creating server
Better handling of transactions when creating a server. Commit thecreation of VM in DB, before enqueuing the job to the Ganeti backend.If communication with Ganeti fails, then the VM is deleted from the DB....
Remove unused module
Remove mac2eui64 dependency
Import mac2eui64 code which is already shipped under util/mac2eui64 insteadof shipping it as a seperate script.
Fix pep8 issues
Fix pep8 warnings
Fix string replace in 'weekly stats' js
Fix string replace in 'weekly stats' js to work with both the old stats urls andthe new snf-stats-app urls.
Fix bug in network reconciliation
Fix bug in network reconciliation caused by wrong variable scope.
Add disk_template to Flavor name
Add command for exporting cyclades quota
Add 'cyclades-export-quota' management command, for exporting to a fileVMS_PER_USER and NETWORKS_PER_USER settings, in a format expected by theastakos management command 'user-set-initial-quota'.
Handle transaction manually when creating network
When creating private networks, commit the transaction before sendingthe job to all Ganeti backends. If communication with all Ganetibackends is included in the transaction, notifications from backendsmay be received before the Network entry is created in the DB.
Fix image 'backend_id' for archipelago
Archipelago needs as disk origin, the hashmap of the imageinstead of its url in the backend.
Rename ARCHIPELAGOS to ARCHIPELAGO
Rename ARCHIPELAGOS_BACKENDS setting to ARCHIPELAGO_BACKEND.
Filter out deleted vms/networks
Do not count deleted VMs and Networks when getting holdingsfrom the Cyclades DB.
cyclades: import quotaholder exceptions from kamaki
Because this is where the quotaholder client exceptions come from.
Merge branch 'feature-projects' into develop
Expose /user_catalogs service api call
Change migration scripts to use this instead of the user api call
Change feedback & user_catalogs astakos && pithos api calls
plankton: Handle correctly request filters
Make sure that when listing public images plankton verifies thatsize_max and size_min req filters are integers, and return a BadRequest response otherwise.
Fix progress messages handling
proper handling of missing `messages` key progress messages.
Merge 'develop' into feature-projects
Needed for building devflow packages from feature-projects.
Network field type has been renamed to flavor
Fix typo bug in reconcile ip pools
Add warning message for backend without networks
Fix footer positioning javsacript handler
Improve javascript exception handling
Skip 'Script error' exceptions. Those exceptions get raised inFF/Safari/Chrome from scripts which location violates same-origin-policyof the document (e.g cloudbar.js).
Merge branch 'latest-quota' into develop
bring quotas, projects, astakos logins, pithos/RADOSinto the new synnefo development workflow
Refactor network reconciliation
Helper api method to retrieve existing userids
Cyclades astakos migration helper command