cyclades: Fix bug in floating-ips api tests
cyclades: Fix bug in network test
cyclades: Rename Port state from BUILDING to BUILD
Neutron API defines the 'BUILD' status. This commit renames BUILDING state of NIC to BUILD.
cyclades: Update floating-ips api
Make changes to the floating-ips ip so that it complies with theOpenstack Quantum API.
cyclades: Common module for pretty-printing
Create common module for pretty-printing database objects. Currently itcontains only functions for pretty-printing networks and ports.
cyclades: Fix default values for IP pool
Temporary commit to change default offset and size of IPPoolTablefactory.
cyclades: Fix tests for ports
cyclades: Improve subnet-list management command
Remove unnecessary functions.
cyclades: Fix subnet-list management command
Remove stale imports
cyclades: Fix output of port-inspect command
cyclades: Add snf-manage subnet-update
cyclades: Small bug fixes in logic/subnets.py
cyclades: Add snf-manage subnet-create command
cyclades: Bug fixes in snf-manage subnet-list
cyclades: Update docstrings, remove old functions
cyclades: Update snf-manage subnet-create
Update snf-manage subnet-create. Previous version was pushed withoutbeing tested, thus it wasn't working at all.
cyclades: Fix some bugs in subnets
cyclades: Remove stale references to vm.router
Revert "cyclades: Add /routers api"
This reverts commit 69dadbe4e3223dc4d8cbaa5b09dde755c15679ed. Temporaryremove the /routers API.
cyclades: Fix POST /ports
Modify port create api call. If the user gives a public networkhe has to give a valid floating ip as well.
cyclades: Use existing IP when creating port
Extend port creation with the option to use an existing IPAddress. Thiswill be used to create a port with an existing Floating IP. Also, extendport-creata management command with the '--floating-ip' option.
cyclades: Fixes to port-create command
Verbal and code-style fixes to port-create command.
cyclades: snf-manage floating-ip-attach
snf-manage floating-ip-attach <address> --machine <server_id/router_id>
cyclades: snf-manage floating-ip-dettach <address>
cyclades: Fix bug in snf-manage network-modify
There was no field floating_ips, ips instead.
cyclades: Add /routers api
cyclades: snf-manage floating-ip-release <address>
cyclades: Add a port deletion test
cyclades: Fix snf-manage port-create command
In order to create a new port on a server you give --server <server_id>In order to create a new port on a router you give --router <router_id>
cyclades: Start the snf-manage floating-ip commands
cyclades: Add snf-manage subnet-list command
cyclades: Bug fixes in subnets
cyclades: Update api/subnets.py to use logic files
cyclades: Fix bug in port-inspect command
cyclades: Add backend code to Ports API/logic
Add backend code to create and remove ports from Ganeti backends. Alsoadd some imporovements and fixes to logic, API code and managementcommands.
cyclades: PEP8 fixes
cyclades: Update subnet tests
cyclades: s/slac/enable_slac in api/subnets.py
cyclades: Fix a typo in api/subnets.py
cyclades: Various fixes in api/subnets.py
cyclades: Fully support ip pools in subnets
cyclades: Add snf-manage port-inspect command
This command will provide info about the port concerning the DB andthe Ganeti state. For now, it provides only DB info.
cyclades: Add snf-manage port-remove command
cyclades: Add logic ports.py
Created a new file for ports in logic directory. This will havethe code about port manipulation in the backend. For now it is justused for db filling.Use the new function 'create' in the ports API.
cyclades: snf-manage port-create
cyclades: Fix some network management commands
cyclades: Add two functions to validate IP Pools
cyclades: Neutron API, update tests for IP Pools
cyclades: Update subnets.py to support IP Pools
Update subnets.py to use the two functions introduced in commit 2a1e6fb
cyclades: Update subnets.py to support slac
IPv6 subnets now support a boolean attribute called slac.If a request for a subnet contains both a slac field and an enable_dhcpfield, only the slac one will be used. If no slac field is found for anIPv6 subnet, the field enable_dhcp will be used instead....
cyclades: Fix the os-floating-ips API
Rewrite the of-floating-ips API to match with the new DB schema.
cyclades: Fix getting value from pool
If an address is specified, check that the value belong to the pool,else raise InvalidValue.
cyclades: Refactor code for allocating IPs
Refactor code that was used for allocating IP addresses and creatingNetworkInterfaces. The new code is more suitable to the new DB schemawhere each network may have many IPv4 subnets and each subnet mayhave many IP pools. Also, the new functions are using prefetch related...
cyclades: snf-manage port-list
cyclades: Modify snf-manage network commands
Modifications according to the new API
cyclades: Add more port tests
cyclades: Fix typo and tests
cyclades: Optimize DB queries of /servers API
Use 'prefetch_related' attribute of Django queryset to prefetch theNetworkInterface and IPaddress objects that are related with aVirtualMachine object. Also, modify functions that operate on serverNICs and IPs, to to use only the prefetched objects, which means that...
cyclades: Syntactic refactor ports
cyclades: Fix code for networks logic and API
cyclades: Fix and add new tests for /networks
Also, delete tests for old networks.
cyclades: Update api/subnets.py and tests
Commit 4e3a667 introduced a new model for Subnets, this commit containsthe following changes:
cyclades: Fix indentation, PEP8 and wrong imports
Integrate /networks API call
cyclades: Add /ports api call
cyclades: Make API server tests pass
Refactor Cyclades code so that it follows the new models for Networks,Subnets and IPAddresses. This refactor is not complete. Instead is thenecessary refactor for making tests for server API calls succeed.
cyclades: Add api/subnets.py
cyclades: Replace FloatingIP with IPAddress
This commit just replaces all references to FloatingIP objects withreferences to IPAddress object, in order to be able to just load thecode. But the code is left unchanged, so all tests will fail.
cyclades: Use NIC UUID in firewall tags
Use NICs UUID instead of index to generate firewall tags. Make the'set_firewall_profile' action to take the NICs ID as argument. Also,update the firewall settings.
cyclades: Change format of 'attachment' attribute
Change the format of the 'attachment' attribute. Until now, eachattachment had an identifier of the form 'nic-$vm_id-$nic_id'. Thiscommit changes the identifier to just '$nic_id', since from now onis unique for the lifetime of a NIC.
cyclades: Add 'ip_type' attribute to NIC
Extend NetworkInterface model with the 'ip_type' attribute to showwhether the IP is a floating or fixed.
Signed-off-by: Christos Stavrakakis <cstavr@grnet.gr>
cyclades: Use Ganeti NIC UUIDs
Since Ganeti 2.8, it is supported to refer to devices (NICs and Disks)not only by their index but also by their name or UUID. This commitupdates Synnefo to refer to devices by their name. Synnefo will set thename of the devices which will be a UUID. We do not use Ganeti's UUIDs...
cyclades: Fix bug in floating IP test
cyclades: Refactor network-modify command
Refactor snf-manage network-modify command. Remove options that modifiedlink, mac_prefix, mode, enable_dhcp or state of the network. Thisoptions modified only the network in DB and resulted in incosistenciesbetween Cyclades DB and Ganeti.
cyclades: Refactor code for renaming a server
Created function for renaming a server.
cyclades: Fix server-modify management command
cyclades: Resize server from management command
Add the --flavor option in server-modify management command to resize aserver to a different flavor.
cyclades: Add --action option in server-modify cmd
Add --action option in server modify command, to start, stop or rebootan instance.
cyclades: Add 'server-remove' management command
Implement server-remove management command that deletes an instance froma Ganeti backend. The command will wait by default for theOP_INSTANCE_REMOVE job to complete, except if --wait=False is used.
Request Django=>1.4, <1.5
Drop support for Django 1.2. Remove compatibility code that were used inorder to support Django 1.2 and 1.4. Finally update django documentationlink in the docs.
Merge branch 'hotfix-0.14.8' into develop
Merge hotfix-0.14.8 which ports Synnefo to wheezy and Django 1.4.5
Conflicts: ci/ci_squeeze.conf ci/ci_wheezy.conf ci/schemas/one_node_squeeze/packages.conf ci/schemas/one_node_squeeze/squeeze.conf ci/schemas/one_node_squeeze/wheezy.conf...
cyclades: Remove commit_manually decorator
Replace commit_manually decorator with commit_on_success. Since networkis no longer created in DB in the API request, the manually decorator isno longer needed.
wheezy: urls module doesn't export defaults
Fix missing import and broken test
cyclades: Handle errors during vm creation
Commit #f2080d1 mocked an OP_INSTANCE_REMOVE when enqueuing anOP_INSTANCE_CREATE job to Ganeti failed. However, this may result inreleasing IPs that may get reserved in Ganeti, because we can neverreally know if the job has reached Ganeti or not (e.g. timeout). For...
cyclades: Add missing commit_on_success decorator
cyclades: Apply old commits to moved files
Code from file 'api/servers.py' has been moved to 'logic/servers.py'.During the merge of hotfix-0.14.6 the develop, this code was lost. Thiscommit applies commits #f2080d1, #ea9b0fb, #32a0b85 to the new file.
Merge branch 'hotfix-0.14.6' into develop
Conflicts: Changelog docs/admin-guide.rst snf-cyclades-app/synnefo/api/management/commands/network-remove.py snf-cyclades-app/synnefo/api/servers.py snf-cyclades-app/synnefo/api/tests/servers.py snf-cyclades-app/synnefo/logic/backend.py...
cyclades: Mock vm removal if creation fails
In case creating a VM fails before the OP_INSTANCE_CREATE job isenqueued in Ganeti, the VM and its NICs must be deleted, and theresources must be released from Quotaholder, which is exactly what isdone when a VM is deleted from Ganeti. Instead of duplicating the code,...
cyclades: Fix bug during server creation
Commit #32a0b85, modified server creation, by refetching the object fromDB after issuing commission to quotaholder. However, the new object isnot having the 'config_url' attributed, which is added to the vm object...
cyclades: Fix unbound reference
Set backend to None if not specified.
cyclades: Do not release resources if already deleted
Ensure that a commission to release vm resources is issued only once.If a vm is marked `deleted', then resources must have already beenreleased.
cyclades: Do not save stale objects after a commit
Call to issue_and_accept_commission saves the resource object (eg a vm)and commits the transaction. This has the side-effect that the resourceobject becomes stale: its lock is released and another thread may acquire...
common: Strip trailing slash from endpoints
Remove trailing slash from the endpoints' publicURL field in servicedefinitions. These values end up in the response of POST /tokens, and,according to the keystone API, should not end in slash. A trailing slash...
cyclades: Add newline
cyclades: fix typos
cyclades: Make index field of NIC optional
Change 'index' field of NIC model to be optional, because the index ofbuilding NICs is unknown. Also, change all API responses to return onlythe active NICs.
cyclades: Fix bug in handling of reboot type.
'type' attribute of reboot OS API call was directly mapped to the'reboot_type' option of Ganeti reboot job. However these two aresemantically different. The 'SOFT' and 'HARD' reboot types of OS API aremapped to 'shutdown_timeout' option of Ganeti jobs. However, setting...
cyclades: Fix broken tests from commit #c172f4a
Commit #c172f4a used the "size" attribute of images. This commitfixes mocked images of tests to contain this attribute.
Pass hashmap instead of location to snf-image
Update Cyclades, to pass as 'img_id' the hashmap('checksum') of theimage, instead of the location URL. In that way, snf-image does not anyaccess to the Pithos database.