diff --git a/octane/commands/install_node.py b/octane/commands/install_node.py index dd4245b0..cd91a361 100644 --- a/octane/commands/install_node.py +++ b/octane/commands/install_node.py @@ -53,14 +53,17 @@ def update_node_settings(node, disks_fixture, ifaces_fixture): LOG.warn("To keep custom volumes layout, change DEFAULT_DISKS const " "in magic_consts.py module") - LOG.info("Updating node %s network settings with fixture: %s", - str(node.id), ifaces_fixture) - ifaces = node.get_attribute('interfaces') - LOG.info("Original node %s network settings: %s", - str(node.id), ifaces) - new_ifaces = list(copy_ifaces(ifaces_fixture, ifaces)) - LOG.info("New interfaces info generated: %s", new_ifaces) - node.upload_node_attribute('interfaces', new_ifaces) + if not magic_consts.DEFAULT_NETS: + LOG.info("Updating node %s network settings with fixture: %s", + str(node.id), ifaces_fixture) + ifaces = node.get_attribute('interfaces') + LOG.info("Original node %s network settings: %s", + str(node.id), ifaces) + new_ifaces = list(copy_ifaces(ifaces_fixture, ifaces)) + LOG.info("New interfaces info generated: %s", new_ifaces) + node.upload_node_attribute('interfaces', new_ifaces) + else: + LOG.warn("Using default networks for node %s", node) def install_node(orig_id, seed_id, node_ids, isolated=False): diff --git a/octane/magic_consts.py b/octane/magic_consts.py index 450a0b27..c4e26830 100644 --- a/octane/magic_consts.py +++ b/octane/magic_consts.py @@ -23,3 +23,4 @@ SSH_KEYS = ['/root/.ssh/id_rsa', '/root/.ssh/bootstrap.rsa'] OS_SERVICES = ["nova", "keystone", "heat", "neutron", "cinder", "glance"] BRIDGES = ['br-ex', 'br-mgmt'] DEFAULT_DISKS = True +DEFAULT_NETS = True