From 73f86ecbb07ee43862745c1092feacea1edd4a82 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Sat, 10 Jul 2021 15:06:39 -0500 Subject: [PATCH] Remove deprecation warnings for the role command The `role` commands are warning users that they have been deprecated and informing users that they should use the alternative `roles` commands. Sadly, we have no such `roles` plugin, so following the deprecation warning provides false information which results in an error should the command be used. This change removes the deprecations warnings for the `role` commands. If this needs to be refactored later we can; however, given the information is wrong and there's no alternative plugin to use, making the UX bad, we're removing the misinformation. Change-Id: Ie048cdbe52f5b935ddd4b42febb373f9ff96d8d8 Signed-off-by: Kevin Carter (cherry picked from commit f0f1d271a1e35568e0c979aca3442cfad543db96) (cherry picked from commit a88ba3767f518cf4f0cdf678f3ace21a56e4b6fa) (cherry picked from commit 69b9da1e17fa16971180bc09e6fa1fa7b6673617) --- tripleoclient/v1/overcloud_roles.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/tripleoclient/v1/overcloud_roles.py b/tripleoclient/v1/overcloud_roles.py index 3b0037114..4a9cd7b7e 100644 --- a/tripleoclient/v1/overcloud_roles.py +++ b/tripleoclient/v1/overcloud_roles.py @@ -92,29 +92,22 @@ class RolesGenerate(RolesBaseCommand): class RoleList(RolesBaseCommand): - """List availables roles (DEPRECATED). + """List availables roles.""" - Please use "openstack overcloud roles list" instead. - """ def get_parser(self, prog_name): parser = super(RoleList, self).get_parser(prog_name) return parser def take_action(self, parsed_args): self.log.debug('take_action({})'.format(parsed_args)) - self.log.warning('This command is deprecated. Please use "openstack ' - 'overcloud roles list" instead.') roles_path = os.path.realpath(parsed_args.roles_path) roles = rolesutils.get_roles_list_from_directory(roles_path) print('\n'.join(roles)) class RoleShow(RolesBaseCommand): - """Show information about a given role (DEPRECATED). + """Show information about a given role.""" - - Please use "openstack overcloud roles show" intead. - """ def get_parser(self, prog_name): parser = super(RoleShow, self).get_parser(prog_name) parser.add_argument('role', metavar='', @@ -123,8 +116,6 @@ class RoleShow(RolesBaseCommand): def take_action(self, parsed_args): self.log.debug('take_action({})'.format(parsed_args)) - self.log.warning('This command is deprecated. Please use "openstack ' - 'overcloud roles show" instead.') roles_path = os.path.realpath(parsed_args.roles_path) role_name = parsed_args.role file_path = os.path.join(roles_path, '{}.yaml'.format(role_name))