Updated return value docs of compute_service_info module
We do no longer return computed values here. Note, this breaks backward compatibility because we do no longer return the location attribute. It was never documenteed anyway. Change-Id: I11af9486a6a284d1756380548fca22435c43765a
This commit is contained in:
parent
4c3dfec59d
commit
ffa826c0d0
@ -7,6 +7,13 @@
|
|||||||
register: result
|
register: result
|
||||||
failed_when: "result.openstack_compute_services | length <= 0"
|
failed_when: "result.openstack_compute_services | length <= 0"
|
||||||
|
|
||||||
|
- name: Assert fields
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- '["availability_zone", "binary", "disabled_reason", "is_forced_down",
|
||||||
|
"host", "name", "state", "status", "updated_at", "id"] |
|
||||||
|
difference(result.openstack_compute_services.0.keys()) | length == 0'
|
||||||
|
|
||||||
- name: Get nova conductor services info
|
- name: Get nova conductor services info
|
||||||
openstack.cloud.compute_service_info:
|
openstack.cloud.compute_service_info:
|
||||||
cloud: "{{ cloud }}"
|
cloud: "{{ cloud }}"
|
||||||
|
@ -59,10 +59,22 @@ openstack_compute_services:
|
|||||||
description: The name of the host.
|
description: The name of the host.
|
||||||
returned: success
|
returned: success
|
||||||
type: str
|
type: str
|
||||||
zone:
|
disabled_reason:
|
||||||
|
description: The reason why the service is disabled
|
||||||
|
returned: success
|
||||||
|
type: str
|
||||||
|
availability_zone:
|
||||||
description: The availability zone name.
|
description: The availability zone name.
|
||||||
returned: success
|
returned: success
|
||||||
type: str
|
type: str
|
||||||
|
is_forced_down:
|
||||||
|
description: If the service has been forced down or nova-compute
|
||||||
|
returned: success
|
||||||
|
type: bool
|
||||||
|
name:
|
||||||
|
description: Service name
|
||||||
|
returned: success
|
||||||
|
type: str
|
||||||
status:
|
status:
|
||||||
description: The status of the service. One of enabled or disabled.
|
description: The status of the service. One of enabled or disabled.
|
||||||
returned: success
|
returned: success
|
||||||
@ -71,7 +83,7 @@ openstack_compute_services:
|
|||||||
description: The state of the service. One of up or down.
|
description: The state of the service. One of up or down.
|
||||||
returned: success
|
returned: success
|
||||||
type: str
|
type: str
|
||||||
update:
|
update_at:
|
||||||
description: The date and time when the resource was updated
|
description: The date and time when the resource was updated
|
||||||
returned: success
|
returned: success
|
||||||
type: str
|
type: str
|
||||||
@ -98,7 +110,7 @@ class ComputeServiceInfoModule(OpenStackModule):
|
|||||||
if host:
|
if host:
|
||||||
filters['host'] = host
|
filters['host'] = host
|
||||||
services = self.conn.compute.services(**filters)
|
services = self.conn.compute.services(**filters)
|
||||||
services = list(services)
|
services = [service.to_dict(computed=False) for service in services]
|
||||||
self.exit_json(changed=False, openstack_compute_services=services)
|
self.exit_json(changed=False, openstack_compute_services=services)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user