Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / db @ 9835a70d

# Date Author Comment
6a03d89f 11/08/2013 03:50 pm Christos Stavrakakis

cyclades: More strict 'on_delete' for models

Use 'models.PROTECT' for 'on_delete' attribute for some ForeignKey
relationship between networking models. This will create a more "strict"
database and protect for unexpected data loss.

0e02a709 11/07/2013 04:28 pm Christos Stavrakakis

cyclades: Fix bug in SeparatedValuesField

Return [] instead of None, if the field is null.

bfb3f9c2 11/06/2013 05:50 pm Christos Stavrakakis

cyclades: Create IPv6 Addresses from dispatcher

When ports are created from the API they do not have an IPv6 address.
The IPv6 address is only available after the MAC address of the
NIC is known which is only available after the message from the
Ganeti backend has been received. However, dispatcher did not created...

f8ce6d44 11/06/2013 02:00 pm Christos Stavrakakis

cyclades: Fix bug in tests

Fix bug in port tests that were introduced by latest changes in IPPool
manager.

8d5795b4 11/06/2013 02:00 pm Christos Stavrakakis

Cyclades: Rename 'Can not' to 'Cannot' to all msgs

f8714db8 11/06/2013 01:43 pm Christos Stavrakakis

cyclades: Fix bug and typo in IPPool

833f2ad5 11/06/2013 11:16 am Christos Stavrakakis

cyclades: Fix handling of old IP pools

Before implementing the Neutron API, each network had one IP pool that
contained the whole subnet CIDR. This changed since now we have multiple
IP Pools(with base and offset attributes) per network and this IP pools...

c82f57ad 11/04/2013 12:18 pm Christos Stavrakakis

cyclades: Series of fixes regarding networks & ips

  • Do not delete the network from the DB if it has associated floating
    IPs. This should never be the case because a check is made before
    deleting the network, however this check is added for safety.
  • Do not allow deleting a network if there are still ports configured on...
e4758367 11/04/2013 11:12 am Dionysis Grigoropoulos

cyclades: Add snf-manage subnet-inspect

  • Add snf-manage subnet-inspect
  • Update return_end and return_start function in IPPool
09b76b7e 11/02/2013 02:39 pm Christos Stavrakakis

cyclades: Fix permissions when looking up ports

Look up of ports should check the port userid and not the network
userid.

d7862097 11/02/2013 01:59 pm Christos Stavrakakis

cyclades: Port userid can not be null

99988465 11/02/2013 01:43 pm Christos Stavrakakis

cyclades: Create server with existing ports

Extend POST /servers API call to support creation of servers that will
be using existing ports. Networking of the instance is defined via the
'networks' attribute which can contain either network UUIDs or port
UUIDs. In case of network UUIDs, the user can also request for a...

fae6e5f0 11/01/2013 04:17 pm Christos Stavrakakis

cyclades: Create ports without 'device_id'

Allow creation of ports that are not connected to any instance. Such
ports will be in 'DOWN' state. To allow this, 'machine' attribute of
NetworkInterface model has been made to allow null values. Finally, the
'logic.ports' module has been remove, and the corresponding code has...

ff863a80 11/01/2013 12:45 am Christos Stavrakakis

cyclades: Add accounting for IP Addresses

Create IPAddressLog DB table to hold information about allocation of IP
addresses to virtual servers. The information that is currently saved
contains the IP address, the ID of the virtual server, the ID of the
virtual network along with the datetime that the address has been...

691c98cf 11/01/2013 12:45 am Christos Stavrakakis

cyclades: Fix bugs relative to pool allocation

Fix bug when trying to allocate a specified IPv4 address. Only one of
the IP pools will contain this address, so you must bypass InvalidValue
exceptions until searching all pools.

Also PoolManager raised 'EmptyPool' exception when trying to allocate from an...

f32e8021 10/30/2013 06:27 pm Christos Stavrakakis

cyclades: Mock GANETI_USE_HOTPLUG on ports tests

Test that you can not create or delete a port on a machine
that is started if GANETI_USE_HOTPLUG is set to False.

3a6be177 10/30/2013 12:51 pm Christos Stavrakakis

cyclades: Rename Port state from BUILDING to BUILD

Neutron API defines the 'BUILD' status. This commit renames BUILDING
state of NIC to BUILD.
e4f484da 10/30/2013 12:43 pm Marios Kogias

cyclades: Update floating-ips api

Make changes to the floating-ips ip so that it complies with the
Openstack Quantum API.

