Merge "remove ec2 in service and cmd"

This commit is contained in:
Zuul 2018-04-17 06:20:23 +00:00 committed by Gerrit Code Review
commit 09af976016
5 changed files with 4 additions and 15 deletions

View File

@ -65,7 +65,7 @@ class AvailabilityZoneController(wsgi.Controller):
zone_hosts = {}
host_services = {}
api_services = ('nova-osapi_compute', 'nova-ec2', 'nova-metadata')
api_services = ('nova-osapi_compute', 'nova-metadata')
for service in enabled_services:
if service.binary in api_services:
# Skip API services in the listing since they are not

View File

@ -88,7 +88,7 @@ class HostController(wsgi.Controller):
services = self.api.service_get_all(context, filters=filters,
set_zones=True, all_cells=True)
hosts = []
api_services = ('nova-osapi_compute', 'nova-ec2', 'nova-metadata')
api_services = ('nova-osapi_compute', 'nova-metadata')
for service in services:
if service.binary not in api_services:
hosts.append({'host_name': service['host'],

View File

@ -45,7 +45,7 @@ class ServiceController(wsgi.Controller):
# The API services are filtered out since they are not RPC services
# and therefore their state is not reported through the service group
# API, so they would always be reported as 'down' (see bug 1543625).
api_services = ('nova-osapi_compute', 'nova-ec2', 'nova-metadata')
api_services = ('nova-osapi_compute', 'nova-metadata')
context = req.environ['nova.context']
context.can(services_policies.BASE_POLICY_NAME)

View File

@ -44,7 +44,6 @@ import six
import six.moves.urllib.parse as urlparse
from sqlalchemy.engine import url as sqla_url
from nova.api.ec2 import ec2utils
from nova.cmd import common as cmd_common
import nova.conf
from nova import config
@ -83,16 +82,6 @@ args = cmd_common.args
action_description = cmd_common.action_description
def param2id(object_id):
"""Helper function to convert various volume id types to internal id.
args: [object_id], e.g. 'vol-0000000a' or 'volume-0000000a' or '10'
"""
if '-' in object_id:
return ec2utils.ec2_vol_id_to_uuid(object_id)
else:
return object_id
def mask_passwd_in_url(url):
parsed = urlparse.urlparse(url)
safe_netloc = re.sub(':.*@', ':****@', parsed.netloc)

View File

@ -322,7 +322,7 @@ class WSGIService(service.Service):
"""
self.name = name
# NOTE(danms): Name can be metadata, osapi_compute, or ec2, per
# NOTE(danms): Name can be metadata, osapi_compute, per
# nova.service's enabled_apis
self.binary = 'nova-%s' % name
self.topic = None