summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-15 14:35:52 +0000
committerGerrit Code Review <review@openstack.org>2017-06-15 14:35:52 +0000
commit0e3627252e18b38450b06dfdd08a876016010e58 (patch)
tree31aa0e4ed6487082eb39cef73ff40e07b629e383
parent89cda71a243b207e0e9ba469cbd884bc3199d289 (diff)
parent907de91b55522260d47981d7aac0ad17f240b280 (diff)
Merge "turn on disable_ec2_classic in devstack installation"
-rwxr-xr-xdevstack/plugin.sh1
-rw-r--r--ec2api/api/instance.py2
-rw-r--r--ec2api/api/vpc.py2
3 files changed, 3 insertions, 2 deletions
diff --git a/devstack/plugin.sh b/devstack/plugin.sh
index dd67232..855b849 100755
--- a/devstack/plugin.sh
+++ b/devstack/plugin.sh
@@ -151,6 +151,7 @@ function configure_ec2api_networking {
151 if [[ -n "$ext_net" ]]; then 151 if [[ -n "$ext_net" ]]; then
152 iniset $EC2API_CONF_FILE DEFAULT external_network $ext_net 152 iniset $EC2API_CONF_FILE DEFAULT external_network $ext_net
153 fi 153 fi
154 iniset $EC2API_CONF_FILE DEFAULT disable_ec2_classic True
154} 155}
155 156
156# Entry points 157# Entry points
diff --git a/ec2api/api/instance.py b/ec2api/api/instance.py
index 9d951e9..c6e4f0f 100644
--- a/ec2api/api/instance.py
+++ b/ec2api/api/instance.py
@@ -1030,7 +1030,7 @@ def _populate_parsed_bdm_parameter(bdm, short_root_device_name):
1030 1030
1031def _format_group_set(context, os_security_groups, groups): 1031def _format_group_set(context, os_security_groups, groups):
1032 if not os_security_groups: 1032 if not os_security_groups:
1033 return None 1033 return []
1034 return [{'groupName': sg['name'], 1034 return [{'groupName': sg['name'],
1035 'groupId': groups[sg['name']]} 1035 'groupId': groups[sg['name']]}
1036 for sg in os_security_groups 1036 for sg in os_security_groups
diff --git a/ec2api/api/vpc.py b/ec2api/api/vpc.py
index dba3f98..1babdb7 100644
--- a/ec2api/api/vpc.py
+++ b/ec2api/api/vpc.py
@@ -164,7 +164,7 @@ def _create_vpc(context, cidr_block, is_default=False):
164 164
165 165
166def _check_and_create_default_vpc(context): 166def _check_and_create_default_vpc(context):
167 if CONF.disable_ec2_classic: 167 if CONF.disable_ec2_classic and not context.is_os_admin:
168 for vpc in db_api.get_items(context, 'vpc'): 168 for vpc in db_api.get_items(context, 'vpc'):
169 if vpc.get('is_default'): 169 if vpc.get('is_default'):
170 return vpc 170 return vpc