parse = common.parse
err = common.err
check_file_exists = common.check_file_exists
-LOG = common.LOG
+log = common.log
class ConfigureNetwork(object):
self.required_networks = []
def download_network_config(self):
- LOG.debug('Download network config for environment %s\n' % self.env_id)
+ log('Download network config for environment %s' % self.env_id)
exec_cmd('fuel network --env %s --download --dir %s'
% (self.env_id, self.yaml_config_dir))
def upload_network_config(self):
- LOG.debug('Upload network config for environment %s\n' % self.env_id)
+ log('Upload network config for environment %s' % self.env_id)
exec_cmd('fuel network --env %s --upload --dir %s'
% (self.env_id, self.yaml_config_dir))
def config_network(self):
- LOG.debug('Configure network\n')
+ log('Configure network')
self.download_network_config()
self.modify_network_config()
self.upload_network_config()
def modify_network_config(self):
- LOG.debug('Modify network config for environment %s\n' % self.env_id)
- network_yaml = (self.yaml_config_dir + '/network_%s.yaml'
- % self.env_id)
+ log('Modify network config for environment %s' % self.env_id)
+ network_yaml = ('%s/network_%s.yaml'
+ % (self.yaml_config_dir, self.env_id))
check_file_exists(network_yaml)
- network_config = self.dea.get_networks()
-
+ network_config = self.dea.get_property('network')
with io.open(network_yaml) as stream:
network = yaml.load(stream)