1. 23 Aug, 2013 1 commit
  2. 07 Aug, 2013 3 commits
    • Christos Stavrakakis's avatar
      cyclades: extend VM info with 'port_forwarding' · 05d32a11
      Christos Stavrakakis authored
      Extend servers info API response with 'SNF:port_forwarding' attribute,
      describing port fowarding rules (DNAT) that are applied to vms. The
      description of such rules is done via the new CYCLADES_PORT_FORWARDING
      setting. This setting can be either a dictionary mapping to ports to
      tuples of (host, port), or a callable object that must return such a
      tuple.   The caller will pass to the callable the following positional
      arguments, in the following order:
      * server_id: The ID of the VM in the DB
      * ip_address: The IPv4 address of the public VM NIC
      * fqdn: The FQDN of the VM
      * user: The UUID of the owner of the VM
    • Christos Stavrakakis's avatar
    • Christos Stavrakakis's avatar
      cyclades: add tests for 'fqdn' · 4fbcf96e
      Christos Stavrakakis authored
  3. 11 Jul, 2013 1 commit
  4. 02 Jul, 2013 8 commits
    • Christos Stavrakakis's avatar
      cyclades: Rename "public" to "SNF:ANY_PUBLIC" · 0a84aa41
      Christos Stavrakakis authored
      Rename reserved work for automatically choosing a public network from
      "public" to "SNF:ANY_PUBLIC". Also add the setting description to conf
    • Christos Stavrakakis's avatar
      cyclades: Export OS-EXT-IPS:type for floating IPs. · 5d599f0c
      Christos Stavrakakis authored
      Cyclades API should return "floating" for the OS-EXT-IPS:type attribute.
    • Christos Stavrakakis's avatar
      Fixes to tests · 48a0cb71
      Christos Stavrakakis authored
    • Christos Stavrakakis's avatar
      cyclades: Various fixes regarding floating IPs · 362e8c15
      Christos Stavrakakis authored
      Fix some issues regarding floating ips introduced by rebasing branch.
    • Christos Stavrakakis's avatar
      cyclades: Choose floating-ips when creating server · 4734e3cf
      Christos Stavrakakis authored
      Extend POST /servers API call, to take an optional attribute
      'floating_ips', which is a list of floating IP addresses. The server
      will have one NIC for each of this addresses after the
      'DEFAULT_INSTANCE_NETWORKS' and before any private networks that the
      user has chosen. All of the addresses must first be reserved through the
      /os-floating-ips API.
    • Christos Stavrakakis's avatar
      cyclades: Add network policy at server create · 084129f6
      Christos Stavrakakis authored
      Add 'DEFAULT_INSTANCE_NETWORKS' setting that can be used by the
      administrator to define the list of networks that each server that is
      created must be connected to. Each created VM will have a NIC connected
      to each of these networks. This settings can include a list of network
      UUIDs or the special "public" ID, which corresponds to any public
      network that has a free IP address.
      Also, extend POST /servers API call, with an optional 'networks'
      attribute, that the user can use to define a list of private networks
      that wants it's VM to be connected.
    • Christos Stavrakakis's avatar
      cyclades: Major refactor to api and logic apps · d15f509c
      Christos Stavrakakis authored
      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
      This commit also introduces the VirtualMachine.task attribute
      which contains the last issued action to a server. This attribute is set
      when the corresponding job is sent to Ganeti, and is cleared upon
      completion of the corresponding job (task_job_id attribute). Until the
      task is completed, no other action is allowed on the VM. The only
      exception is 'DESTROY' action which is always allowed. Actions on VMs
      with uncompleted tasks results in a bad request fault.  Also, some
      actions are not allowed if the operating state of the VM is not correct.
      For example, it is not allowed to start or resize a running VM.  The
      running task is also exposed to the API (SNF:task_state), and the
      available states are:
      * BUILDING
      * STARTING
      * STOPPING
      * RESIZING
      Also, this commit introduces two quotable resources, the 'active_ram'
      and 'active_cpu' representing the ram and cpu of running instances,
      specifically the instances in 'STARTED', 'BUILD' and 'ERROR' operstate.
      In order to count quotas for these resources, commissioning is needed
      when starting, stopping and rebooting instances. Also, the destroy
      commissioning is different if the vm is running or is stopped.
      Finally this commit changes the way commissioning is used in
      snf-dispatcher. Until now dispatcher only accepted or rejected
      commissions issued by the API. This commit introduces extra logic in
      dispatcher, to issue commissions for every quotable change, if a
      commission for this change has not already been issued by the API. This
      enables the administrator to do whatever action in the Ganeti backend
      without resulting in unsynced quotas. If a new commission is required,
      the previous commission for the VM by the API (if existing) will be
      rejected, since this commission will reflect a different change in the
    • Christos Stavrakakis's avatar
      cyclades: Implement resize action API call · 0e0f08cb
      Christos Stavrakakis authored
      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
      STOPPED status.
      Also add 'RESIZE' operstate to VirtualMachine
      Refs #3870
  5. 17 Jun, 2013 1 commit
  6. 14 Jun, 2013 3 commits
  7. 12 Jun, 2013 1 commit
  8. 11 Jun, 2013 1 commit
  9. 31 May, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Add 'drained' flag to Network · d7f41fac
      Christos Stavrakakis authored
      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.
  10. 28 May, 2013 2 commits
  11. 16 May, 2013 1 commit
  12. 30 Apr, 2013 1 commit
  13. 08 Apr, 2013 1 commit
  14. 21 Mar, 2013 1 commit
    • Christos Stavrakakis's avatar
      Create public NIC when creating VM · dc1554e4
      Christos Stavrakakis authored
      Until now, a server's public NetworkInterface was not created in the DB
      until the arrival of the message from Ganeti hooks. However, the IPv4
      address of the NIC is reserved before sending the OP_INSTANCE_CREATE
      job to Ganeti.
      This drawback of this approach is that if the Ganeti hooks never run
      (building ERROR), Cyclades will never associate the IPv4 address with
      a machine and therefore this address will never be released.
      This commit fixes this issue by creating the VM's public NIC in DB when
      creating the server. Also the NetworkInterface model is extended with
      a 'state' field to indicate if the NIC is active or still building.
      Finally, the corresponding API calls are modified in order to return
      only 'ACTIVE' NICs.
  15. 15 Feb, 2013 1 commit
  16. 07 Jan, 2013 1 commit