mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
better debug message
also, give Cloud Profile its proper capitalization and some minor formatting consistency updates
This commit is contained in:
parent
83565c55df
commit
bd2b62fa66
1 changed files with 7 additions and 7 deletions
|
@ -1022,7 +1022,7 @@ def _decode_linode_plan_label(label):
|
|||
sizes = avail_sizes()
|
||||
|
||||
if label not in sizes:
|
||||
if "GB" in label:
|
||||
if 'GB' in label:
|
||||
raise SaltCloudException(
|
||||
'Invalid Linode plan ({}) specified - call avail_sizes() for all available options'.format(label)
|
||||
)
|
||||
|
@ -1039,10 +1039,10 @@ def _decode_linode_plan_label(label):
|
|||
plan_size = int(plan[1])
|
||||
except TypeError:
|
||||
plan_size = 0
|
||||
log.debug('Failed to decode user-supplied Linode plan label: %s', label)
|
||||
log.debug('Failed to decode Linode plan label in Cloud Profile: %s', label)
|
||||
|
||||
if plan_type == "Linode" and plan_size == 1024:
|
||||
plan_type = "Nanode"
|
||||
if plan_type == 'Linode' and plan_size == 1024:
|
||||
plan_type = 'Nanode'
|
||||
|
||||
plan_size = plan_size/1024
|
||||
new_label = "{} {}GB".format(plan_type, plan_size)
|
||||
|
@ -1052,9 +1052,9 @@ def _decode_linode_plan_label(label):
|
|||
'Invalid Linode plan ({}) specified - call avail_sizes() for all available options'.format(new_label)
|
||||
)
|
||||
|
||||
log.warning("An outdated Linode plan label was detected in your Cloud profile ({})."
|
||||
" Please update the profile to use"
|
||||
" the new label format ({}) for the requested Linode plan size.".format(label, new_label))
|
||||
log.warning('An outdated Linode plan label was detected in your Cloud Profile ({}).'
|
||||
' Please update the profile to use'
|
||||
' the new label format ({}) for the requested Linode plan size.'.format(label, new_label))
|
||||
|
||||
label = new_label
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue