1. 30 Mar, 2020 1 commit
  2. 27 Mar, 2020 1 commit
    • Andreas Jaeger's avatar
      Update hacking for Python3 · 009fd6c7
      Andreas Jaeger authored
      The repo is Python 3 now, so update hacking to version 2.0 which
      supports Python 3.
      
      Blacklist: W504 line break after binary operator
      
      Change-Id: I7ca780a2cff32031c562482b804888e5d49712c1
      009fd6c7
  3. 17 Mar, 2020 1 commit
  4. 13 Mar, 2020 1 commit
  5. 11 Mar, 2020 1 commit
  6. 03 Mar, 2020 2 commits
  7. 02 Mar, 2020 1 commit
  8. 21 Feb, 2020 1 commit
  9. 11 Feb, 2020 1 commit
  10. 06 Feb, 2020 1 commit
  11. 23 Dec, 2019 1 commit
    • caoyuan's avatar
      Trivial cleanup for tox · 09eadf95
      caoyuan authored
      move 'basepython' to the top-level 'testenv'
      
      Change-Id: I197d6486a3b126f616ffe2f7e3e669d922a1e337
      09eadf95
  12. 05 Dec, 2019 1 commit
  13. 04 Dec, 2019 2 commits
  14. 02 Dec, 2019 1 commit
    • Lance Bragstad's avatar
      Add devstack job to .zuul.conf · 2632c8e1
      Lance Bragstad authored
      We know we want to have some level of functional testing to verify
      enforcement models. This commit uses one approach to add a base
      devstack job to oslo.limit's .zuul.conf so that we have a minimal-ish
      installation to configure with limits and write actual integration and
      functional tests against.
      
      Change-Id: I50c41805b8e196fdaf20c95e9aa687b98c369a57
      2632c8e1
  15. 25 Nov, 2019 2 commits
    • John Garbutt's avatar
      Add flat enforcer · 40ef2764
      John Garbutt authored
      
      
      Taking the Nova work as an example, looking to add a basic flat enforcer
      that meets Nova's needs.
      
      The user of the Enforce provides a callback. You can see an example of
      the callback in the unit tests:
      
        def fake_callback(project_id, resources):
          return {
            "a": 5,
            "b": 10,
            "c": 0,
          }
      
      In the code where you want to check if you increase the amount of
      resources that are being consumed, you can make this call:
      
         enforcer = limit.Enforcer(fake_callback)
         enforcer.enforce(project_id, {"a": 5})
      
      The enforce function looks up the limits that apply for the given
      project_id, uses the callback to count the current usage. The proposed
      usage is then calculated be adding the delta and the current usage
      together. This is compared to any limits that apply.
      
      If you later want to check if you have races that mean you are
      over your limit, you can do this call:
      
         enforcer.enforce(project_id, {'a': 0})
      
      Summary of key design points:
      
      * single set of logic to enforce limits shared between all projects
        that adopt unified limits
      
      * interface should work for both flat and strict-two-level enforcement
      
      * it is assumed that oslo.limit will control which type of enforcement
        is being applied
      
      * callback lists all resources that need counting
        for the given project_id, in Nova this helps limit
        the number of API calls made to placement
      
      * allows to check if proposed additional usage means you are over
        your limit, and also double check if the current usages means
        you are over quota
      
      * if the code is checking a resource where you do not have a
        registered limit, we default to a limit of zero, i.e. no
        resources can be created unless you set that registered limit
        There will be an appropriate warning logged to help the operator
        understand what needs to be setup in keystone.
      
      This builds on various previous prototypes from:
      Co-Authored-By: default avatarLance <Bragstad&lt;lbragstad@gmail.com>
      Co-Authored-By: default avatarwangxiyuan <wangxiyuan@huawei.com>
      
      Change-Id: I294a922ea80af673291c991f07a4a203f25c289d
      40ef2764
    • John Garbutt's avatar
      Fetch unified limits from keystone · a044cd9d
      John Garbutt authored
      
      
      For a given resource find out the current limits for the project.
      If there are no per project limits look up the registered limits
      that act as a default for when there are no project limits.
      
      Future patches will look at comparing these limits with the current and
      proposed resource usage to enforce the limits.
      
      Change-Id: Ia5ced4a46833b194f397ac936b99b0c9573b50d1
      Co-Authored-By: default avatarwangxiyuan <wangxiyuan1007@gmail.com>
      Co-Authored-By: default avatarLance Bragstad <lbragstad@gmail.com>
      a044cd9d
  16. 22 Nov, 2019 2 commits
  17. 24 Oct, 2019 1 commit
    • caoyuan's avatar
      tox: Keeping going with docs · 91ca7b0e
      caoyuan authored
      Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
      suggests, keeps the build running when it encounters non-fatal errors.
      This is exceptionally useful in avoiding a continuous edit-build loop
      when undertaking large doc reworks where multiple errors may be
      introduced.
      
      [1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045
      
      Change-Id: Ib1749e690c22663955985f0c3b718ed6223be223
      91ca7b0e
  18. 20 Sep, 2019 1 commit
    • OpenStack Release Bot's avatar
      Update master for stable/train · d426c5d0
      OpenStack Release Bot authored
      Add file to the reno documentation build to show release notes for
      stable/train.
      
      Use pbr instruction to increment the minor version number
      automatically so that master versions are higher than the versions on
      stable/train.
      
      Change-Id: I07dc249c5fdd264c40407b4d1e9fd3b0ea40f43c
      Sem-Ver: feature
      d426c5d0
  19. 05 Jul, 2019 1 commit
  20. 01 Jul, 2019 1 commit
    • Lance Bragstad's avatar
      Rename filter_resource resource_filters · 90acc274
      Lance Bragstad authored
      filter_resources doesn't make as much sense as resource_filters.
      filter_resources almost sounds like a boolean, when the argument is
      designed to contain a list of strings that represent resources to
      filter.
      
      Change-Id: Idc787052ac41744075d4a4860d06a3529fd271bb
      90acc274
  21. 20 Jun, 2019 1 commit
    • Lance Bragstad's avatar
      Add skeleton enforce() method to Enforcer · 996edbae
      Lance Bragstad authored
      The `enforce()` method is going to be the main entry point into
      oslo.limit for services enforcing usage against unified limits.
      
      Future patches will add methods for collecting information from
      keystone, resolving callback functions for project resource usage, and
      implement different enforcement models (flat, strict-two-level).
      
      Change-Id: I3cca109213e6d3fad91160ebb632d15499690093
      996edbae
  22. 19 Jun, 2019 3 commits
    • Lance Bragstad's avatar
      Remove __enter__ and __exit__ methods from Enforcer · 5db5a593
      Lance Bragstad authored
      Originally, we wanted oslo.limit's Enforcer object to be a context
      manager to make it easier to abstract logic to protect against
      resource race conditions. Since verification logic isn't going to be
      implemented right away, we can just focus on a single method for
      enforcement instead, making it easier to adopt.
      
      Subsequent patches are going to introduce a new enforcement interface
      for oslo.limit.
      
      Change-Id: I3a1e58cb18a498bca67f36c76d8e8c8c4fb80083
      5db5a593
    • Lance Bragstad's avatar
      Remove verification functionality · 8bf64bb2
      Lance Bragstad authored
      We want the initial implementation of oslo.limit to be as simple as
      possible. Originally, we thought we were going to implement resource
      verification, but that's something we can do later.
      
      Resource verification is meant to protect against race conditions when
      two clients claim the same amount of resources and the project is over
      limit. Unfortunately, having services implement resource verification
      requires them to use either a context manager or make multiple calls
      to enforce limits and sprinkling those calls around existing business
      logic. Since we don't know which approach we want to use to implement
      this, let's just focus on enforcing limits and come back to resource
      verification when we get more feedback from developers incorporating
      this into their services.
      
      Change-Id: I50f52189862bc3d109654e158cba381b156e70b6
      8bf64bb2
    • Lance Bragstad's avatar
      Remove ProjectClaim object from oslo.limit · af184185
      Lance Bragstad authored
      The concept of having project claims and tacking them on to an
      Enforcer object is too heavy-handed for what we need right now.
      Instead, we can just use a dictionary with resource names as the key
      and their respective usage/request limits as values.
      
      Future patches will remove the context manager functionality from
      oslo.limit, too. We can revisit the concept of a context manager to
      implement additional functionality for verification and race
      conditions when we have a for sure need for it.
      
      The goal of this patch is to make the interface as simple as possible
      so that it is easier for projects to adopt it.
      
      Note: we're able to make these changes because we haven't released
      oslo.limit, yet. We can make breaking changes up to version 1.0, so we
      can easily come back to this approach up to that point.
      
      Change-Id: I3f04ffc6d27208500b8e6409c3c30e6cb3147169
      af184185
  23. 03 Jun, 2019 1 commit
    • gujin's avatar
      Sync Sphinx requirement · 767d2845
      gujin authored
      Sync sphinx dependency with global requirements. It caps python 2 since
      sphinx 2.0 no longer supports Python 2.7.
      
      Change-Id: I676fdc12fe0bb1278754d6f21c6a113b4182186f
      Closes-Bug: #1831406
      767d2845
  24. 23 Apr, 2019 1 commit
  25. 19 Apr, 2019 1 commit
  26. 09 Apr, 2019 1 commit
  27. 05 Mar, 2019 1 commit
  28. 04 Mar, 2019 1 commit
  29. 25 Feb, 2019 2 commits
  30. 22 Feb, 2019 1 commit
    • Corey Bryant's avatar
      Add python3.7 job on Stein+ · 193f8123
      Corey Bryant authored
      This is a mechanically generated patch to add a unit test job running
      under Python 3.7.
      
      python3.5 was the only supported python3 version on Xenial. Now that
      we have Bionic nodes supporting python3.6 and python3.7, let's add
      testing with python3.7 in addition to python3.6 in Stein and
      beyond.
      
      See ML discussion here [1] for context.
      
      [1] http://lists.openstack.org/pipermail/openstack-dev/2018-October/135626.html
      
      Change-Id: Id0d0a55f4ceaa05869cb77abf13ee2fea7bee713
      Story: #2004073
      Task: #27440
      193f8123
  31. 19 Feb, 2019 1 commit
  32. 13 Feb, 2019 1 commit
    • ZhijunWei's avatar
      Update hacking version · 1343391a
      ZhijunWei authored
      Use latest release 1.1.0 and compatible changes w.r.t pep8
      
      Change-Id: I7a3627314d93342604c561dc7973d394a21c4e3c
      1343391a
  33. 09 Jan, 2019 1 commit
    • Vieri's avatar
      fix the url in doc · f7bc4adf
      Vieri authored
      Change-Id: Iabeffef5c11aa2a7ef65fbd86a995a08176009dd
      f7bc4adf