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

Commit

Permalink
Support float for "allowed_bandwidth_gb" parameter in server info API…
Browse files Browse the repository at this point in the history
…s response. (#35)
  • Loading branch information
alexander-gridnev authored Jan 23, 2023
1 parent ad5d948 commit eefe151
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
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

0 comments on commit eefe151

Please sign in to comment.