Add describe_parameters support
This commit is contained in:
parent
b0fe1d8eae
commit
c118d12e6f
@ -46,6 +46,12 @@ class SimpleSystemManagerBackend(BaseBackend):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def get_all_parameters(self):
|
||||||
|
result = []
|
||||||
|
for k, _ in self._parameters.iteritems():
|
||||||
|
result.append(self._parameters[k])
|
||||||
|
return result
|
||||||
|
|
||||||
def get_parameters(self, names, with_decryption):
|
def get_parameters(self, names, with_decryption):
|
||||||
result = []
|
result = []
|
||||||
for name in names:
|
for name in names:
|
||||||
|
@ -43,6 +43,20 @@ class SimpleSystemManagerResponse(BaseResponse):
|
|||||||
|
|
||||||
return json.dumps(response)
|
return json.dumps(response)
|
||||||
|
|
||||||
|
def describe_parameters(self):
|
||||||
|
# filters = self._get_param('Filters')
|
||||||
|
result = self.ssm_backend.get_all_parameters()
|
||||||
|
|
||||||
|
response = {
|
||||||
|
'Parameters': [],
|
||||||
|
}
|
||||||
|
|
||||||
|
for parameter in result:
|
||||||
|
param_data = parameter.response_object(False)
|
||||||
|
response['Parameters'].append(param_data)
|
||||||
|
|
||||||
|
return json.dumps(response)
|
||||||
|
|
||||||
def put_parameter(self):
|
def put_parameter(self):
|
||||||
name = self._get_param('Name')
|
name = self._get_param('Name')
|
||||||
description = self._get_param('Description')
|
description = self._get_param('Description')
|
||||||
|
2
setup.py
2
setup.py
@ -24,7 +24,7 @@ extras_require = {
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='moto',
|
name='moto',
|
||||||
version='1.0.1',
|
version='1.0.1.1',
|
||||||
description='A library that allows your python tests to easily'
|
description='A library that allows your python tests to easily'
|
||||||
' mock out the boto library',
|
' mock out the boto library',
|
||||||
author='Steve Pulec',
|
author='Steve Pulec',
|
||||||
|
Loading…
Reference in New Issue
Block a user