Files
python-fuelclient/fuelclient/tests/utils/fake_openstack_config.py
Alexander Saprykin 88274ba134 Implement CLI v1 for openstack configuration
Add openstack-config commands for fuel
Examples for fuel:

fuel openstack-config --env 1 --list
fuel openstack-config --env 1 [--node 1 | --role controller] --upload
    --file config.yaml
fuel openstack-config --config 1 --download --file config.yaml
fuel openstack-config --env 1 [--node 1 | --role controller] --execute

Change-Id: Id701d4b8408bd275ac6e7bc53ca23b9f3deb4f6d
Implements: blueprint openstack-config-change
2015-11-30 15:30:38 +02:00

40 lines
1.3 KiB
Python

# Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
def get_fake_openstack_config(
id=None, config_type=None, cluster_id=None, node_id=None,
node_role=None, configuration=None):
config = {
'id': id or 42,
'is_active': True,
'config_type': config_type or 'cluster',
'cluster_id': cluster_id or 84,
'node_id': node_id or None,
'node_role': node_role or None,
'configuration': configuration or {
'nova_config': {
'DEFAULT/debug': {
'value': True,
},
},
'keystone_config': {
'DEFAULT/debug': {
'value': True,
},
},
},
}
return config