Moved exceptions.py and utils.py up to plugins dir

Plugins dir contains 'general' module which looks like yet another
plugin along with vanilla, fake, hdp, spark and cdh. But it doesn't
and contains two files only. Moved them one level up to avoid such
confusion.

Closes-Bug: #1378178

Change-Id: Ia600e4c584d48a3227552f0051cc3bf906206bed
This commit is contained in:
Alexander Ignatov 2014-10-06 20:11:18 +04:00
parent 4d3d9cfa9f
commit 1a9bf1f24e
40 changed files with 52 additions and 52 deletions

View File

@ -25,7 +25,7 @@ except ImportError:
from sahara.i18n import _
from sahara.plugins.cdh import utils as pu
from sahara.plugins.general import exceptions as ex
from sahara.plugins import exceptions as ex
CM_DEFAULT_USERNAME = 'admin'
CM_DEFAULT_PASSWD = 'admin'

View File

@ -14,7 +14,7 @@
# limitations under the License.
from sahara.i18n import _
from sahara.plugins.general import exceptions as ex
from sahara.plugins import exceptions as ex
def _root(remote, cmd, **kwargs):

View File

@ -26,8 +26,8 @@ from sahara.plugins.cdh import cloudera_utils as cu
from sahara.plugins.cdh import commands as cmd
from sahara.plugins.cdh import config_helper as c_helper
from sahara.plugins.cdh import utils as pu
from sahara.plugins.general import exceptions as ex
from sahara.plugins.general import utils as gu
from sahara.plugins import exceptions as ex
from sahara.plugins import utils as gu
from sahara.swift import swift_helper
from sahara.utils import xmlutils

View File

@ -14,8 +14,8 @@
# limitations under the License.
from sahara.plugins.cdh import utils as cu
from sahara.plugins.general import exceptions as ex
from sahara.plugins.general import utils as u
from sahara.plugins import exceptions as ex
from sahara.plugins import utils as u
from sahara.service.edp import hdfs_helper
from sahara.service.edp.oozie import engine as edp_engine

View File

@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from sahara.plugins.general import utils as u
from sahara.plugins import utils as u
def get_manager(cluster):

View File

@ -18,8 +18,8 @@ from sahara.i18n import _LE
from sahara.openstack.common import log as logging
from sahara.plugins.cdh import cloudera_utils as cmu
from sahara.plugins.cdh import utils as cu
from sahara.plugins.general import exceptions as ex
from sahara.plugins.general import utils as u
from sahara.plugins import exceptions as ex
from sahara.plugins import utils as u
from sahara.utils import general as gu
LOG = logging.getLogger(__name__)

View File

@ -20,7 +20,7 @@ from sahara import context
from sahara.i18n import _
from sahara.i18n import _LI
from sahara.openstack.common import log as logging
from sahara.plugins.general import exceptions as ex
from sahara.plugins import exceptions as ex
from sahara.plugins.hdp import hadoopserver as h
from sahara.plugins.hdp import saharautils as utils
from sahara.plugins.hdp.versions import versionhandlerfactory as vhf

View File

@ -17,7 +17,7 @@ from oslo.serialization import jsonutils as json
from sahara.i18n import _
from sahara.openstack.common import log as logging
from sahara.plugins.general import exceptions as ex
from sahara.plugins import exceptions as ex
from sahara.plugins.hdp.versions import versionhandlerfactory as vhf

View File

@ -13,8 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from sahara.plugins.general import exceptions as ex
from sahara.plugins.general import utils as u
from sahara.plugins import exceptions as ex
from sahara.plugins import utils as u
from sahara.service.edp.oozie import engine as edp_engine

View File

@ -18,7 +18,7 @@ import re
from sahara.i18n import _
from sahara.i18n import _LI
from sahara.openstack.common import log as logging
from sahara.plugins.general import exceptions as ex
from sahara.plugins import exceptions as ex
from sahara.plugins.hdp import saharautils
from sahara.utils import files as f

View File

@ -21,8 +21,8 @@ import six
from sahara import exceptions as e
from sahara.i18n import _
from sahara.plugins.general import exceptions as ex
from sahara.plugins.general import utils
from sahara.plugins import exceptions as ex
from sahara.plugins import utils
from sahara.swift import swift_helper as h
from sahara.topology import topology_helper as th

View File

@ -26,7 +26,7 @@ from sahara.i18n import _LC
from sahara.i18n import _LE
from sahara.i18n import _LI
from sahara.i18n import _LW
from sahara.plugins.general import exceptions as ex
from sahara.plugins import exceptions as ex
from sahara.plugins.hdp import clusterspec as cs
from sahara.plugins.hdp import configprovider as cfgprov
from sahara.plugins.hdp.versions import abstractversionhandler as avm

View File

@ -23,8 +23,8 @@ from sahara.i18n import _
from sahara.i18n import _LI
from sahara.i18n import _LW
from sahara.openstack.common import log as logging
from sahara.plugins.general import exceptions as ex
from sahara.plugins.general import utils
from sahara.plugins import exceptions as ex
from sahara.plugins import utils
from sahara.swift import swift_helper as h
from sahara.topology import topology_helper as th

