Merge "Fixed auto security group for nova network"

This commit is contained in:
Jenkins 2014-12-12 22:05:59 +00:00 committed by Gerrit Code Review
commit f05ddf097a
4 changed files with 11 additions and 13 deletions

View File

@ -1,8 +1,7 @@
"%(security_group_name)s": {
"Type": "OS::Neutron::SecurityGroup",
"%(security_group_name)s": {
"Type": "AWS::EC2::SecurityGroup",
"Properties": {
"description": "%(security_group_description)s",
"name": "%(security_group_name)s",
"rules": %(rules)s
"GroupDescription": "%(security_group_description)s",
"SecurityGroupIngress": %(rules)s
}
}

View File

@ -33,7 +33,7 @@ LOG = logging.getLogger(__name__)
class HeatEngine(e.Engine):
def get_type_and_version(self):
return "heat.1.0"
return "heat.1.1"
def _add_volumes(self, ctx, cluster):
for instance in g.get_instances(cluster):

View File

@ -73,9 +73,7 @@ class HDP2GatingTest(swift.SwiftTest, scaling.ScalingTest,
'description': 'test node group template for HDP plugin',
'node_processes': self.hdp2_config.WORKER_NODE_PROCESSES,
'floating_ip_pool': self.floating_ip_pool,
# TODO(sreshetniak): Enable auto security group when #1392738 is
# resolved
'auto_security_group': False,
'auto_security_group': True,
'node_configs': {}
}
self.ng_tmpl_nm_dn_id = self.create_node_group_template(**template)

View File

@ -17,6 +17,7 @@ import json
from heatclient import client as heat_client
from oslo.config import cfg
import six
from sahara import context
from sahara import exceptions as ex
@ -178,10 +179,10 @@ class ClusterTemplate(object):
def _serialize_auto_security_group_rules(self, ng):
create_rule = lambda cidr, proto, from_port, to_port: {
'remote_ip_prefix': cidr,
'protocol': proto,
'port_range_min': from_port,
'port_range_max': to_port}
"CidrIp": cidr,
"IpProtocol": proto,
"FromPort": six.text_type(from_port),
"ToPort": six.text_type(to_port)}
rules = []
for port in ng.open_ports: