1. 11 Feb, 2014 1 commit
    • Dionysis Grigoropoulos's avatar
      snf-cyclades: Various bug fixes in cyclades · 46272d40
      Dionysis Grigoropoulos authored
      * When creating a new subnet, check if the given network_id is an int
      * Remove duplicate code from api/networks
      * Check name length when updating a server
      * Check name length when updating a network
      * Validate NIC ID is an int
      46272d40
  2. 19 Dec, 2013 1 commit
  3. 18 Dec, 2013 1 commit
  4. 09 Dec, 2013 1 commit
  5. 02 Dec, 2013 1 commit
  6. 25 Nov, 2013 1 commit
  7. 20 Nov, 2013 2 commits
    • Ilias Tsitsimpis's avatar
      cyclades: Catch exception in verify_personality · b0dd513d
      Ilias Tsitsimpis authored
      The verify_personality function assumes that the contents of a
      personality is encoded in base64 and tries to decode them. But if the
      client didn't encode them a TypeError `Incorrect padding' will be
      raised. Catch this exception and raise a BadRequest.
      b0dd513d
    • Ilias Tsitsimpis's avatar
      cyclades: Catch exception in verify_personality · 1800feec
      Ilias Tsitsimpis authored
      The verify_personality function assumes that the contents of a
      personality is encoded in base64 and tries to decode them. But if the
      client didn't encode them a TypeError `Incorrect padding' will be
      raised. Catch this exception and raise a BadRequest.
      1800feec
  8. 06 Nov, 2013 3 commits
  9. 04 Nov, 2013 2 commits
    • Christos Stavrakakis's avatar
      cyclades: Refactor code · a8819ad5
      Christos Stavrakakis authored
      Move code relative with allocating ips and floating IPs to 'logic.ips'
      module.
      a8819ad5
    • Christos Stavrakakis's avatar
      cyclades: Forbid new ports no deleting network · 395f0023
      Christos Stavrakakis authored
      Do not allow creation of new ports and reservation of floating IPs on
      network that are being deleted. Currently the state of the network
      changes only when the network gets deleted from all backends. So we
      check if a network is being deleted by checking if the action of the
      network is 'DESTROY'.
      395f0023
  10. 02 Nov, 2013 1 commit
  11. 01 Nov, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Create ports without 'device_id' · 4b649f24
      Christos Stavrakakis authored
      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
      been merged into 'logic.servers' module.
      4b649f24
  12. 31 Oct, 2013 2 commits
    • Christos Stavrakakis's avatar
      cyclades: Fix bugs relative to pool allocation · 88676431
      Christos Stavrakakis authored
      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
      empty pool. However, if someone tried to allocate a specific value,
      'ValueNotAvailable' should be returned.
      88676431
    • Christos Stavrakakis's avatar
      cyclades: Get floating IP without specifying pools · 4a96ab00
      Christos Stavrakakis authored
      Extend GET /floatingips API method, to allow requests that do not
      specify the 'floating_network_id' attribute. In this case it will try
      to allocate a floating IP address from one of the available floating IP
      pools. If there is no available floating IP, it will return 409.
      4a96ab00
  13. 29 Oct, 2013 2 commits
  14. 24 Oct, 2013 3 commits
  15. 16 Oct, 2013 2 commits
  16. 14 Oct, 2013 3 commits
  17. 11 Oct, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Optimize DB queries of /servers API · 9ae370e6
      Christos Stavrakakis authored
      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
      they can perform further filtering or ordering on objects because this
      is considered a new DB query and so will not get the cached objects.
      
      Also, return empty 'fqdn' and 'port_forwarding' attributes if the
      server has no public IP address.
      9ae370e6
  18. 10 Oct, 2013 4 commits
  19. 09 Oct, 2013 5 commits
    • Christos Stavrakakis's avatar
      cyclades: Make API server tests pass · ea15eddf
      Christos Stavrakakis authored
      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.
      ea15eddf
    • Christos Stavrakakis's avatar
      cyclades: Replace FloatingIP with IPAddress · 13a5bff7
      Christos Stavrakakis authored
      This commit just replaces all references to FloatingIP objects with
      references to IPAddress object, in order to be able to just load the
      code. But the code is left unchanged, so all tests will fail.
      13a5bff7
    • Christos Stavrakakis's avatar
      cyclades: Change format of 'attachment' attribute · 0e604e91
      Christos Stavrakakis authored
      Change the format of the 'attachment' attribute. Until now, each
      attachment had an identifier of the form 'nic-$vm_id-$nic_id'. This
      commit changes the identifier to just '$nic_id', since from now on
      is unique for the lifetime of a NIC.
      0e604e91
    • Christos Stavrakakis's avatar
      cyclades: Use NIC UUID in firewall tags · ab906b2c
      Christos Stavrakakis authored
      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.
      ab906b2c
    • Christos Stavrakakis's avatar
      cyclades: Use Ganeti NIC UUIDs · 1a4633ef
      Christos Stavrakakis authored
      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
      because the UUID can not be known, until the NIC is created in the VM.
      
      Modify backend methods for connecting and removing a NIC from a VM, to
      not refer to NICs by index, but use the NICs backend_uuid. Also, set the
      name of the NIC to the backend_uuid, when creating a NIC.
      
      API relevant methods, will create a NIC object in BUILDING state,
      instead of creating the NIC when the message arrives from the backend.
      
      Modify NetworkInterface model:
      * remove 'dirty' attribute since it is no longer needed
      * make index null, since when the NIC is in building state, the index
        can not be known.
      * add property for getting the UUID of the NIC in the Ganeti backend.
      
      Fix relevant tests.
      1a4633ef
  20. 04 Oct, 2013 1 commit
  21. 23 Aug, 2013 1 commit
  22. 06 Aug, 2013 1 commit