0711e5aa 10/30/2013 12:56 am Christos Stavrakakis

cyclades: Fix default values for IP pool

Temporary commit to change default offset and size of IPPoolTable
factory.

3b2984dc 10/30/2013 12:40 am Christos Stavrakakis

cyclades: Make tests work with multiple IP pools

Refactor tests so that they are aware that a network can have multiple
IP pools. Also, add extra check to PoolManager methods in order to check
whether a value is contained in the pool.

e59cda53 10/29/2013 11:20 pm Christos Stavrakakis

cyclades: Fix bugs in IP pools

Fix default value for 'external' argument of release_address method of
Network model. Also fix how is checked whether an IP pool contains an
address.

f82dfec6 10/29/2013 07:38 pm Christos Stavrakakis

cyclades: Various fixes to networks/subnets/pools

  • Fix IP pools of subnets to take into account the 'offset' when searching
    if a pool contains an IP address and when converting from value to index
    and from index to value.
  • Fix the way subnets are created from 'logic/networks'...
0e0a6ef9 10/29/2013 07:38 pm Christos Stavrakakis

cyclades: Fix reconciliation for network and pools

Fix reconciliation to work with multiple IP pools per network:
  • Fix reconcile-networks command to check if a reserved_ip in a Ganeti
    network is reserved in the pool that contains this IP (if any)
  • Fix reconcile-pools to reconcile each of the networks IP pools and...
87105bf9 10/29/2013 03:06 pm Christos Stavrakakis

cyclades: Remove stale reference to 'router'

a15114a0 10/29/2013 02:26 pm Christos Stavrakakis

cyclades: Default name for ports and subnets

7f7f49e3 10/29/2013 02:20 pm Christos Stavrakakis

cyclades: Add migratrion for external_router field

Add data migration for 'external_router' fields. This field is set to
True for all 'public' networks.

495e2be8 10/29/2013 02:17 pm Christos Stavrakakis

Revert "cyclades: Add /routers api"

This reverts commit 69dadbe4e3223dc4d8cbaa5b09dde755c15679ed. Temporary
remove the /routers API.

d9c36253 10/25/2013 12:35 am Marios Kogias

cyclades: snf-manage floating-ip-attach

snf-manage floating-ip-attach <address> --machine <server_id/router_id>

69dadbe4 10/25/2013 12:35 am Marios Kogias

cyclades: Add /routers api

  • Add support for /routers api calls
  • Add tests for the api
00eb7f51 10/18/2013 04:34 pm Christos Stavrakakis

cyclades: Add message to exceptions

a1d3bc8a 10/18/2013 01:13 pm Christos Stavrakakis

cyclades: Hack-ish commit for old IP pools

4445f97a 10/16/2013 01:26 pm Dionysis Grigoropoulos

cyclades: Fully support ip pools in subnets

be7c5377 10/14/2013 08:19 pm Christos Stavrakakis

cyclades: Fix some network management commands

  • Fix network-list to properly display networks. Add optionally
    'subnets' fields to display the IDs of all subnets
  • Fix network-modify to externally reserve the IPs in DB
  • Fix network-create to not require a name and subnet4 or subnet6...
3278725f 10/14/2013 05:56 pm Christos Stavrakakis

cyclades: Refactor backend code for new networks

  • Optimize DB queries by using prefetch related for NIC IPs.
  • Do not try to construct new NIC if it does not exist in Cyclades DB.
  • Update tests
ae994d2e 10/14/2013 03:51 pm Christos Stavrakakis

cyclades: Fix getting value from pool

If an address is specified, check that the value belong to the pool,
else raise InvalidValue.

08e6fe1b 10/14/2013 03:51 pm Christos Stavrakakis

cyclades: Add method to get ip stats to network

Extend Network model with a method to get the number of free and total
IPv4 addresses of the network. Also, add method to IPAddress model to
release its IPv4 address if any. Finally, update backend-list management...

413fb1dd 10/14/2013 11:07 am Christos Stavrakakis

cyclades: Add option to get value from pool

Extend PoolManager 'get' method to also take as argument a value to
get from the pool. If the value is already reserved, then a
ValueNotAvailable exception will be raised.

9541aab5 10/14/2013 12:07 am Marios Kogias

cyclades: snf-manage port-list

b3a43976 10/11/2013 02:40 pm Christos Stavrakakis

cyclades: Optimize DB queries of /servers API

