Fix the issue while runing KB from PyPI installation
Change-Id: If295fd1c37481b31c08910a0eb3eb8b893dd40e3
This commit is contained in:
parent
93e2304a51
commit
d2378fd207
@ -15,20 +15,15 @@
|
||||
import functools
|
||||
import hashlib
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
import traceback
|
||||
kb_main_path = os.path.split(os.path.abspath(__file__))[0] + "/../../../kloudbuster"
|
||||
sys.path.append(kb_main_path)
|
||||
|
||||
from attrdict import AttrDict
|
||||
from credentials import Credentials
|
||||
from kb_session import KBSession
|
||||
from kb_session import KBSessionManager
|
||||
import log as logging
|
||||
|
||||
from kb_config import KBConfig
|
||||
from kloudbuster import KloudBuster
|
||||
from kloudbuster.credentials import Credentials
|
||||
from kloudbuster.kb_config import KBConfig
|
||||
from kloudbuster.kloudbuster import KloudBuster
|
||||
import kloudbuster.log as logging
|
||||
from pecan import expose
|
||||
from pecan import response
|
||||
|
||||
|
@ -15,15 +15,11 @@
|
||||
import functools
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import threading
|
||||
import traceback
|
||||
kb_main_path = os.path.split(os.path.abspath(__file__))[0] + "/../../../kloudbuster"
|
||||
sys.path.append(kb_main_path)
|
||||
|
||||
from kb_session import KBSessionManager
|
||||
from kloudbuster import __version__ as kb_version
|
||||
from kloudbuster.kloudbuster import __version__ as kb_version
|
||||
|
||||
from pecan import expose
|
||||
from pecan import response
|
||||
|
@ -1,19 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# 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.
|
||||
|
||||
import pbr.version
|
||||
|
||||
|
||||
__version__ = pbr.version.VersionInfo(
|
||||
'kloudbuster').version_string_with_vcs()
|
@ -22,7 +22,6 @@ import time
|
||||
import traceback
|
||||
import webbrowser
|
||||
|
||||
from __init__ import __version__
|
||||
import base_compute
|
||||
import base_network
|
||||
import glanceclient.exc as glance_exception
|
||||
@ -38,6 +37,7 @@ from keystoneclient.v2_0 import client as keystoneclient
|
||||
import log as logging
|
||||
from novaclient.client import Client as novaclient
|
||||
from oslo_config import cfg
|
||||
import pbr.version
|
||||
from pkg_resources import resource_filename
|
||||
from pkg_resources import resource_string
|
||||
from tabulate import tabulate
|
||||
@ -45,6 +45,7 @@ import tenant
|
||||
|
||||
CONF = cfg.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
__version__ = pbr.version.VersionInfo('kloudbuster').version_string_with_vcs()
|
||||
|
||||
|
||||
class KBVMCreationException(Exception):
|
||||
|
@ -23,12 +23,14 @@ def exec_command(cmd, cwd=None, show_console=False):
|
||||
for line in iter(p.stdout.readline, b""):
|
||||
print line,
|
||||
|
||||
p.communicate()
|
||||
(_, stderr) = p.communicate()
|
||||
if p.returncode:
|
||||
print stderr
|
||||
return p.returncode
|
||||
|
||||
def main():
|
||||
cwd = resource_filename(__name__, '__init__.py')
|
||||
cwd = cwd[:cwd.rfind('/')] + '/..'
|
||||
cwd = resource_filename(__name__, 'config.py')
|
||||
cwd = cwd[:cwd.rfind('/')] + '/../kb_server'
|
||||
cmd = ['stdbuf', '-oL', 'python', 'setup.py', 'develop']
|
||||
rc = exec_command(cmd, cwd=cwd)
|
||||
if not rc:
|
@ -5,3 +5,4 @@ pylint>=1.3
|
||||
pep8>=1.5.7
|
||||
sphinx>=1.2.3
|
||||
tox>=1.9.0
|
||||
twine>=1.6.5
|
||||
|
@ -5,7 +5,7 @@
|
||||
pbr>=1.3
|
||||
Babel>=1.3
|
||||
|
||||
python-openstackclient>=1.5.0
|
||||
python-openstackclient>=2.2.0
|
||||
python-neutronclient>=4.0.0
|
||||
attrdict>=2.0.0
|
||||
hdrhistogram>=0.3.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user