From 35e3278f6c1e7d292b5a50401463e5ccbfc7efb2 Mon Sep 17 00:00:00 2001 From: Sandeep Yadav Date: Fri, 15 Oct 2021 13:49:06 +0530 Subject: [PATCH] Drop validate_playbook method from ProvisionNode In commit[1] we removed the use of validate_playbook method, but it was missed to remove the method definition, removing this as its not used anywhere. Also, dropping PlaybookNotFound exception as its not used anywhere else. [1] https://review.opendev.org/c/openstack/python-tripleoclient/+/794017 Change-Id: Ia646351cfe60d328b809af56ed5a05ec74e46cd5 --- tripleoclient/exceptions.py | 4 ---- tripleoclient/v2/overcloud_node.py | 9 --------- 2 files changed, 13 deletions(-) diff --git a/tripleoclient/exceptions.py b/tripleoclient/exceptions.py index caa9f63cd..aac367bc7 100644 --- a/tripleoclient/exceptions.py +++ b/tripleoclient/exceptions.py @@ -141,9 +141,5 @@ class HeatPodMessageQueueException(Base): """Heat messaging queue not created""" -class PlaybookNotFound(NotFound): - """Playbook not found""" - - class InvalidPlaybook(Base): """Invalid playbook path specified""" diff --git a/tripleoclient/v2/overcloud_node.py b/tripleoclient/v2/overcloud_node.py index 27ddeeb69..2b12bedbd 100644 --- a/tripleoclient/v2/overcloud_node.py +++ b/tripleoclient/v2/overcloud_node.py @@ -28,7 +28,6 @@ import yaml from tripleoclient import command from tripleoclient import constants -from tripleoclient import exceptions from tripleoclient import utils as oooutils from tripleoclient.workflows import baremetal @@ -282,14 +281,6 @@ class ProvisionNode(command.Command): return parser - def _validate_playbook(self, playbook_path): - if not os.path.exists(playbook_path): - raise exceptions.PlaybookNotFound( - 'Playbook file {} not found.'.format(playbook_path)) - if not os.path.isfile(playbook_path): - raise exceptions.InvalidPlaybook( - 'Playbook {} is not a file.'.format(playbook_path)) - def take_action(self, parsed_args): self.log.debug("take_action(%s)" % parsed_args)