Skip to content
Snippets Groups Projects
  1. Sep 22, 2022
    • Rafael Castillo's avatar
      Specifically build master in tripleo periodic job · ebaa1ac3
      Rafael Castillo authored
      Currently, our tripleo periodic jobs are failing, while our check jobs
      are passing. This is because build-test-packages is not building the
      tip of master version of the collections, instead using the version
      built in rdo. This patch explicitly adds ansible-collection-openstack to
      the change list so it always gets picked up by build-test-packages.
      
      Change-Id: I6938c8373872daed8632429df42d20396980bc76
      ebaa1ac3
  2. Sep 09, 2022
  3. Aug 11, 2022
    • Rafael Castillo's avatar
      Update compute flavor module for 2.0.0 · 4df7a12e
      Rafael Castillo authored
      Switch sdk calls to use the proxy layer where sensible.
      
      Ensure that returned resource objects are converted to dicts.
      
      Removes undocumented id return value.
      
      Rename flavorid to id. Keep flavorid as an alias for backward
      compatibility.
      
      Rename the test role from nova_flavor to compute_flavor to keep naming
      consistent.
      
      Fold tests from compute_flavor_info into the compute_flavor role.
      
      Add additional tests to improve coverage.
      
      Update return docs
      
      Change-Id: I5419d1c02b9b50625beb3bff88c8e4a4f1c14667
      4df7a12e
  4. Aug 10, 2022
    • Rafael Castillo's avatar
      Update identity_group for 2.0.0 · 5e7c29d9
      Rafael Castillo authored
      Replace calls to the sdk cloud layer with proxy layer calls where
      appropriate.
      
      Ensure module return values are converted into dict.
      
      General refactoring to bring module more in line with collection
      conventions.
      
      Expand tests to assert idempotency and presence of return values.
      
      Rename test role to identity_group to match module name.
      
      Change-Id: I06fe28f77431bb151d85c8d9cd924a1634d85d98
      5e7c29d9
  5. Aug 08, 2022
    • Jakob Meng's avatar
      Refactored port and port_info modules · d0eb83e9
      Jakob Meng authored
      Define port's module attribute 'name' as a required attribute because
      this parameter is used to find, update and delete ports. Technically,
      a name is not required to create a port, but idempotency cannot be
      implemented without an identifier to refer to a port. In this
      collection we use resource names to find and identify resources. We
      do not offer a dedicated id attribute in most modules.
      
      Use port's module attribute 'network' when finding, creating,
      updating or deleting ports if the user provided this attribute.
      This allows to reduce ambiguity when equal names are used across
      different networks.
      
      Added 'description' parameter to port module.
      
      Renamed port's module attributes 'vnic_type' to 'binding_vnic_type'
      and 'admin_state_up' to 'is_admin_state_up' to match openstacksdk's
      attribute names which are used e.g. in module results. Added aliases
      for the old attribute names to keep backward compatibility.
      
      Renamed port_info's module attribute 'port' to 'name' and added
      the former as an alias to be consistent with other *_info modules.
      
      Dropped default=None and required=False from argument_spec of port
      module because those are the default in Ansible [1][2].
      
      Dropped 'id' field from port module's results to be consistent across
      other modules. Use 'port.id' instead.
      
      Sorted argument specs and documentation of the port module and
      marked attributes which are not updatable.
      
      Updated RETURN fields documentation for the module results of both
      port and port_info modules.
      
      Added integration tests to check the update mechanism of the port
      module.
      
      Added assertions for module results to catch future changes in the
      openstacksdk and our Ansible modules.
      
      Dropped openstacksdk version check since we require a recent release
      anyway.
      
      Fixed indentation in integration tests.
      
      Merged integration tests of port_info module into port module,
      because the former does not create any ports and assumes that
      ports have been created earlier.
      
      [1] https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_documenting.html
      [2] https://github.com/ansible/ansible/blob/61af59c8082cff068424d1012271daa0aac97288/lib/ansible/module_utils/common/parameters.py#L489
      
      
      
      Signed-off-by: default avatarJakob Meng <code@jakobmeng.de>
      Change-Id: Iacca78649f8e01ae95649d8d462f5d0a1740405e
      d0eb83e9
  6. Jul 28, 2022
    • Jakob Meng's avatar
      Refactored server and server_info modules · ac401bb3
      Jakob Meng authored
      Allow to update server attributes such as its description.
      
      Changed default value of server attribute 'security_groups' from
      ['default'] to [] because the latter is the default in
      python-openstackclient [1] and the former behavior causes issues
      with existing servers [2]: Previously, when no 'security_groups'
      parameter was given, the server module would change existing
      servers to use the default security group, dropping all other
      security groups assigned to the server.
      Our (undocumented) guideline when writing modules is to only
      add or change what has been requested by the user and to stick to
      defaults from openstacksdk and python-openstackclient whenever
      possible. Since we have to break backward compatibility with the
      next release anyway, we take this opportunity to clean up this odd
      behavior. Now, when no security groups are given, then security
      groups of an existing server will not be touched.
      Closes story #2007893 [2].
      Note, Nova will create a server in the default security group,
      if the security_groups parameter is omitted.
      
      Dropped 'openstack' field from server module's results. This
      variable expanded to additional server information which might
      be useful for Ansible inventories and was filled from
      openstacksdk's get_openstack_vars() function [3]. Variables in
      this function can make additional cloud queries to retrieve
      additional data, so calling this function can be expensive [4].
      Users can use *_info modules to retrieve this data on-demand.
      
      Dropped 'availabity_zone' attribute from generic OpenStackModule
      arguments and inserted it into server and volume modules because
      it is relevant to those two modules only. This is completes what
      was started years ago [5] and is possible now since we have
      breaking changes anyway.
      
      Switched attribute name 'userdata' with its alias 'user_data' to
      match openstacksdk's attribute names which are used e.g. in module
      results. The previous attribute name 'userdata' is now used as an
      alias and 'user_data' is used as the attribute name to keep backward
      compatibility.
      
      Wait for server to get into 'ACTIVE' state when creating a server
      and attribute 'wait' has been set to true.
      
      Sorted argument specs and documentation of the server module and
      marked attributes which are not updatable. Changed unstable bash
      script example in server module documentation.
      
      Renamed server's module attribute 'delete_fip' to 'delete_ips' to
      match openstacksdk and clarify that it includes all floating ip
      addresses of the server.
      
      Renamed server_info's module attribute 'server' to 'name' and added
      the former as an alias to be consistent with other *_info modules.
      
      Added RETURN fields documentation for the module results of both
      server and server_info modules.
      
      Added description and examples of how to use the 'filters' attribute
      of the server_info module. Closes story #2007873 [6].
      
      Removed 'openstack_' prefix from module results because the prefix is
      not consistently used across modules, is more to type without any
      benefit and removal of the prefix allows us to signal to users that
      their code for handling module results has to be updated. Many modules
      have different return values with openstacksdk >= 0.99.0 because it
      consistently uses resource proxies now.
      
      Added assertions for module results to catch future changes in the
      openstacksdk and our Ansible modules.
      
      Added integration tests to check the update mechanism of the server
      module.
      
      Fixed indentation in integration tests.
      
      Ensure proper creation and deletion of resources such as networks,
      subnets and servers in integration tests of server_action module.
      
      Renamed ci/roles/server/defaults/main.yaml to main.yml, removing the
      'a' in the file extension to be consistent with other filenames.
      
      Dropped deprecated function openstack_find_nova_addresses() and
      incorporated its code directly into the server module because it
      is not used anywhere else.
      
      [1] https://opendev.org/openstack/python-openstackclient/src/commit/e49ad1795b9dd57d5a82fb6f8f365fa20041cf29/openstackclient/compute/v2/server.py#L1070
      [2] https://storyboard.openstack.org/#!/story/2007893
      [3] https://opendev.org/openstack/openstacksdk/src/commit/9e9fc9879583943a08f854980cca5dfb3a5832f7/openstack/cloud/_compute.py#L1772
      [4] https://opendev.org/openstack/openstacksdk/src/commit/9e9fc9879583943a08f854980cca5dfb3a5832f7/openstack/cloud/meta.py#L482
      [5] https://github.com/ansible/ansible/commit/9bf33e56dd49e9478ba091a1ba12d17b7caeac24
      [6] https://storyboard.openstack.org/#!/story/2007873
      
      
      
      Signed-off-by: default avatarJakob Meng <code@jakobmeng.de>
      Change-Id: I2f955519a7e8c782b1dab8f94f7a019ed384b81d
      ac401bb3
  7. Jul 25, 2022
  8. Jul 20, 2022
    • Arx Cruz's avatar
      Update port info · 960e5df1
      Arx Cruz authored
      Make it compatible with new openstack sdk 1.0.0
      
      Change-Id: I911eecd31ee69dbde1da02a74e152746c1e3edfa
      960e5df1
  9. Jul 19, 2022
  10. Jul 18, 2022
  11. Jul 06, 2022
  12. Jul 05, 2022
    • Jakob Meng's avatar
      Split CI tests for security_group and security_group_rule modules · 0e675a91
      Jakob Meng authored
      Previously, all security_group{,_info} and security_group_rule{,_info}
      modules were tested in the same Ansible role. This patch splits
      tests into two separate Ansible roles to increase readibility and
      prevent variable name conflicts, e.g. for expected_fields.
      
      Change-Id: Ifc28435147b3bfe88d4ee5e176469a53b7395dc0
      0e675a91
  13. Jul 04, 2022
  14. Jun 29, 2022
  15. Jun 23, 2022
    • Arx Cruz's avatar
      Update project_info module to new sdk · bcca2efe
      Arx Cruz authored
      Make project_info module compatible with the new sdk 1.0.0 and also add
      ansible tests for project_info module
      
      Change-Id: I413200cf6a9b8bada7e5d78087246b888d53fac2
      bcca2efe
  16. Jun 14, 2022
  17. Jun 08, 2022
    • Arx Cruz's avatar
      Update catalog service for the new sdk · 7c7e61d3
      Arx Cruz authored
      This patch do the following:
      
      * Update catalog_service to use new openstacksdk
      * Add catalog_service role to test catalog_service module
      
      Change-Id: I6778f5e91cb0ead63cede28af0111d7ffbbf3ab1
      7c7e61d3
  18. Jun 02, 2022
  19. Jun 01, 2022
  20. May 31, 2022
  21. May 23, 2022
  22. May 11, 2022
  23. 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
    • 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
  24. May 05, 2022
    • Rafael Castillo's avatar
      Use proxy layer in identity_user module · fd1b9fc0
      Rafael Castillo authored
      This patch changes the module to use the sdk proxy layer and does some
      general refactoring to simplify the code. It will no longer fail if
      no password is supplied since it is perfectly fine to create a user
      with an password.
      
      Renamed the test role from user to identity_user to match the module
      name
      
      Change-Id: I97ee9b626f269abde3be7b2b9211d2bb5b7b3c26
      fd1b9fc0
  25. 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
  26. May 03, 2022
  27. Apr 28, 2022
  28. 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
  29. Apr 20, 2022
    • Jakob Meng's avatar
      Dropped broken linter job openstack-tox-linters-ansible-2.9 · f09cccdb
      Jakob Meng authored
      Running older linter releases while we have a more up to date
      Ansible 2.12 based linter does not provide value and thus wastes
      ci resources. Our Ansible 2.9 based linter is broken atm and since
      it is EOL soon anyway we drop this job. We still have a linter job
      based on the last stable release and one based on Ansible's
      devel branch.
      
      Our tox environment for Ansible 2.9 will be dropped in a later
      patch once all Ansible 2.9 based jobs have been removed.
      
      Change-Id: I9cd3f729b06516bbd9a3c7985b65fcf294c8bdd7
      f09cccdb
  30. 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 :relaxed:
      
      Change-Id: Ic6f2febc5a40a29534ac4c7f41f714865099086a
      2bf82c26
  31. Apr 04, 2022
  32. Mar 31, 2022
    • 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
  33. Mar 29, 2022
Loading