|
|
@ -96,12 +96,17 @@ class RabbitMqParameter(object):
|
|
|
|
component, name, value = param_item.split('\t')
|
|
|
|
component, name, value = param_item.split('\t')
|
|
|
|
|
|
|
|
|
|
|
|
if component == self.component and name == self.name:
|
|
|
|
if component == self.component and name == self.name:
|
|
|
|
self._value = value
|
|
|
|
self._value = json.loads(value)
|
|
|
|
return True
|
|
|
|
return True
|
|
|
|
return False
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
|
|
def set(self):
|
|
|
|
def set(self):
|
|
|
|
self._exec(['set_parameter', '-p', self.vhost, self.component, self.name, self.value])
|
|
|
|
self._exec(['set_parameter',
|
|
|
|
|
|
|
|
'-p',
|
|
|
|
|
|
|
|
self.vhost,
|
|
|
|
|
|
|
|
self.component,
|
|
|
|
|
|
|
|
self.name,
|
|
|
|
|
|
|
|
json.dumps(self.value)])
|
|
|
|
|
|
|
|
|
|
|
|
def delete(self):
|
|
|
|
def delete(self):
|
|
|
|
self._exec(['clear_parameter', '-p', self.vhost, self.component, self.name])
|
|
|
|
self._exec(['clear_parameter', '-p', self.vhost, self.component, self.name])
|
|
|
@ -126,8 +131,8 @@ def main():
|
|
|
|
component = module.params['component']
|
|
|
|
component = module.params['component']
|
|
|
|
name = module.params['name']
|
|
|
|
name = module.params['name']
|
|
|
|
value = module.params['value']
|
|
|
|
value = module.params['value']
|
|
|
|
if not isinstance(value, str):
|
|
|
|
if isinstance(value, str):
|
|
|
|
value = json.dumps(value)
|
|
|
|
value = json.loads(value)
|
|
|
|
vhost = module.params['vhost']
|
|
|
|
vhost = module.params['vhost']
|
|
|
|
state = module.params['state']
|
|
|
|
state = module.params['state']
|
|
|
|
node = module.params['node']
|
|
|
|
node = module.params['node']
|
|
|
|