Skip to content

Commit

Permalink
dev: fix to osm_port removal
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudguruab committed Oct 19, 2023
1 parent b190874 commit 63f993d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion os_migrate/plugins/module_utils/workload_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def _converter_address(self):
if self.conversion_host_address:
return self.conversion_host_address
else:
return self._converter().accessIPv4
return self._converter().access_ipv4

def _update_progress(self, dev_path, progress):
self.log.info('Transfer progress for %s: %s%%', dev_path, str(progress))
Expand Down
2 changes: 1 addition & 1 deletion os_migrate/plugins/modules/os_conversion_host_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def main():
# There are two possible attributes for the server's IPv4 floating IP
# value, accessIPv4 and public_v4 which might not be consistent across
# vendors, so we check both.
if hasattr(server, 'accessIPv4') and server.accessIPv4 != "":
if hasattr(server, 'access_ipv4') and server.access_ipv4 != "":
conversion_host['address'] = server.accessIPv4
elif hasattr(server, 'public_v4') and server.public_v4 != "":
conversion_host['address'] = server.public_v4
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/tasks/tenant/clean_pre_workload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@

- name: remove osm_ports
ansible.builtin.include_tasks: check_pre_workload_ports.yml
when: networks_list.networks.keys() | length != 0
when: "'networks' in networks_list"

- name: remove osm_subnet
openstack.cloud.subnet:
Expand Down Expand Up @@ -186,4 +186,4 @@

- name: remove osm_security_group_rule
ansible.builtin.include_tasks: check_pre_workload_security_group.yml
when: security_group_list.security_group | length != 0
when: "'security_groups' in security_group_list"
4 changes: 3 additions & 1 deletion tests/e2e/tasks/tenant/seed_workload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

- name: Create osm_volume
ansible.builtin.command:
cmd: openstack volume create --size 1 --display-name osm_volume
cmd: openstack volume create --size 1 osm_volume
environment:
OS_AUTH_TYPE: token
OS_AUTH_URL: "{{ os_migrate_src_auth.auth_url }}"
Expand All @@ -14,6 +14,8 @@
OS_PROJECT_NAME: "{{ os_migrate_src_auth.project_name|default('') }}"
OS_PROJECT_DOMAIN_ID: "{{ os_migrate_src_auth.project_domain_id|default('') }}"
OS_PROJECT_DOMAIN_NAME: "{{ os_migrate_src_auth.project_domain_name|default('') }}"
register: _result
changed_when: "_result.rc == 0"

- name: Create osm_server
openstack.cloud.server:
Expand Down

0 comments on commit 63f993d

Please sign in to comment.