Assign node to cluster with network template
Don't need to assign nics and bonds to netgroups if network template has been applied to new cluster. Change-Id: Ibd06de87964bf7a2038899d32e3d8a0189b9cbbd Partial-bug: 1584044
This commit is contained in:
parent
fdd2a62264
commit
56dc7c1f8f
|
@ -58,6 +58,10 @@ class NailgunClusterAdapter(object):
|
|||
def editable_attrs(self):
|
||||
return self.cluster.attributes.editable
|
||||
|
||||
@property
|
||||
def network_template(self):
|
||||
return self.cluster.network_config.configuration_template
|
||||
|
||||
@editable_attrs.setter
|
||||
def editable_attrs(self, attrs):
|
||||
self.cluster.attributes.editable = attrs
|
||||
|
|
|
@ -218,10 +218,13 @@ class UpgradeHelper(object):
|
|||
|
||||
node.update_cluster_assignment(seed_cluster, roles, pending_roles)
|
||||
objects.Node.set_netgroups_ids(node, netgroups_id_mapping)
|
||||
orig_manager.set_nic_assignment_netgroups_ids(
|
||||
node, netgroups_id_mapping)
|
||||
orig_manager.set_bond_assignment_netgroups_ids(
|
||||
node, netgroups_id_mapping)
|
||||
|
||||
if not seed_cluster.network_template:
|
||||
orig_manager.set_nic_assignment_netgroups_ids(
|
||||
node, netgroups_id_mapping)
|
||||
orig_manager.set_bond_assignment_netgroups_ids(
|
||||
node, netgroups_id_mapping)
|
||||
|
||||
node.add_pending_change(consts.CLUSTER_CHANGES.interfaces)
|
||||
|
||||
@classmethod
|
||||
|
|
Loading…
Reference in New Issue