diff options
author | 2017-03-15 14:31:36 +0800 | |
---|---|---|
committer | 2017-03-15 15:55:09 +0800 | |
commit | e62117170f9dd562cdb85bf6bd95644655e046c2 (patch) | |
tree | 05a4e983534f1687f6d7b96b805eae7130bd08ed /deploy/config/network.py | |
parent | c557362eb2a14055587feac228a4463bd96f6f4a (diff) |
add default_floating_pool configuration for nova-api
Change-Id: I9db5509667e9c10a9c07b55531c6d78fb95cc223
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'deploy/config/network.py')
-rw-r--r-- | deploy/config/network.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/deploy/config/network.py b/deploy/config/network.py new file mode 100644 index 00000000..ed14f95b --- /dev/null +++ b/deploy/config/network.py @@ -0,0 +1,20 @@ +import yaml + +from deploy.common import query + + +class NetworkConfig(object): + def __init__(self, network_file): + self._file = network_file + self._get_config() + + def _get_config(self): + self.config = yaml.safe_load(file(self._file)) + + def _get_network(self, name): + return query.find(lambda item: item['name'] == name, + self.config['networks']) + + @property + def external_network(self): + return self._get_network('EXTERNAL') |