1. 25 Aug, 2016 1 commit
  2. 07 Nov, 2015 3 commits
    • Christos Stavrakakis's avatar
      cyclades: Extend ports accesible to a user · cee70567
      Christos Stavrakakis authored
      Extend the ports that are accessible to the user with the ports that are
      having a floating IP that is accessible to the user. Also, fix use of
      'for_update' which cannot be used in an outer join with null values.
      Signed-off-by: default avatarChristos Stavrakakis <stavr.chris@gmail.com>
      cee70567
    • Christos Stavrakakis's avatar
      cyclades: Add object managers for common models · a89c7a5a
      Christos Stavrakakis authored
      Create a custom Django ORM object manager for VirtualMachine, Network,
      Subnet, NetworkInterface, IPAddress and Volume object that can be used
      in order to retrieve the objects that can be accessed by the user.
      
      The resources that are accessible by the user include those that:
      * are owned by the user
      * are shared to a project the user is a member
      * are public
      
      The Port (NetworkInterface) resource needs special handling as it
      connects two resources (VirtualMachine and Network) that may be owned by
      different users in different projects. To overcome this issue, we make a
      port accessible to a user, if is connected to a VirtualMachine or
      Network that can be accessed by the user.
      Signed-off-by: default avatarChristos Stavrakakis <stavr.chris@gmail.com>
      a89c7a5a
    • Christos Stavrakakis's avatar
      cyclades: Add 'shared_to_project' field to models · 4d069585
      Christos Stavrakakis authored
      Extend DB models for VirtualMachine, Volume, Network and IPAddress with
      the 'shared_to_project' boolean field. If this field is set then all
      members of the project that the resource belongs to have full access to
      it.
      Signed-off-by: default avatarChristos Stavrakakis <stavr.chris@gmail.com>
      4d069585
  3. 31 Oct, 2015 1 commit
  4. 27 Oct, 2015 3 commits
    • Alex Pyrgiotis's avatar
      cyclades: Add legacy_backend_volume_uuid field · eb1d2dc1
      Alex Pyrgiotis authored
      The rationale for this change is explained in the design document of
      detachable volumes, in the "Backend names of existing volumes" section.
      
      In a gist, volumes that were created prior to Archipelago version
      0.4.1-2 used the Ganeti parameter VOL_NAME as their name, instead of
      VOL_CNAME. Since we need a common name for a volume across Ganeti
      clusters and VOL_NAME changes after a detachment, we need a way to make
      VOL_CNAME evaluate to the initial VOL_NAME of the volume. To do so, we
      need an extra field ("legacy_backend_volume_uuid") to store that info.
      
      Moreover, we also need a schema migration to create a new column in the
      Cyclades DB, as well as a migration script that will get the necessary
      info from Ganeti and store them in this field.
      eb1d2dc1
    • Alex Pyrgiotis's avatar
      cyclades: Create helper servers using snf-manage · 011ac48f
      Alex Pyrgiotis authored
      Use the `server-create` snf-manage command to create a helper server.
      The process of creating a helper server is the same as the process of
      creating a normal server, with the exception that the administrator must
      specify the `--helper` switch to `server-create`.
      011ac48f
    • Alex Pyrgiotis's avatar
      cyclades: Add `origin_size` in Volume fields · 3a6b7f5e
      Alex Pyrgiotis authored
      Add the `origin_size` parameter as a field of the Volume model. This
      parameter is passed during volume creation to Ganeti and is used only
      for that operation. Also, create a schema migration for this field.
      
      There is no need for data migration for this field since if a volume has
      already been created, `origin_size` is no longer necessary and we can
      carry on using the `size` parameter.
      3a6b7f5e
  5. 02 Jul, 2014 1 commit
    • Dionysis Grigoropoulos's avatar
      cyclades: Bug fixes in volume related commands · 4e0e6580
      Dionysis Grigoropoulos authored
      * Add a check to both name length and disk template length in
      snf-manage volume-type-create.
      * Add a check for the metadata length of snapshots.
      * Add a generic try/except clause to handle Pithos responses.
      * Add --user/--public options in snapshot-show/image-show.
      * Add a boolean "snapshot" field in image-list.
      * Remove unused user agrument from backend.get_snapshot().
      * Remove --wait option from snapshot-create.
      * Various typo fixes.
      4e0e6580
  6. 24 Jun, 2014 2 commits
    • Christos Stavrakakis's avatar
      cyclades: Add Image DB model · d2b9185e
      Christos Stavrakakis authored
      Create a new model, named 'Image', to store basic information about
      images that have been used to create servers or volumes. The images are
      stored in Cyclades (in addition to Pithos where they exist) in order to
      preserve information about images that may be updated or deleted from
      Pithos.
      d2b9185e
    • Christos Stavrakakis's avatar
      cyclades: Store image version additional to UUID · 547b4672
      Christos Stavrakakis authored
      Store the image's version together with the image's UUID, in order to
      track the exact image (Pithos file) that has been used for a server or
      volume. This is required because Pithos files retain their UUID when the
      file's data or metadata are updated. The (uuid, version) tuple is
      required in order to fully determine the file that has been used.
      547b4672
  7. 29 May, 2014 1 commit
  8. 26 May, 2014 1 commit
  9. 21 May, 2014 3 commits
  10. 14 May, 2014 2 commits
    • Christos Stavrakakis's avatar
      cyclades: Replace disk template with volume types · 5a2a706e
      Christos Stavrakakis authored
      Replace usage of the stale 'disk_template' attribute of flavors and
      volumes with the newly introduced volume type.
      5a2a706e
    • Christos Stavrakakis's avatar
      cyclades: Add VolumeType DB model · 1f79d0e3
      Christos Stavrakakis authored
      Create new 'VolumeType' database model to represent the available types
      for Cyclades Volumes. Currently, this model contains only the volume's
      disk template and the human-readable name, but can be extended
      to include extra specs, e.g. QoS specs.
      
      The 'disk_template' column from the 'Flavor' and 'Volume' models is
      replaced with a foreign key to the 'VolumeType' model.
      1f79d0e3
  11. 09 May, 2014 1 commit
  12. 14 Apr, 2014 1 commit
    • Vangelis Koukis's avatar
      Switch license to GPLv3 · 02071b96
      Vangelis Koukis authored
      According to the decision of the GRNET Board of Directors,
      switch license to GPLv3.
      
      This commit will be propagated to the release
      and master branches based on git flow, and the next
      release will be licensed as GPLv3.
      02071b96
  13. 31 Mar, 2014 7 commits
    • Christos Stavrakakis's avatar
      cyclades: Make all DB models return unicode repr · b6d43c2c
      Christos Stavrakakis authored
      Add __str__ method to all DB models, that simply calls __unicode__
      method. Because __str__ will return a unicode string it will be ignored,
      and the result from __unicode__ will be used. Also, make all __unicode__
      methods to return unicode strings.
      b6d43c2c
    • Christos Stavrakakis's avatar
      cyclades: Validate length of fields · fa999091
      Christos Stavrakakis authored
      fa999091
    • Christos Stavrakakis's avatar
      cyclades: Count quotas for volumes · 16578880
      Christos Stavrakakis authored
      Update Cyclades quotas to count the size of the Volumes in the
      'cyclades.disk' resources:
      
      * Update server creation to count disk quota, not based on the server
        flavor, but on the newly created volumes (those volume which are in
        'CREATING' status)
      * Update volume attach/detach server commands to pass a list of quotable
        volume changes
      * Update snf-dispatcher to check if an unexpected Ganeti job changes the
        disks of an instance. Only disks from which the Synnefo is aware (and
        so the exist in DB as Volumes) are taken into account.
      * Update quota reconciliation mechanism to count 'cyclades.disk' based
        on user volumes.
      16578880
    • Christos Stavrakakis's avatar
      11ed201d
    • Christos Stavrakakis's avatar
      cyclades: Add 'disk_template' to Volumes · 57469aaa
      Christos Stavrakakis authored
      Also check GANETI_CLONE_PROVIDERS.
      57469aaa
    • Christos Stavrakakis's avatar
      cyclades: Various fixes relative for volumes · 6487b4f5
      Christos Stavrakakis authored
      * Do not store source_{volume_id, image_id, snapshot_id} as seperate
        fields. Instead store them in the 'source' field, with a special prefix
        to indicate the source type.
      * Add 'origin' field to Volume model to contain the origin that will be
        passed to Ganeti disk
      * Check that 'source' option is used only for ext_* volumes
      * Check that if a volume is used as source, the volume is in 'AVAILABLE'
        state
      * Implement deleting a volume by detaching it from the corresponding
        server. Also, forbid detaching the root volume(index=0) of a server
      * Rename 'hotplug' to 'hotplug_if_possible' in Ganeti methods.
      * Rename 'name' and 'description' API attributes to 'display_name' and
        'display_description'
      6487b4f5
    • Christos Stavrakakis's avatar
      cyclades: Create DB models for 'volume' app · 22c79cdb
      Christos Stavrakakis authored
      Create new database models for 'volume' app:
      * Volume
      * Snapshot
      * VolumeMetadata
      * SnapshotMetadata
      
      Also add 'VolumeFactory' and 'SnapshotFactory' model factories.
      22c79cdb
  14. 28 Feb, 2014 1 commit
  15. 27 Feb, 2014 1 commit
  16. 24 Feb, 2014 2 commits
    • Christos Stavrakakis's avatar
      cyclades: Add 'public' attribute to ports · 6783921c
      Christos Stavrakakis authored
      Extend ports (NetworkInterface model) with 'public' attribute, to
      indicate that the port is connected to a public network without getting
      the network from the DB. Add corresponding DB migration and update the
      DB models factory.
      
      Refs: #5109
      6783921c
    • Christos Stavrakakis's avatar
      cyclades: Add list of subnet IDs to network model · 2059f27c
      Christos Stavrakakis authored
      Extend Network model with 'subnet_ids' attribute. This attribute is a
      list with the IDs of the subnet that belong to this network and is
      stored in DB as a comma seperated list of integers.
      
      This information is already contained in the Subnet model. However, we
      also store it in the DB model to make GET /networks API call faster by
      avoiding use of 'prefetch_related'.
      
      This commit also extends 'create_subnet' function to update the
      network's 'subnet_ids' field.
      
      Refs #5109
      2059f27c
  17. 13 Feb, 2014 1 commit
  18. 22 Jan, 2014 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Extend flavors with 'allow_create' field · f55499e0
      Christos Stavrakakis authored
      * Add 'allow_create' field to Flavor DB model and the corresponding
        migration.
      * Extend API for flavors to return the 'SNF:allow_create' attribute
      * Update POST /servers API call to check that the flavor that is
        specified in the request has the 'allow_create' attribute set to True.
        Otherwise, Forbidden(403) is returned. Also, add a relevant unittest.
      * Extend 'flavor-modify' and 'flavor-list' management commands to handle
        the 'allow_create' flag
      * Update administrator guide and Changelog
      f55499e0
  19. 19 Dec, 2013 2 commits
  20. 17 Dec, 2013 3 commits
  21. 09 Dec, 2013 1 commit
  22. 04 Dec, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Remove DEFAULT_ROUTING_TABLE setting · 125ba5f1
      Christos Stavrakakis authored
      Do not have a default value from 'link' attribute of IP_LESS_ROUTED
      networks. Instead if the admin does not specify a value in
      network-create command, uniquely name the networks by with the
      BACKEND_PREFIX_ID and network id, e.g. snf-link-42.
      125ba5f1