Skip to content
This repository was archived by the owner on Jul 17, 2023. It is now read-only.

Support float for "allowed_bandwidth_gb" parameter in server info APIs response. #35

Merged
merged 1 commit into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/inventory/vultr.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
'SUBID': dict(key='id'),
'label': dict(key='name'),
'date_created': dict(),
'allowed_bandwidth_gb': dict(convert_to='int'),
'allowed_bandwidth_gb': dict(convert_to='float'),
'auto_backups': dict(key='auto_backup_enabled', convert_to='bool'),
'current_bandwidth_gb': dict(),
'kvm_url': dict(),
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/vultr_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@
allowed_bandwidth_gb:
description: Allowed bandwidth to use in GB
returned: success
type: int
sample: 1000
type: float
sample: 1000.5
auto_backup_enabled:
description: Whether automatic backups are enabled
returned: success
Expand Down Expand Up @@ -359,7 +359,7 @@ def __init__(self, module):
'SUBID': dict(key='id'),
'label': dict(key='name'),
'date_created': dict(),
'allowed_bandwidth_gb': dict(convert_to='int'),
'allowed_bandwidth_gb': dict(convert_to='float'),
'auto_backups': dict(key='auto_backup_enabled', convert_to='bool'),
'current_bandwidth_gb': dict(),
'kvm_url': dict(),
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/vultr_server_baremetal.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@
allowed_bandwidth_gb:
description: Allowed bandwidth to use in GB
returned: success
type: int
sample: 1000
type: float
sample: 1000.5
cost_per_month:
description: Cost per month for the server
returned: success
Expand Down Expand Up @@ -271,7 +271,7 @@ def __init__(self, module):
'SUBID': dict(key='id'),
'label': dict(key='name'),
'date_created': dict(),
'allowed_bandwidth_gb': dict(convert_to='int'),
'allowed_bandwidth_gb': dict(convert_to='float'),
'current_bandwidth_gb': dict(),
'default_password': dict(),
'internal_ip': dict(),
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/vultr_server_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
allowed_bandwidth_gb:
description: Allowed bandwidth to use in GB
returned: success
type: int
sample: 1000
type: float
sample: 1000.5
auto_backup_enabled:
description: Whether automatic backups are enabled
returned: success
Expand Down Expand Up @@ -232,7 +232,7 @@ def __init__(self, module):
"FIREWALLGROUPID": dict(key='firewallgroup', transform=self._get_firewallgroup_name),
"SUBID": dict(key='id', convert_to='int'),
"VPSPLANID": dict(key='plan', convert_to='int', transform=self._get_plan_name),
"allowed_bandwidth_gb": dict(convert_to='int'),
"allowed_bandwidth_gb": dict(convert_to='float'),
'auto_backups': dict(key='auto_backup_enabled', convert_to='bool'),
"cost_per_month": dict(convert_to='float'),
"current_bandwidth_gb": dict(convert_to='float'),
Expand Down