Use 'prefetch_related' attribute of Django queryset to prefetch the
NetworkInterface and IPaddress objects that are related with a
VirtualMachine object. Also, modify functions that operate on server
NICs and IPs, to to use only the prefetched objects, which means that...

8c7c9813 10/10/2013 04:59 pm Christos Stavrakakis

cyclades: Fix DB tests

8764d304 10/10/2013 04:35 pm Christos Stavrakakis

cyclades: Make logic tests pass

Refactor Cyclades code so that it follows the new models for Networks,
Subnets and IPAddresses. This refactor is not complete. Instead is the
necessary refactor for making tests for server API calls succeed.

593851e0 10/10/2013 12:40 pm Build Bot

cyclades: Add /ports api call

92d2d1ce 10/10/2013 01:56 am Christos Stavrakakis

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 the
necessary refactor for making tests for server API calls succeed.

b4695420 10/09/2013 08:00 pm Christos Stavrakakis

cyclades: Make IPPool manager work for subnets

Temporary commit to make IPPool manager work. This will work only if
there is only one allocation pool for each subnet.

74d936dc 10/09/2013 07:59 pm Christos Stavrakakis

cyclades: Change 'null' attribute of Subnet models

2f1b4cbc 10/09/2013 07:38 pm Christos Stavrakakis

cyclades: Add missing migration file

cddc2b2f 10/09/2013 07:36 pm Dionysis Grigoropoulos

cyclades: Use a constant for name length of models

Use a constant for declaring the max length of the name of a
model

0247388f 10/09/2013 07:34 pm Christos Stavrakakis

cyclades: Update models_factory

Update models factory to match the new models.

Signed-off-by: Marios Kogias <>
Signed-off-by: Dionysis Grigoropoulos <>

06ffd11f 10/09/2013 07:33 pm Christos Stavrakakis

cyclades: Remove unused fields and model from DB

Remove unused 'ipv4' and 'ipv6' attributes from NetworkInterface model
and totally remove FloatingIP model. This information has been moved
in commit 972a428 to IPAddress model.

d484f6df 10/09/2013 07:33 pm Christos Stavrakakis

cyclades: Data migration from NIC to IPAddress

Migrate db data from NetworkInterface model to IPAddress model.

bdd0f1a6 10/09/2013 07:33 pm Christos Stavrakakis

cyclades: Major refactor on NIC model

Major refactor on db models concerning NetworkInterface models. A new
table, namely 'IPAddress' has been created to represent an IPAddress
(IPv4 or IPv6). Each IPAddress is related with a network and the subnet
from which it has been allocated. Also it contains 'floating_ip' attribute...

7b72b50d 10/09/2013 07:31 pm Christos Stavrakakis

cyclades: Remove unused fields from Network model

Remove unused fields from Network: subnet, subnet6, gateway, gateway6,
dhcp and pool. The following attributes have been moved to Subnet model
in commit 779c887. Also extend model with the 'external_router'...

4e3a6674 10/09/2013 07:31 pm Christos Stavrakakis

cyclades: Add new Subnet model

Add Subnet model containing Layer-3 characteristics for networks. Also,
extend IPPoolTable object to hold a reference to the Subnet that the
pool belongs to.

Signed-off-by: Dionysis Grigoropoulos <>

d8989b47 10/09/2013 07:31 pm Christos Stavrakakis

cyclades: Add DB data migration for subnets

Migrate attributes from old Network model to new Subnet model.

258d1f78 10/09/2013 11:40 am Christos Stavrakakis

cyclades: Do not delete FIPs if VM is deleted

Remove on delete CASCADE for floating IPs if the VirtualMachine is
deleted.

cb7b1c23 10/09/2013 11:40 am Christos Stavrakakis

cyclades: Clear FloatingIP when deleting NIC

Override 'delete' method of NetworkInterface model, to clear the
'machine' flag of the corresponding NIC, if any.

443315d6 10/09/2013 11:40 am Christos Stavrakakis

cyclades: Add 'ip_type' attribute to NIC

Extend NetworkInterface model with the 'ip_type' attribute to show
whether the IP is a floating or fixed.

Signed-off-by: Christos Stavrakakis <>

7c714455 10/09/2013 11:40 am Christos Stavrakakis

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 commit
updates Synnefo to refer to devices by their name. Synnefo will set the
name of the devices which will be a UUID. We do not use Ganeti's UUIDs...

df8a7015 10/07/2013 02:37 pm Christos Stavrakakis

cyclades: Make (network, ipv4) unique for each NIC

