Skip to content
Snippets Groups Projects
  1. Oct 06, 2022
    • Rafael Castillo's avatar
      Update quota for 2.0.0 · f0cb7f68
      Rafael Castillo authored
      Add a test role to validate module functionality
      
      Replace calls to the sdk cloud layer to use the proxy layer.
      
      Update module parameters to use names matching the sdk. Keep aliases for
      old values.
      
      Remove _scrub_results, no longer necessary with proxy layer.
      
      Move check mode outside of main flow to keep the module readable.
      
      Refactor code to handle fields that should be ignored.
      
      Simplify return value from _system_state_change_details.
      
      Inline calls to fetch existing quotas.
      
      Remove metaprogramming calls to cloud layer methods, as the proxy layer
      doesn't have the same consistent API.
      
      Remove handling for case where neutron throws exception when unsetting
      quotas that aren't set. This is validated in the test role.
      
      Ensure return values are dicts.
      
      Replace exception handler with conditionals which allows us to drop the
      dependency on keystoneauth1 library and is much more correct than
      catching all exceptions and always printing the same error even on
      unrelated exceptions.
      
      Story: 2010099
      Task: 45654
      
      Change-Id: I5eda8e476a4e779382e6c63f5982504d5951501d
      f0cb7f68
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. Jul 04, 2022
  8. 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
  9. Jun 14, 2022
  10. 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
  11. May 31, 2022
  12. May 11, 2022
    • Arx Cruz's avatar
      Update identity_group_info to new sdk · a6805cd0
      Arx Cruz authored
      The following changes were made:
      
      * Update identity_group_info to use the new openstacksdk
      * Added identity_group_info role to test the module
      
      Change-Id: I24e64c9455618952ee612d7413882f0ac022189f
      a6805cd0
  13. 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
  14. 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
  15. 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
  16. May 03, 2022
  17. Apr 05, 2022
  18. Mar 31, 2022
  19. Feb 10, 2022
    • Sagi Shnaidman's avatar
      Remove project properties tests and support · 7aa62637
      Sagi Shnaidman authored
      Keystone project doesn't have project "properties" documented and
      discourage users to use them. Remove support for this feature and
      tests for it. It was removed from new SDK as well.
      
      Change-Id: I2e47ade56c3df5945e991d11d70f429760c0d852
      7aa62637
  20. Jan 11, 2022
  21. Aug 06, 2021
    • Jakob Meng's avatar
      Allow to attach multiple floating ips to a server · 3a08a9c0
      Jakob Meng authored
      OpenStack allows to attach multiple floating ips to a single server.
      Previously, only one floating ip was supported by this module. It
      would call openstacksdk's get_server_public_ip(), which in turn
      would return just one of the attached floating ips. If this floating
      ip would not point to the right nat_destination or fixed_address,
      then the module would fail.
      
      If no floating ip had been attached to a server, then this module
      would call openstacksdk's add_ips_to_server() with both parameters
      "floating_ip_address" and "network" to attach a floating ip to the
      server. But both parameters are mutually exclusive [1], i.e.
      add_ips_to_server() will ignore "floating_ip_address" if "network"
      is set and then choose any non-attached floating ip from "network".
      If "floating_ip_address" has not been created in OpenStack and
      "network" is not given, then this module would not create this
      floating ip [2].
      
      The new module code allows to create and add more than one floating
      ip to a server. It priorizes more specific parameters over generic
      ones, i.e. if both "floating_ip_address" and "network" are given,
      then "floating_ip_address" precedes "network".
      
      Parameter "network" is now required if "floating_ip_address" is
      specified, because both are necessary when creating floating ips.
      
      Module documentation and args have been updated accordingly.
      
      Ref.:
      [1] https://github.com/openstack/openstacksdk/blob/a6b0ece2821ea79330c4067100295f6bdcbe456e/openstack/cloud/_floating_ip.py#L987
      [2] https://github.com/openstack/openstacksdk/blob/a6b0ece2821ea79330c4067100295f6bdcbe456e/openstack/cloud/_floating_ip.py#L907
      
      Task: 40939
      Story: 2008181
      Change-Id: I1ada1be0994f526f72f81f7458782afbcca3c92c
      3a08a9c0
  22. Jun 22, 2021
  23. Jun 17, 2021
  24. May 27, 2021
  25. Apr 08, 2021
  26. Feb 20, 2021
  27. Jan 18, 2021
  28. Dec 29, 2020
  29. Dec 16, 2020
  30. May 12, 2020
    • Monty Taylor's avatar
      Rename all of the modules · e47c4671
      Monty Taylor authored
      This is separate from the previous patch - it's just the results
      of running the script so we can review the two a little independently.
      We should probably squash them.
      
      Change-Id: I838f15cf4a32455a5be20033c8ddc27db6ca15c0
      e47c4671
  31. Apr 14, 2020
  32. Apr 02, 2020
  33. Mar 28, 2020
    • Sagi Shnaidman's avatar
      Add SDK version to tests conditions · 2753b5bc
      Sagi Shnaidman authored
      Pass SDK version to ansible roles so we can skip testing of modules
      which are not supported for current SDK version
      
      Change-Id: I5d25c0a6827536434a8f17b2a0f7de0db4c78301
      2753b5bc
  34. Mar 26, 2020
Loading