1. 02 Jul, 2013 23 commits
    • Christos Stavrakakis's avatar
      cyclades: Extend /servers with floating IP actions · d4ea2f75
      Christos Stavrakakis authored
      Extend '/servers/action' API endpoint, to support 'addFloatingIP'
      and 'removeFloatingIP' actions.
      d4ea2f75
    • Christos Stavrakakis's avatar
      cyclades: Implement /floating-ip-pools API · bc028ff2
      Christos Stavrakakis authored
      Add Compute OS API extension /floating-ip-pools. This API implements
      only the GET /floating-ip-pools, which returns the list of available
      Floating IP pools. Currently, these pools are the public networks.
      bc028ff2
    • Christos Stavrakakis's avatar
      d14b3636
    • Christos Stavrakakis's avatar
      cyclades: Implement /os-floating-ips API · 94abc257
      Christos Stavrakakis authored
      Extend Cyclades API with /os-floating-ips endpoint. The API implements
      the following calls:
      
      * GET /os-floating-ips: List reserved floating IPs
      * POST /os-floating-ips: Allocate a floating IP
      * GET /os-floating-ips/ip_id: Show information about a floating IP
      * DELETE /os-floating-ips/ip_id: Release a floating IP
      94abc257
    • Christos Stavrakakis's avatar
      cyclades: Make Floating IPs a quotable resource · 6d560c8c
      Christos Stavrakakis authored
      Add 'cyclades.floating_ip' to quotable resources. Update helper
      functions and tests to include this resource.
      6d560c8c
    • Christos Stavrakakis's avatar
      cyclades: Add FloatingIP model · 02da2000
      Christos Stavrakakis authored
      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
      this IP.
      
      Also, create the corresponding model factory for tests.
      02da2000
    • Christos Stavrakakis's avatar
      cyclades: Handle 'EmptyPool' in util method · 7cf9699b
      Christos Stavrakakis authored
      Refactor cyclades code to handle 'EmptyPool' exception in
      'get_network_free_address' function.
      7cf9699b
    • 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
      logic.servers.
      
      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
      * REBOOTING
      * DESTROYING
      * RESIZING
      * CONNECTING
      * DISCONNECTING
      
      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
      VM.
      d15f509c
    • Christos Stavrakakis's avatar
      83125514
    • Christos Stavrakakis's avatar
      cyclades: Mark serial as resolved if auto_accept · 6a3be3c1
      Christos Stavrakakis authored
      Modify 'issue_commission' function to mark the QuotaHolderSerial object
      as resolved, if auto_accept option is used.
      6a3be3c1
    • Christos Stavrakakis's avatar
      7838604e
    • Christos Stavrakakis's avatar
      cyclades: refactor reconciliation · 05e0992f
      Christos Stavrakakis authored
      Refactor reconciliation code to use namedtuples and improve performance
      for retrieving info from database.
      05e0992f
    • Christos Stavrakakis's avatar
      cyclades: Handle Ganeti msgs for resized VMs · 88a9b09c
      Christos Stavrakakis authored
      Handle 'OP_INSTANCE_SET_PARAMS' notifications from Ganeti that have
      'beparams' attribute, which corresponds to resized VMs. In such
      case, the corresponding flavor is found an the VM in DB is updated to
      have this flavor.
      
      Refs #3870
      88a9b09c
    • Christos Stavrakakis's avatar
      gtools: Make eventd send beparams and result · 00311ecd
      Christos Stavrakakis authored
      Update 'snf-ganeti-eventd' daemon to send the requested beparams in
      case of 'OP_INSTANCE_SET_PARAMS' opcodes. Also, if the opcode is
      in success state, send the 'result' attribute of Ganeti jobs.
      
      Refs #3870
      00311ecd
    • 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
      0e0f08cb
    • Christos Stavrakakis's avatar
      cyclades: Add backend function for resizing vm · 79d0631c
      Christos Stavrakakis authored
      Add 'resize_instance' backend function for resizing a vm. This command
      issues an OP_INSTANCE_MODIFY job with the specified beparams, which
      currently are vcpus, minmem and maxmem.
      
      Refs #3870
      79d0631c
    • Christos Stavrakakis's avatar
      snf_django: Mock quotaholder to BaseAPITest · 45bd654f
      Christos Stavrakakis authored
      Mock quotaholder in all of BaseAPITest calls.
      45bd654f
    • Christos Stavrakakis's avatar
      snf_django: Fix bug in BaseAPITest · af311de8
      Christos Stavrakakis authored
      Include 202 in success responses.
      af311de8
    • Christos Stavrakakis's avatar
      afe5e702
    • Christos Stavrakakis's avatar
      Update .gitignore file · 2f9ccdce
      Christos Stavrakakis authored
      2f9ccdce
    • Christos Stavrakakis's avatar
      2004ace3
    • Sofia Papagiannaki's avatar
      astakos: Change default region value in POST /tokens · 69b8685c
      Sofia Papagiannaki authored
      Refs: 4086
      69b8685c
    • Olga Brani's avatar
      astakos: Different image on login page · 1bb9ac70
      Olga Brani authored
      A different image is shown in the login page when the main
      login method is 'local' and its form is already expanded.
      1bb9ac70
  2. 01 Jul, 2013 3 commits
  3. 28 Jun, 2013 14 commits