View File

@ -26,7 +26,7 @@ from sahara.i18n import _LC
from sahara.i18n import _LE
from sahara.i18n import _LI
from sahara.i18n import _LW
from sahara.plugins.general import exceptions as ex
from sahara.plugins import exceptions as ex
from sahara.plugins.hdp import clusterspec as cs
from sahara.plugins.hdp import configprovider as cfgprov
from sahara.plugins.hdp.versions import abstractversionhandler as avm

View File

@ -19,8 +19,8 @@ from sahara import conductor as c
from sahara.i18n import _
from sahara.i18n import _LI
from sahara.openstack.common import log as logging
from sahara.plugins.general import utils
from sahara.plugins import provisioning as p
from sahara.plugins import utils
from sahara.topology import topology_helper as topology
from sahara.utils import types as types
from sahara.utils import xmlutils as x

View File

@ -22,13 +22,13 @@ from sahara import context
from sahara.i18n import _
from sahara.i18n import _LI
from sahara.openstack.common import log as logging
from sahara.plugins.general import exceptions as ex
from sahara.plugins.general import utils
from sahara.plugins import exceptions as ex
from sahara.plugins import provisioning as p
from sahara.plugins.spark import config_helper as c_helper
from sahara.plugins.spark import edp_engine
from sahara.plugins.spark import run_scripts as run
from sahara.plugins.spark import scaling as sc
from sahara.plugins import utils
from sahara.topology import topology_helper as th
from sahara.utils import files as f
from sahara.utils import general as ug

View File

@ -20,10 +20,10 @@ import six
from sahara import context
from sahara.i18n import _
from sahara.plugins.general import exceptions as ex
from sahara.plugins.general import utils
from sahara.plugins import exceptions as ex
from sahara.plugins.spark import config_helper as c_helper
from sahara.plugins.spark import run_scripts as run
from sahara.plugins import utils
from sahara.utils import remote

View File

@ -17,7 +17,7 @@ from oslo.utils import netutils
from six.moves.urllib import parse as urlparse
from sahara.i18n import _
from sahara.plugins.general import exceptions as ex
from sahara.plugins import exceptions as ex
def get_node_groups(cluster, node_process=None):

View File

@ -13,8 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from sahara.plugins.general import exceptions as ex
from sahara.plugins.general import utils as u
from sahara.plugins import exceptions as ex
from sahara.plugins import utils as u
from sahara.plugins.vanilla import utils as vu
from sahara.service.edp.oozie import engine as edp_engine

View File

@ -17,7 +17,7 @@ from sahara import context
from sahara.i18n import _
from sahara.i18n import _LI
from sahara.openstack.common import log as logging
from sahara.plugins.general import exceptions as ex
from sahara.plugins import exceptions as ex
from sahara.plugins.vanilla.hadoop2 import config_helper as c_helper
from sahara.plugins.vanilla import utils as vu
from sahara.utils import files

View File

@ -17,8 +17,8 @@ from oslo.utils import timeutils
from sahara import context
from sahara.i18n import _
from sahara.plugins.general import exceptions as ex
from sahara.plugins.general import utils as u
from sahara.plugins import exceptions as ex
from sahara.plugins import utils as u
from sahara.plugins.vanilla.hadoop2 import config
from sahara.plugins.vanilla.hadoop2 import run_scripts as run
from sahara.plugins.vanilla.hadoop2 import utils as pu

View File

@ -14,8 +14,8 @@
# limitations under the License.
from sahara.i18n import _
from sahara.plugins.general import exceptions as ex
from sahara.plugins.general import utils as u
from sahara.plugins import exceptions as ex
from sahara.plugins import utils as u
from sahara.plugins.vanilla.hadoop2 import config_helper as cu
from sahara.plugins.vanilla import utils as vu
from sahara.utils import general as gu

View File

@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from sahara.plugins.general import utils as u
from sahara.plugins import utils as u
def get_namenode(cluster):

View File

@ -22,8 +22,8 @@ from sahara.i18n import _
from sahara.i18n import _LI
from sahara.i18n import _LW
from sahara.openstack.common import log as logging
from sahara.plugins.general import utils
from sahara.plugins import provisioning as p
from sahara.plugins import utils
from sahara.plugins.vanilla import utils as vu
from sahara.plugins.vanilla.v1_2_1 import mysql_helper as m_h
from sahara.plugins.vanilla.v1_2_1 import oozie_helper as o_h

View File

@ -20,8 +20,8 @@ import six
from sahara import context
from sahara.i18n import _
from sahara.plugins.general import exceptions as ex
from sahara.plugins.general import utils
from sahara.plugins import exceptions as ex
from sahara.plugins import utils
from sahara.plugins.vanilla.v1_2_1 import config_helper
from sahara.plugins.vanilla.v1_2_1 import run_scripts as run
from sahara.utils import remote

View File

