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
Sandeep Yadav 12 months ago
parent 88cfe404b5
commit 35e3278f6c
  1. 4
  2. 9

@ -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"""

@ -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)