Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
4b18c467
Commit
4b18c467
authored
Jun 19, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue_7828_rds_param_group' into devel
parents
d0dd4ac1
853471f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
5 deletions
+19
-5
library/cloud/rds_param_group
+19
-5
No files found.
library/cloud/rds_param_group
View file @
4b18c467
...
...
@@ -159,10 +159,15 @@ def set_parameter(param, value, immediate):
elif
param
.
type
==
'integer'
:
if
isinstance
(
value
,
basestring
):
for
modifier
in
INT_MODIFIERS
.
keys
():
if
value
.
endswith
(
modifier
):
converted_value
=
int
(
value
[:
-
1
])
*
INT_MODIFIERS
[
modifier
]
converted_value
=
int
(
converted_value
)
try
:
for
modifier
in
INT_MODIFIERS
.
keys
():
if
value
.
endswith
(
modifier
):
converted_value
=
int
(
value
[:
-
1
])
*
INT_MODIFIERS
[
modifier
]
converted_value
=
int
(
converted_value
)
except
ValueError
:
# may be based on a variable (ie. {foo*3/4}) so
# just pass it on through to boto
converted_value
=
str
(
value
)
elif
type
(
value
)
==
bool
:
converted_value
=
1
if
value
else
0
else
:
...
...
@@ -190,7 +195,16 @@ def modify_group(group, params, immediate=False):
param
=
group
[
key
]
new_value
=
new_params
[
key
]
if
param
.
value
!=
new_value
:
try
:
old_value
=
param
.
value
except
ValueError
:
# some versions of boto have problems with retrieving
# integer values from params that may have their value
# based on a variable (ie. {foo*3/4}), so grab it in a
# way that bypasses the property functions
old_value
=
param
.
_value
if
old_value
!=
new_value
:
if
not
param
.
is_modifiable
:
raise
NotModifiableError
(
'Parameter
%
s is not modifiable.'
%
key
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment