Skip to content
Snippets Groups Projects
  1. May 24, 2022
    • Jakob Meng's avatar
      Raise minimum OpenStack SDK version to 0.99.0 · 4bfa135b
      Jakob Meng authored
      Alongside OpenStack SDK 1.0.0 we will release a new collection version
      2.0.0 which is compatible to OpenStack SDK 1.x.x series only. Code in
      branch stable/1.0.0 will remain compatible to OpenStack SDK 0.x.x
      series only. Release candidates for the first major release of
      OpenStackSDK 1.x.x will be numbered using 0.99.x versions.
      
      At Ansible OpenStack modules PTG on 2022-04-07 it was decided to raise
      an error if one is using a incompatible releases of the OpenStack SDK
      with our collection. We decided against showing warnings only because
      they can be missed easily and functionality  will be broken but
      probably hardly detectable when using the wrong SDK.
      
      This patch bumps the minimum required SDK versions to 0.99.0, so that
      an error will be raised when users try to use our collection with an
      incompatible SDK release, e.g. use code from our master branch with
      a OpenStack SDK 0.x.x release.
      
      Change-Id: I3974deabc516379745794806886352279dc4f4a7
      4bfa135b
  2. May 23, 2022
  3. May 11, 2022
  4. May 10, 2022
    • Jan Horstmann's avatar
      Set owner in image module · 80ef2093
      Jan Horstmann authored
      Previously the owner field was not set by module
      `cloud.openstack.image`, although it is specified as a module parameter.
      The usual approach in `ansible-collections-openstack` is to accept both
      names and IDs when referencing openstack resources.
      Therefore this commit follows the approach taken by
      `python-openstackclient` in [1] and introduces a `project` and a
      `project_domain` parameter to identify projects by name or ID and
      assign the ID to the `owner` attribute of the image.
      The `owner` parameter is left as an alias to `project` in the module.
      
      Story: 2009983
      Task: 45012
      
      [1]
      https://opendev.org/openstack/python-openstackclient/commit/cf2de9af79cedd51ca080f5a6521997c05647418
      
      Change-Id: I3654587df8e40d554aac5126df307961f335332c
      (cherry picked from commit acf64a1f72bf10e0e332899168e468db5c8ba034)
      80ef2093
  5. May 09, 2022
    • anbanerj's avatar
      Moves image_info from cloud to proxy object · c1a97942
      anbanerj authored
      This makes image_info compatible with new sdk version
      - This patch changes get_image (which is a cloud object method) to image.get_image (proxy object method)
      - image.images accepts **query which is a dict object. So this patch changes the args passed to a dict. If properties is not specified it passes an empty dict.
      - updates the documentation to reflect the actual returned parameters
      - adds a ci test to list all images without specifying image name or property and assert no field is missing
      - changes openstack_image to image in ansible return value
      
      Change-Id: Ibf934568f069c305747fc24fbb22ce3fc095286c
      c1a97942
    • Rafael Castillo's avatar
      Update identity_role_info for latest openstacksdk release · 1d22a94a
      Rafael Castillo authored
      - Stop checking for to_dict, breaking compatibility with older sdk
        releases
      - Updates RETURN doc string with all the returned fields
      - Adds a new identity_role_info role to test the identity_role_info
        module.
      - Change the name of the module return value to remove 'openstack_'
        prefix
      
      Change-Id: If8a1145a31d685d41367383930e6fd08d64c6ae8
      1d22a94a
    • Jakob Meng's avatar
      Reverted identity_user_info from identity.users() to search_users() · fdf49997
      Jakob Meng authored
      Commit 2df07f35 changed module identity_user_info to use function
      identity.users() instead of search_users(). The first does not allow
      to search for id with parameter name while the previous and current
      search_users() function has a name_or_id parameter which allows to
      search by name and id.
      
      Ref.: https://opendev.org/openstack/ansible-collections-openstack/commit/2df07f3523ba3281d84c93083bc3b5d1791afb4b
      
      Change-Id: I71226e578a234d24e068a256cf4a5533ccd4c201
      fdf49997
    • Rafael Castillo's avatar
      Refactored identity_domain_info · b31fdf83
      Rafael Castillo authored
      Switch to SDK's cloud layer function search_domains which allows
      us to reduce our code. Added integration test for this module.
      
      Change-Id: Ic7915fd3334266783ea5e9d442ef304fa734ca00
      b31fdf83
  6. May 05, 2022
  7. May 04, 2022
    • Rafael Castillo's avatar
      Use proxy layer in identity_user_info · 2df07f35
      Rafael Castillo authored
      - Changes the module to get user through proxy layer
      - Adds a role to test the module
      - Renames the return value to drop openstack_ prefix
      
      Change-Id: I99e98a529ce74ff2ca77a67d09f188228e6a0e37
      2df07f35
    • Jakob Meng's avatar
      Removed job definitions for stable/1.0.0 branch · c83e0e39
      Jakob Meng authored
      
      Previously, all job definitions where shared across each .zuul.yaml in
      both branches. When a job definition was changed in one branch, Zuul CI
      could pick the job definition from the other branch, which was not
      intended.
      
      The problem arises when mixing explicit job.branches matchers with
      implicit branch matching, when defining same jobs on multiple branches.
      Zuul CI expects that jobs to be defined in one or the other branch, not
      both at the same time. One should only use job.branches matchers from
      single-branched projects, e.g. trusted config repos. When defining jobs
      in branched repositories one selects which job definition to use by the
      branch associated with the triggering event instead.
      Each trigger has a branch associated with it, whether it is the branch
      targeted by the change being proposed, the branch to which a commit
      merged, a branch attached to a timer trigger etc. This branch name is
      searched across involved projects in order to determine what job
      definition should be used.
      
      The job.branches directive is rarely applied to a job which will be
      copied to multiple branches. When you have multiple copies of a job
      with the job.branches attribute, Zuul CI could pick any of the job
      definitions which might not be the one you expected.
      The job.branches attribute is useful in single branch config
      repositories where a specific job definition has to be applied to a
      specific branch of the repository. Another definition of the job
      will exist in another branch of the config repository.
      
      This patch removes job definitions which are specific to other
      branches, except for parent jobs which are shared across branches.
      
      Signed-off-by: default avatarJakob Meng <code@jakobmeng.de>
      Change-Id: Idb8720bd96843b7807dd5cb62b30c1edf3a7a37c
      c83e0e39
    • Jakob Meng's avatar
      Fixed return type of identity_role module · 92566ded
      Jakob Meng authored
      Change-Id: Ifcf55749919fd59c990611e8c4537de787ba4005
      92566ded
  8. May 03, 2022
  9. May 02, 2022
  10. Apr 28, 2022
  11. Apr 27, 2022
    • Jakob Meng's avatar
      Constrain filters in compute_service_info to SDK >= 0.53.0 · e85a0b80
      Jakob Meng authored
      Older releases of OpenStack SDK do not support filtering services.
      
      Change-Id: I613c76b8f794ea2024939e07250a50edc5b9e49a
      e85a0b80
    • Jakob Meng's avatar
      Removed object tags from ci role server · bba1da17
      Jakob Meng authored
      Tag object was introduced to server role in commit c8a5be6b [1] to
      allow skipping server tests when volumes are not available.
      
      Whenever tag object is specified, Ansible will run those three tasks
      in role server. But as our server module has not been ported to
      OpenStack SDK 1.0.0 series it will fail even if someone only wants to
      test our object ci role.
      
      This patch removes all occurrences of the object tag in the ci server
      role. Since it is not used anywhere in our code it will not break ci.
      
      Ref.:
      [1] https://opendev.org/openstack/ansible-collections-openstack/commit/c8a5be6b3022140da41dc10a2d0a6a147ad170cf
      
      Change-Id: I222fac499c9a3cb16c4581fb4347170a4d97f833
      bba1da17
    • Jakob Meng's avatar
      Added support for specifying a maximum version of the OpenStack SDK · bc6622e0
      Jakob Meng authored
      Alongside OpenStack SDK 1.0.0 we will release a new collection version
      2.0.0 which is compatible to OpenStack SDK 1.x.x series only. Code in
      branch stable/1.0.0 will remain compatible to OpenStack SDK 0.x.x
      series only.
      
      At Ansible OpenStack modules PTG on 2022-04-07 it was decided to raise
      an error if one is using a incompatible releases of the OpenStack SDK
      with our collection. We decided against showing warnings only because
      they can be missed easily and functionality  will be broken but
      probably hardly detectable when using the wrong SDK.
      
      This patch implements the code to raise errors when users are trying
      to use our collection with an incompatible SDK release, e.g. use code
      from our stable/1.0.0 branch with a OpenStack SDK 1.x.x release.
      
      It does not yet change the minimum and maximum required SDK versions
      because OpenStack SDK 1.0.0 has not yet been released to PyPI and
      SDK's master branch still does not return a 1.x.x version number.
      
      Change-Id: I1052d21cf8f108dbc99619cd4c4072488645b855
      bc6622e0
  12. Apr 26, 2022
    • Jakob Meng's avatar
      Use Rocky release of Heat in Queens job · e869564e
      Jakob Meng authored
      The oldest branch in Heat repository is stable/rocky. Previously,
      Zuul CI would use the master branch of Heat since it could not find
      stable/queens branch but master branch has incompatibilities with
      our Queens job.
      
      Change-Id: Iaeca759cad641d4923fc63489fd65f57d9f1345a
      e869564e
    • Arx Cruz's avatar
      Move dns zone info to use proxy layer · 0c6e8bed
      Arx Cruz authored
      Make it compatible with new SDK.
      Although this one was already using self.con.dns.zones to retrieve the
      zones, it wasn't using the to_dict(computed=False) and was still
      removing the location (which is obsolate when you use to_dict.
      
      Change-Id: Ie2a5b772acc0c8c8338f6f1da877564a077e3b7a
      0c6e8bed
  13. Apr 22, 2022
  14. Apr 20, 2022
  15. Apr 19, 2022
    • Jakob Meng's avatar
      Temporarily set job openstack-tox-linters-ansible-2.9 to non-voting · 2bf82c26
      Jakob Meng authored
      Python module rstcheck which is used by ansible-test deprecated
      Python versions prior 3.7 in version 3.5.0 and removed support
      in 4.0.0 [1]. Ubuntu 18.04 LTS (Bionic Beaver) comes with Python
      3.6 by default, so rstcheck prints a FutureWarning which confuses
      ansible-test:
      
        Run command: ***/python -m rstcheck --report warning
        --ignore-substitutions _,br,release,today,version
        docs/openstack_guidelines.rst
        Traceback (most recent call last):
          File "***/ansible-test", line 28, in <module>
            main()
          File "***/ansible-test", line 24, in main
            cli_main()
          File "***/ansible_test/_internal/cli.py", line 130, in main
            args.func(config)
          File "***/ansible_test/_internal/sanity/__init__.py", line 193,
          in command_sanity
            result = test.test(args, sanity_targets, version)
          File "***/ansible_test/_internal/sanity/rstcheck.py", line 80,
          in test
            results = parse_to_list_of_dict(pattern, stderr)
          File "***/ansible_test/_internal/util.py", line 799, in
          parse_to_list_of_dict
            raise Exception('Pattern "%s" did not match values:\n%s' %
            (pattern, '\n'.join(unmatched)))
        Exception: Pattern "^(?P<path>[^:]*):(?P<line>[0-9]+):
        \((?P<level>INFO|WARNING|ERROR|SEVERE)/[0-4]\) (?P<message>.*)$"
        did not match values:
        ***/rstcheck.py:51: FutureWarning: Python versions prior 3.7 are
        deprecated. Please update your python version.
          FutureWarning
        ERROR: Command "/usr/bin/env ANSIBLE_TEST_CONTENT_ROOT=***/
        ansible_collections/openstack/cloud LC_ALL=en_US.UTF-8 ***/python3.6
        ***/ansible-test sanity -v --python 3.6 --skip-test
        metaclass-boilerplate --skip-test future-import-boilerplate plugins/
        docs/ meta/ scripts/ --metadata ***.json --truncate 0 --redact
        --color no --requirements" returned exit status 1.
      
      We cannot constrain the version of rstcheck which ansible-test installs
      into its Python virtual environment. This has to be fixed in Ansible
      itself, a pull request against Ansible 2.9 has been opened [2].
      
      Ref.:
      [1] https://github.com/myint/rstcheck/blob/master/README.rst
      [2] https://github.com/ansible/ansible/pull/77568
      
      As a workaround we temporarily set our Ubuntu 18.04 based linter job
      openstack-tox-linters-ansible-2.9 to non-voting and remove it from
      check dependencies and as a gate job.
      
      Thanks to Arx Cruz and Jesper Schmitz Mouridsen for pointing out this
      issue and its root cause ☺️
      
      Change-Id: Ic6f2febc5a40a29534ac4c7f41f714865099086a
      2bf82c26
  16. Apr 13, 2022
  17. Apr 12, 2022
  18. Apr 06, 2022
  19. Apr 05, 2022
  20. Apr 04, 2022
  21. Mar 31, 2022
    • Ümit Seren's avatar
      Add subnet pool module · 453601bd
      Ümit Seren authored
      Change-Id: Ib8b5481a1e257490f2a9ff62659a70ea2e920304
      453601bd
    • Gaudenz Steinlin's avatar
      Add 'all_projects' to server_action module · bf2c20f5
      Gaudenz Steinlin authored
      This allows to execute actions on servers outside of the current auth
      scoped project if the user has permission to do so.
      
      Change-Id: Ifb3f40973a76ad8c57bcbcbcb8e73c917681096b
      bf2c20f5
    • Jakob Meng's avatar
      Refactored tox requirements for different Ansible releases · a03dd054
      Jakob Meng authored
      Sorted pip requirements file to improve readability.
      
      Moved pip requirements for tests into tests subdirectory and dropped
      'pip-' prefix to shorten filenames and conform with common naming
      scheme for pip requirements files.
      
      Added constrains on OpenStack SDK 1.*.* to job ansible-collections-\
      openstack-functional-devstack-releases on master branch because only
      stable/1.0.0 branch is compatible to the OpenStack SDK 0.*.* series.
      
      Changed job ansible-collections-openstack-functional-devstack-releases
      on master branch to non-voting because OpenStack SDK 1.*.* has not
      been released to PyPI yet, so tests on master branch are expected to
      fail once we introduce breaking changes from stable/1.0.0 branch.
      
      Change-Id: I6b6bb8c6900f7c8341bbf3f9a24999fbf693ba4b
      a03dd054
Loading