@ -23,8 +23,8 @@ from sahara import context
from sahara.i18n import _
from sahara.i18n import _LI
from sahara.openstack.common import log as logging
from sahara.plugins.general import exceptions as ex
from sahara.plugins.general import utils
from sahara.plugins import exceptions as ex
from sahara.plugins import utils
from sahara.plugins.vanilla import abstractversionhandler as avm
from sahara.plugins.vanilla import utils as vu
from sahara.plugins.vanilla.v1_2_1 import config_helper as c_helper

View File

@ -20,7 +20,7 @@ from sahara import context
from sahara import exceptions as ex
from sahara.i18n import _
from sahara.openstack.common import log as logging
from sahara.plugins.general import utils
from sahara.plugins import utils
from sahara.plugins.vanilla import abstractversionhandler as avm
from sahara.plugins.vanilla.hadoop2 import config as c
from sahara.plugins.vanilla.hadoop2 import edp_engine

View File

@ -18,7 +18,7 @@ from oslo.config import cfg
from sahara import conductor
from sahara import context
from sahara.openstack.common import log as logging
from sahara.plugins.general import utils
from sahara.plugins import utils
from sahara.plugins.vanilla import abstractversionhandler as avm
from sahara.plugins.vanilla.hadoop2 import config as c
from sahara.plugins.vanilla.hadoop2 import edp_engine

View File

@ -20,7 +20,7 @@ from six.moves.urllib import parse as urlparse
from sahara import conductor as c
from sahara import context
from sahara.plugins.general import utils as u
from sahara.plugins import utils as u
from sahara.utils import general as g

View File

@ -19,8 +19,8 @@ from sahara import conductor as c
from sahara import context
from sahara import exceptions as e
from sahara.i18n import _
from sahara.plugins.general import utils as plugin_utils
from sahara.plugins.spark import config_helper as c_helper
from sahara.plugins import utils as plugin_utils
from sahara.service.edp import base_engine
from sahara.service.edp import job_utils
from sahara.service.validations.edp import job_execution as j

View File

@ -15,8 +15,8 @@
import testtools
from sahara.plugins.general import exceptions as ex
from sahara.plugins.general import utils as u
from sahara.plugins import exceptions as ex
from sahara.plugins import utils as u
from sahara.tests.unit import testutils as tu

View File

@ -19,7 +19,7 @@ import testtools
from sahara.conductor import resource as r
from sahara.plugins import base as pb
from sahara.plugins.general import exceptions as ex
from sahara.plugins import exceptions as ex
from sahara.plugins.hdp import ambariplugin as ap
from sahara.plugins.hdp import clusterspec as cs
from sahara.tests.unit import base as sahara_base

View File

@ -16,7 +16,7 @@
import mock
import pkg_resources as pkg
from sahara.plugins.general import exceptions as ex
from sahara.plugins import exceptions as ex
from sahara.plugins.hdp import clusterspec as cs
from sahara.plugins.hdp import hadoopserver
from sahara.plugins.hdp.versions.version_1_3_2 import services as s

View File

@ -16,7 +16,7 @@
import mock
import pkg_resources as pkg
from sahara.plugins.general import exceptions as ex
from sahara.plugins import exceptions as ex
from sahara.plugins.hdp import clusterspec as cs
from sahara.plugins.hdp.versions.version_2_0_6 import services as s2
from sahara.plugins import provisioning

View File

@ -16,7 +16,7 @@
import mock
from sahara import exceptions as e
from sahara.plugins.general import exceptions as ex
from sahara.plugins import exceptions as ex
from sahara.plugins.hdp.versions import versionhandlerfactory as vhf
from sahara.tests.unit import base
from sahara.tests.unit.plugins.hdp import hdp_test_base

View File

@ -15,7 +15,7 @@
import testtools
from sahara.plugins.general import exceptions as ex
from sahara.plugins import exceptions as ex
from sahara.plugins.vanilla import plugin as p
from sahara.tests.unit import base
from sahara.tests.unit import testutils as tu

View File

@ -20,7 +20,7 @@ from sahara import conductor as cond
from sahara import context
from sahara import exceptions as e
from sahara.plugins import base as pb
from sahara.plugins.general import exceptions as ex
from sahara.plugins import exceptions as ex
from sahara.plugins.vanilla import plugin as p
from sahara.plugins.vanilla.v1_2_1 import config_helper as c_h
from sahara.plugins.vanilla.v1_2_1 import mysql_helper as m_h

View File

@ -315,7 +315,7 @@ class TestSpark(base.SaharaTestCase):
"/wfdir/jar2.jar"])
@mock.patch('sahara.service.edp.job_utils.create_workflow_dir',
return_value="/wfdir")
@mock.patch('sahara.plugins.general.utils.get_instance')
@mock.patch('sahara.plugins.utils.get_instance')
@mock.patch('sahara.conductor.API.job_get')
@mock.patch('sahara.context.ctx', return_value="ctx")
def test_run_job(self, ctx, job_get, get_instance, create_workflow_dir,