History | View | Annotate | Download (38.5 kB)
All unit tests are executed in the refactored code
Merge branch 'master' into logic-refactoring
Conflicts: db/db_controller.py
Still refactoring, separating the logic and the ORM layer
Be consistent about the use of simplejson
simplejson was merged into Python 2.6's stdlib as json. To help withthat and avoid external dependencies, Django provides a utils.simplejsonmodule that either imports Python's json module or imports an embedded...
Conflicts: db/models.py
return DELETED in _get_rsapi_state - Fixes #293
fix server and image polling
add variable POLL_LIMIT (initially 1h) on settings.py thatis the maximum time allowed to ask if there have been changes, usingthe changes-since GET variables. Return badRequest if this limit is exceededon a query
fix server polling support
Ref #291
remove description fields for VM, Image
Ref #185
fix GET /servers
check if server.status is "DELETED" rather than attribute server.deletedRefs #293
fix GET /servers/detail error check
return badRequest if changes_since variable is problematic
Refactored charge (from VM model) and fixed unit tests
fix ServerHandler doc string
rename changes_since to changes-since & slider fix - Refs #291 #147
gt instead of gte condition, refs #291
auto-update vm list using changes_since
support partial GET data for the virtual machines
use changes_since GET variable to specify a datetime. If ServerHandlersees a datetime, it will return virtual machines that were updated afterthat datetime, and nothing more
update serveraddress handler
return badRequest if networkId is not public/private
implement ServerAddressHandler
ServerAddressHandler lists server addresses(all or by Network ID). Functions update/create/delete have beenremoved, since they are not implemented by Openstack(http://docs.openstack.org/openstack-compute/developer/content/ch04s02.html)
changes on ServerHandler and related urls
use attribute networkID, as specified on Openstack(http://docs.openstack.org/openstack-compute/developer/content/ch04s02.html)
changes related to Openstack naming
Server/Image Metadata Handler additions
Implemented the method for POST requests,added proper error handling for POST,PUT,DELETE in bothServerMetadataHandler and ImageMetadataHandler
Implemented the method for PUT requests in bothServerMetadataHandler and ImageMetadataHandler.
add two exceptions on the create server wizard
add DoesNotExist and MultipleObjectsReturned exception check for Flavor/Image,on the POST data of the create server wizard
Minor fixes in Image/Server Metadata Handler
Implemented the DELETE method in bothServerMetadataHandler and ImageMetadataHandler.Plus minor vocabulary fix
Initial Server/Image Metadata handling
Server/Image Metadata handling according toOpenStack Compute API v1.1. Added:
Some calls return inconsistent data...
translatable message in case no machine exists
Show the following translatable message in div id emptymachineslist when theapi call returns no servers (user has not created any server, or all of theirservers are deleted)
{% trans "You have no virtual machines! Press Create New to create some!" %}</div>
improve error logging
use log.exception instead of log.error to log error messagesplus the full exception traceback.
fix STOP command name
add virtual machine group tests
added 4 tests regarding VirtualMachineGroups: * testVMgroupList, that tests if the expected list of groups is returned by the API * testVMgroupDetails, that tests if the expected virtual machine group is returned by the API...
update VirtualMachineGroupHandler
changes on update name (and metadata, in future)
set server's name on ServerActionHandler
use ServerActionHandler.update for http PUT request to change name of a serverIf the requested metadata_key is 'name' and the server exists, change the name.Otherwise return itemNotFound
Make owner a not null ForeignKey in VirtualMachine
Make owner a required, not null foreign key in VirtualMachine.Also fix fixtures and the implementation of POST /servers to includea proper owner value (everything gets to be owned by the single SynnefoUser...
return progress attribute on servers/images
on images return progress="100" if image.state == ACTIVE, otherwise progress="0" on servers return progress="100" if server.rsapi_state == ACTIVE, otherwise progress="0"
Remove user field from SynnefoUser, minor fixes
Remove the "user" ForeignKey() field from the SynnefoUser model, sincewe do not use Django's auth mechanism.More specifically: * remove user ForeignKey() field * update fixtures for initial data, DB and API tests...
add attribute description for the machines
on machine's response, as it is with images
improve exception handling on api/handlers
add missing try except blocks on FlavorHandler, ImageHandler, ServerHandler
improve error handling on api/handlers
changed "raise fault.itemNotFound" to "return noContent" on the few cases that it was still in use
update api handlers
fix server's name on the create machine wizzard
remove legacy code, update RS API spec doc link
Fix handling of flavor disk size in POST /servers
Make the POST /servers handler convert disk size to MBbefore passing it to the RAPI call. The disk field of the Flavormodel is in GB.
log unexpected errors
consolidate jquery event handlers for rangeinputs in the wizard
create vm action selects requested flavor
and display the right values in the wizard confirmation step
fix ServerHandler
update list of acceptable statuses of a job with 'queued' and 'waiting'
fixes previous commit
updated ServerActionHandler
Use json.loads(request.raw_post_data) instead of request.post for actionsAlso create VM with name test-server if we are running unit tests(request.META['SERVER_NAME'] == 'testserver')
rewrite create handler docstring
improve error handling when creating instance
improve API compliance of the create instance handler
added size and fixed serverId on Images listing
extended Flavors listing to return cpu number as well
List available images corrections based on the RS Api
list details for a specified server, following the rackspace api
improved virtual servers filtering . also made a small change regarding /servers
the first change adds field deleted as the filter, while the second one is related with the address tag
addresses and metadata fields on GET /servers/detail
documentation added on api/handlers.py
error message change on ServerHandler
added better error handling on ImageHandler
improvements regarding error handling.
destroy action sets VM._operstate as 'DESTROYED' and does not call rapi.DeleteInstance to destroy the machine
create machine wizzard pass foo data to the serverhandler
start Machine action, for the standard view - initial commit
fixed problem with copyright string
Initial Disk Management API (DM API) implementation
The DM API is accessible under api/v1.0grnet1/ andit extends the Rackspace Cloud Servers v1.0 APIfor the use of Disks. Notable changes:
removed ganeti rapi reference from serverhandlers
action_start() function added. actions are executed from there and success/failure messages are returned for the gui
added TIMEOUT variable on settings.py.dist. You'll have to cp to your settings.py
initial value is 10 seconds. after this time passes, if the ui hasn't received any data, the user is informed (with js alert window at the moment) that thereare network issues (a better message might ask the user to refresh)
added error handling when rapi can't login to the backend. the ui user gets informed
added get_vmid on Image model to return the first VMs id, if any. This was the serverid variable
use rsapi_state instead of operstate
a few changes on the handlers/machines.html in order for the servers to appear
What commit b4141604 should have contained.
The proper contents of commit b4141604 are included here.
initialization of VirtualMachineGroup and VirtualMachineGroupHandler that lists/creates/deletes VirtualMachineGroups
these are groups of virtual machines for a User
a few changes on the handlers in order to work with the rapi (since we now have access).
removed id_from_instance function from the VirtualMachine model and put it back since it will be needed as a global functionto be imported by handlers and not as a staticmethod of the VM model.
Image implementation of the Rackspace API
added flavors on the RS API and replaced MOCK Flavors
get rid of the MOCK objects and use a database with initial data loaded
added create machine .post-create class on the ui
this is a static link that once pressed sends a HTTP POST request to the ganeti cluster (through api.handlers.ServerHandler.create)and creates a virtual server. This is sort of a mockup behavior, since
reboot and shutdown actions for a machine added on the list machines view
they are connected with the api.handlers.ServerActionHandler.create function that understands the data they send
a few changes regarding the VirtualMachines id and ganeti id.
Initial attempt to implement the ui-->RS API-->rapi architecture
main changes are:
removed reference to aquarium/models to db/models
a few minor changes regarding the naming of metadata, Server Label has become Server_Label (xml naming does not like spaces), also changed vocabs.py and machines.html according to the STATES tuple of vocabs.py
added spinner when loading machines and server sleep, to emulate a real life use case
js api calls
Add error handling on /servers read()
Add a paginator decorator for limit/offset syntax
This addresses the “Paginated Collections” section of the specificationin a transparent and get-out-of-my-way way.
The functionality is absolutely needed to signal the stop of the list inthe CloudServers Python bindings (at least at the moment).
Add an initial implementation of API's /servers read()
Convert faults to return an Exception subclass
Piston's rc from which fault is modeled doesn't do that; however, weprefer doing things the Django (rather than the Piston) way and makefaults be an Exception subclass.
Piston may not do that but it actually gives us all the tools to do it,...
Add Limit handler
Be more explicit about ServerHandler's allowed_methods
Add Shared IP Groups handler
Add backup schedule handler
Add Iimage handler