Add a unique constraint to NetworkInterface model. This constraint
asserts that the same IPv4 address from the same network will no be
assigned to more than one NICs.

0ccb6461 10/07/2013 02:37 pm Christos Stavrakakis

cyclades: Refactor reconciliation of pools

Move reconciliation of IP pools from 'snf-manage reconcile-networks'
to 'snf-manage reconcile-pools'. Also change the way reconciliation
works: Instead of reconciling the IP pools in DB with the IP pools in
Ganeti, the new reconciliation just checks that:...

d793786b 10/07/2013 02:37 pm Christos Stavrakakis

cyclades: Fix str representation for pool objects

7da2d1bd 10/03/2013 02:45 pm Christos Stavrakakis

cyclades: Add missing migration for commit 3bb0b11

3bb0b117 10/02/2013 04:27 pm Christos Stavrakakis

cyclades: Add 'on_delete' to all ForeignKeys

Add 'on_delete' argument to all ForeignKeys. The value of this
argument depends on the type of each relation.

2c21381e 10/02/2013 04:05 pm Christos Stavrakakis

cyclades: Remove custom ForUpdateManager

Remove custom manager that implemented select_for_update(), since this
is already implemented in Django 1.4.

26515bc1 10/02/2013 04:05 pm Christos Stavrakakis

cyclades: Remove custom ProtectedDeletedManager

Remove custom ProtectedDeletedManager. Instead use the
ForeignKey.on_delete attribute that has been introduced in Django 1.4.

c3362463 10/01/2013 07:44 pm Christos Stavrakakis

cyclades: Fix bug in custom field

Rename get_db_prep_value to get_prep_value. In django 1.4 the second one
is just a wrapper for the first one.

c9976c84 10/01/2013 11:37 am Christos Stavrakakis

cyclades: Extend Backend model with disk_templates

Extend 'Backend' models with 'disk_template' attribute, that contains
the list of disk templates that are available in each backend.

54975d37 10/01/2013 11:31 am Christos Stavrakakis

cyclades: Add SeparatedValuesList field

Add custom field for storing a list of values in DB. The values
are stored as a TextField separated by a delimiter.

9dcfad23 09/20/2013 01:45 pm Christos Stavrakakis

cyclades: Handle errors during vm creation

Commit #f2080d1 mocked an OP_INSTANCE_REMOVE when enqueuing an
OP_INSTANCE_CREATE job to Ganeti failed. However, this may result in
releasing IPs that may get reserved in Ganeti, because we can never
really know if the job has reached Ganeti or not (e.g. timeout). For...

ed2064f8 09/18/2013 05:17 pm Christos Stavrakakis

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...

051e47f8 09/10/2013 03:29 pm Christos Stavrakakis

cyclades: Make index field of NIC optional

Change 'index' field of NIC model to be optional, because the index of
building NICs is unknown. Also, change all API responses to return only
the active NICs.

198d91c3 09/06/2013 12:22 pm Christos Stavrakakis

cyclades: Fix bug in snf-dispatcher logic

This commit reverts commits #07602322 and #30514662 which introduced a
bug in dispatcher's logic. These commit fixed the issue that, in a case
the Cyclades DB is unsynced with Ganeti, a resource that does not exist...

0c09b1c0 08/07/2013 11:08 am Christos Stavrakakis

cyclades: Import settings from django.conf

0989632e 07/25/2013 04:42 pm Christos Stavrakakis

cyclades: More verbose models representation

Make unicode method of VirtualMachine, Network and FloatingIP models more
verbose.

e8d31c74 07/24/2013 09:15 pm Christos Stavrakakis

cyclades: Remove wrong model attribute

410d2877 07/22/2013 05:58 pm Christos Stavrakakis

cyclades: Add migration file for IPv6 networks

0129231a 07/17/2013 02:57 pm Christos Stavrakakis

cyclades: Fix exception message

5aeb4e93 07/17/2013 02:57 pm Christos Stavrakakis

cyclades: Support IPv6 only networks

Make Cyclades support IPv6 only networks. Such networks will have
the 'subnet' attribute set to None, in the same way that IPv4 only
networks have the 'subnet6' attribute set to None.

Because currently Ganeti does not support IPv6 only networks, we create the...

890f3d4c 07/12/2013 01:22 pm Christos Stavrakakis

Merge branch 'hotfix-0.14.2' into develop

