Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

CIRCLE / cloud

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 94
  • Merge Requests 10
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Open
Merge request !379 opened Jul 15, 2016 by Czémán Arnold@cemiarni 
  • Report abuse
Report abuse

Fix DataStore queries with get_default_datastore()

×

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b default_datastore origin/default_datastore

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git checkout master
git merge --no-ff default_datastore

Step 4. Push the result of the merge to GitLab

git push origin master

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 2
  • Commits 4
  • Pipelines 3
  • Changes 7
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Dudás Ádám
    @siliconbrain started a discussion on an old version of the diff Aug 02, 2016
    circle/storage/models.py
    110 111 disks = Disk.objects.filter(destroyed__isnull=True, is_ready=True)
    111 112 return disks.exclude(filename__in=files)
    112 113  
    114 @classmethod
    115 def get_default_datastore(cls):
    116 try:
    117 datastore_name = settings.DEFAULT_DATASTORE
    118 if datastore_name:
    119 return cls.objects.get(name=datastore_name)
    120 except cls.DoesNotExist:
    121 pass
    122 return cls.objects.all()[0] # TODO
    • Dudás Ádám @siliconbrain commented Aug 02, 2016
      Owner

      It was a feature that it raises an exception if there are more than 1 databases (or 0). This makes sense with ceph but not in the current version.

      It was a feature that it raises an exception if there are more than 1 databases (or 0). This makes sense with ceph but not in the current version.
    Please register or sign in to reply
  • Czémán Arnold @cemiarni

    Added 1 commit:

    • f3ff40ed - storage: small rework on get_default_datastore()
    Aug 02, 2016

    Added 1 commit:

    • f3ff40ed - storage: small rework on get_default_datastore()
    Added 1 commit: * f3ff40ed - storage: small rework on get_default_datastore()
    Toggle commit list
  • Czémán Arnold @cemiarni

    Added 1 commit:

    • d82f4c8f - dashboard: rename datastore in fixture
    Aug 02, 2016

    Added 1 commit:

    • d82f4c8f - dashboard: rename datastore in fixture
    Added 1 commit: * d82f4c8f - dashboard: rename datastore in fixture
    Toggle commit list
  • Kálmán Viktor
    @kviktor started a discussion on an old version of the diff Aug 31, 2016
    circle/storage/models.py
    110 111 disks = Disk.objects.filter(destroyed__isnull=True, is_ready=True)
    111 112 return disks.exclude(filename__in=files)
    112 113
    114 @classmethod
    115 def get_default_datastore(cls):
    116 datastore_name = settings.DEFAULT_DATASTORE
    117 if datastore_name:
    • Kálmán Viktor @kviktor commented Aug 31, 2016
      Owner

      dataestore_name is present because of the default value, no need for the if

      dataestore_name is present because of the default value, no need for the if
    Please register or sign in to reply
  • Czémán Arnold @cemiarni

    Added 1 commit:

    • 092fffcf - storage: remove unecessary 'if' from get_default_datastore method
    Sep 12, 2016

    Added 1 commit:

    • 092fffcf - storage: remove unecessary 'if' from get_default_datastore method
    Added 1 commit: * 092fffcf - storage: remove unecessary 'if' from get_default_datastore method
    Toggle commit list
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Assignee
No assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View labels
3
3 participants
Reference: circle/cloud!379