Skip networks settings updating for nodes

Network template uploading disables opportunity to change
network configuration for nodes
This commit is contained in:
smurashov 2015-08-31 10:47:44 +03:00
parent b22fb5ef9b
commit 167f910b56
2 changed files with 12 additions and 8 deletions

View File

@ -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):

View File

@ -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