Conflicts:
Changelog
snf-astakos-app/astakos/im/messages.py
snf-astakos-app/astakos/im/views/target/__init__.py
snf-cyclades-app/synnefo/logic/backend.py
snf-cyclades-app/synnefo/logic/management/commands/reconcile-servers.py...

b2d0830b 07/10/2013 10:55 am Christos Stavrakakis

cyclades: pep8 fixes

46e8886e 07/08/2013 12:02 pm Christos Stavrakakis

cyclades: Add disk template to flavors fixture

259459b0 07/02/2013 04:01 pm Christos Stavrakakis

cyclades: Add migration file

Add migration file for floating IPs and VM task state.

0c50c760 07/02/2013 12:32 pm Christos Stavrakakis

cyclades: Check if a NIC is a floating IP.

Extend NetworkInterface model with a property showing if the IPv4
address of the NIC is a floating IP or not. Also, simplify some
relevant code.

9115d567 07/02/2013 12:31 pm Christos Stavrakakis

Distinquish between networks and Floating IP pools

Extend Network model with the 'floating_ip_pool' boolean field, to
indicate whether a Network can be a floating IP pool or not. Networks
that are floating IP pools must exist in all Backends, and so
'snf-manage backend-add' should try to add them....

ece5581b 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: Separate logic for networks from API

Remove code handling networks from network API views to logic.networks

bc343480 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: Make NIC representation more verbose

a3d99af0 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: Reserve a specific floating IP

Add extra optional 'address' attribute, in POST /os-floating-ips/
request, to allow a user to reserve a specific floating IP. This request
will fail if the user tries to allocate an IP address that is used by
anothers user VM (it will succeed if they address is already used by...

c2876228 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: Add FloatingIP model

Add Floating IP model to represent a floating IP that has been reserved
by a user. Each FloatingIP has an owner(UUID), an IPv4 address, the
network(pool) that has reserved from and the date is was reserved. Also,
it may be related to a VirtualMachine, if there is some VM that uses...

9ba6bb95 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: Extend /servers with floating IP actions

Extend '/servers/action' API endpoint, to support 'addFloatingIP'
and 'removeFloatingIP' actions.

1cfd5d4d 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: Remove custom init method from VM model

41a7fae7 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: Major refactor to api and logic apps

Major refactor to cyclades api and logic apps that removes most code
from the api views and moves it to logic app, so that the same logic
code can be used by different apps (e.g. EC2 API). Code is moved into...

1af851fd 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: Implement resize action API call

Implement resize API call, which is a POST at
/servers/<server_id>/action' with body: {"resize": {"flavorRef": <flavor_id>}}

The resize can only be performed if the disk size and disk template of
the new flavor are the same with the old one, and if the VM is in...

df36a125 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: Make flavor representation more verbose

c802789d 06/13/2013 06:40 pm Christos Stavrakakis

cyclades: Remove obsolete settings

Remove obsolete GANETI_DISK_TEMPLATES and DEFAULT_GANETI_DISK_TEMPLATE
settings.

d4325f42 06/11/2013 04:38 pm Christos Stavrakakis

Fix compatibility issues with factory_boy

Update models_factory to use factory.DjangoModelFactory instead of
factory.Factory.

6dafedf6 05/31/2013 05:12 pm Christos Stavrakakis

cyclades: Add 'drained' flag to Network

Extend Network model with the 'drained' attribute, to indicate whether a
network should be used in public IP allocation when creating servers.
This option is only useful for public networks.

4c9ac139 05/21/2013 02:09 pm Christos Stavrakakis

cyclades: Add --hypervisor option to backend cmds

Add '--hypervisor' option to 'backend-add' and 'backend-modify'
management commands.

Refs #3772

bd87213f 05/21/2013 02:07 pm Christos Stavrakakis

cyclades: Sypport backends with Xen hypervisor

Support Ganeti backends with Xen hypervisor:
  • Extend 'Backend' model with the 'hypervisor' attribute, which
    currently can be 'kvm' or 'xen'. Use 'kvm' as default value to
    easy database migration. Also add the corresponding schema migration....
e4ce2d35 05/15/2013 06:35 pm Christos Stavrakakis

cyclades: fix db migration

Migration 0066 should not run on a fresh installation.

3dbd9457 05/15/2013 05:05 pm Christos Stavrakakis

cyclades: Make cyclades work with pycrypto==2.6

In PyCrypto 2.6, it is mandatory to use an IV of 16 bytes when using AES
encryption. This commit updates 'aes_encrypt' module to use a random IV.
Also, a data migration is required to re-encrypt the old passwords, as...