From a37daf96c1766daeb84cf328af9172163975ab4f Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Wed, 6 Apr 2022 12:02:29 -0400 Subject: [PATCH] Remove privsep/hscli This was for a driver that is no longer in the tree. It is also broken -- it refers to an exception class that doesn't exist (exception.UnableToExecuteHyperScaleCmd). Change-Id: I856376aa29e076d501ee19cbb386329017363dad --- cinder/privsep/hscli.py | 44 ----------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 cinder/privsep/hscli.py diff --git a/cinder/privsep/hscli.py b/cinder/privsep/hscli.py deleted file mode 100644 index fcbfd35be09..00000000000 --- a/cinder/privsep/hscli.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 2018 Red Hat, Inc -# Copyright (c) 2017 Veritas Technologies LLC. All rights reserved. -# Copyright 2017 Rackspace Australia -# Copyright 2018 Michael Still and Aptira -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -""" -Helpers for hscli related routines -""" -from oslo_concurrency import processutils as putils -from oslo_log import log as logging - -from cinder import exception -import cinder.privsep - -LOG = logging.getLogger(__name__) - - -@cinder.privsep.sys_admin_pctxt.entrypoint -def hsexecute(cmdarg_json): - - cmd_out = None - cmd_err = None - try: - # call hyperscale cli - (cmd_out, cmd_err) = putils.execute("hscli", cmdarg_json) - except (putils.UnknownArgumentError, putils.ProcessExecutionError, - OSError): - LOG.exception("Exception in running the command for %s", - cmdarg_json) - raise exception.UnableToExecuteHyperScaleCmd(command=cmdarg_json) - - return (cmd_out, cmd_err)