Remove unused methods from subclouds API and dcorch
This commit removes the unused methods _determine_version_cap and _get_subcloud_users from the subclouds API and dcorch. Test plan: 1. PASS: Run tox successfully 2. PASS: Confirm that there are no references to the removed code 3. PASS: Deploy a subcloud Story: 2007082 Task: 51262 Change-Id: I697eca02fc6c7c33d07cf4cf5cec13b6c541f173 Signed-off-by: Raphael Lima <Raphael.Lima@windriver.com>
This commit is contained in:
parent
d86c17cbdd
commit
0b47eaac6a
@ -44,11 +44,6 @@ class UsersController(object):
|
||||
def __init__(self):
|
||||
super(UsersController, self).__init__()
|
||||
|
||||
# to do the version compatibility for future purpose
|
||||
def _determine_version_cap(self, target):
|
||||
version_cap = 1.0
|
||||
return version_cap
|
||||
|
||||
@expose(generic=True, template="json")
|
||||
def index(self):
|
||||
# Route the request to specific methods with parameters
|
||||
@ -140,11 +135,6 @@ class GroupsController(object):
|
||||
def __init__(self):
|
||||
super(GroupsController, self).__init__()
|
||||
|
||||
# to do the version compatibility for future purpose
|
||||
def _determine_version_cap(self, target):
|
||||
version_cap = 1.0
|
||||
return version_cap
|
||||
|
||||
@expose(generic=True, template="json")
|
||||
def index(self):
|
||||
# Route the request to specific methods with parameters
|
||||
|
@ -44,11 +44,6 @@ class ProjectsController(object):
|
||||
def __init__(self):
|
||||
super(ProjectsController, self).__init__()
|
||||
|
||||
# to do the version compatibility for future purpose
|
||||
def _determine_version_cap(self, target):
|
||||
version_cap = 1.0
|
||||
return version_cap
|
||||
|
||||
@expose(generic=True, template="json")
|
||||
def index(self):
|
||||
# Route the request to specific methods with parameters
|
||||
|
@ -44,11 +44,6 @@ class RolesController(object):
|
||||
def __init__(self):
|
||||
super(RolesController, self).__init__()
|
||||
|
||||
# to do the version compatibility for future purpose
|
||||
def _determine_version_cap(self, target):
|
||||
version_cap = 1.0
|
||||
return version_cap
|
||||
|
||||
@expose(generic=True, template="json")
|
||||
def index(self):
|
||||
# Route the request to specific methods with parameters
|
||||
|
@ -45,11 +45,6 @@ class RevokeEventsController(object):
|
||||
def __init__(self):
|
||||
super(RevokeEventsController, self).__init__()
|
||||
|
||||
# to do the version compatibility for future purpose
|
||||
def _determine_version_cap(self, target):
|
||||
version_cap = 1.0
|
||||
return version_cap
|
||||
|
||||
@expose(generic=True, template="json")
|
||||
def index(self):
|
||||
# Route the request to specific methods with parameters
|
||||
|
@ -23,7 +23,6 @@ import os
|
||||
import re
|
||||
|
||||
from fm_api.constants import FM_ALARM_ID_UNSYNCHRONIZED_RESOURCE
|
||||
import keyring
|
||||
from netaddr import IPNetwork
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
@ -91,11 +90,6 @@ class SubcloudsController(object):
|
||||
self.dcmanager_rpc_client = rpc_client.ManagerClient()
|
||||
self.dcmanager_state_rpc_client = rpc_client.SubcloudStateClient()
|
||||
|
||||
# to do the version compatibility for future purpose
|
||||
def _determine_version_cap(self, target):
|
||||
version_cap = 1.0
|
||||
return version_cap
|
||||
|
||||
@expose(generic=True, template="json")
|
||||
def index(self):
|
||||
# Route the request to specific methods with parameters
|
||||
@ -311,36 +305,6 @@ class SubcloudsController(object):
|
||||
None,
|
||||
)
|
||||
|
||||
def _get_subcloud_users(self):
|
||||
"""Get the subcloud users and passwords from keyring"""
|
||||
DEFAULT_SERVICE_PROJECT_NAME = "services"
|
||||
# First entry is openstack user name, second entry is the user stored
|
||||
# in keyring. Not sure why heat_admin uses a different keystone name.
|
||||
SUBCLOUD_USERS = [
|
||||
("sysinv", "sysinv"),
|
||||
("patching", "patching"),
|
||||
("vim", "vim"),
|
||||
("mtce", "mtce"),
|
||||
("fm", "fm"),
|
||||
("barbican", "barbican"),
|
||||
("smapi", "smapi"),
|
||||
("dcdbsync", "dcdbsync"),
|
||||
]
|
||||
|
||||
user_list = list()
|
||||
for user in SUBCLOUD_USERS:
|
||||
password = keyring.get_password(user[1], DEFAULT_SERVICE_PROJECT_NAME)
|
||||
if password:
|
||||
user_dict = dict()
|
||||
user_dict["name"] = user[0]
|
||||
user_dict["password"] = password
|
||||
user_list.append(user_dict)
|
||||
else:
|
||||
LOG.error("User %s not found in keyring as %s" % (user[0], user[1]))
|
||||
pecan.abort(500, _("System configuration error"))
|
||||
|
||||
return user_list
|
||||
|
||||
def _get_deploy_config_sync_status(self, context, subcloud_name, keystone_client):
|
||||
"""Get the deploy configuration insync status of the subcloud"""
|
||||
detected_alarms = None
|
||||
|
@ -39,11 +39,6 @@ class SubcloudController(object):
|
||||
super(SubcloudController, self).__init__(*args, **kwargs)
|
||||
self.rpc_client = rpc_client.EngineWorkerClient()
|
||||
|
||||
# to do the version compatibility for future purpose
|
||||
def _determine_version_cap(self, target):
|
||||
version_cap = 1.0
|
||||
return version_cap
|
||||
|
||||
@expose(generic=True, template="json")
|
||||
def index(self):
|
||||
# Route the request to specific methods with parameters
|
||||
|
Loading…
Reference in New Issue
Block a user