diff --git a/releasenotes/notes/grow-cluster-nic-az-0e0fe4083666c300.yaml b/releasenotes/notes/grow-cluster-nic-az-0e0fe4083666c300.yaml new file mode 100644 index 0000000000..78406abf6a --- /dev/null +++ b/releasenotes/notes/grow-cluster-nic-az-0e0fe4083666c300.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - Pass instance nic and az to cluster grow. Add specific + Fix for mongodb to use the instance nic and az. diff --git a/trove/cluster/models.py b/trove/cluster/models.py index cbfd081048..82ed5fa559 100644 --- a/trove/cluster/models.py +++ b/trove/cluster/models.py @@ -298,6 +298,11 @@ class Cluster(object): instance['volume_size'] = int(node['volume']['size']) if 'modules' in node: instance['modules'] = node['modules'] + if 'nics' in node: + instance['nics'] = node['nics'] + if 'availability_zone' in node: + instance['availability_zone'] = ( + node['availability_zone']) instances.append(instance) return self.grow(instances) elif action == 'shrink': diff --git a/trove/common/strategies/cluster/experimental/mongodb/api.py b/trove/common/strategies/cluster/experimental/mongodb/api.py index 4ea138f05b..9c4ea4f7e5 100644 --- a/trove/common/strategies/cluster/experimental/mongodb/api.py +++ b/trove/common/strategies/cluster/experimental/mongodb/api.py @@ -199,6 +199,8 @@ class MongoDbCluster(models.Cluster): 'query_router']) name = _check_option('name') related_to = _check_option('related_to') + nics = _check_option('nics') + availability_zone = _check_option('availability_zone') unused_keys = list(set(item.keys()).difference(set(used_keys))) if unused_keys: @@ -214,6 +216,10 @@ class MongoDbCluster(models.Cluster): instance['name'] = name if related_to: instance['related_to'] = related_to + if nics: + instance['nics'] = nics + if availability_zone: + instance['availability_zone'] = availability_zone return instance def action(self, context, req, action, param):